From fe2f9241d2911d61cb1a8da0d97f41ade8e56c1a Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 12 Aug 2021 21:06:07 -0500 Subject: Add acdw/copy-region-plain This is finally the thing I was looking for --- lisp/acdw.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lisp/acdw.el') diff --git a/lisp/acdw.el b/lisp/acdw.el index be12dd6..eab0719 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el @@ -309,6 +309,16 @@ With a prefix argument, run git pull on the repo first." ;;; Specialized functions +(defun acdw/copy-region-plain (start end) + "Copy a region to clipboard, removing all Org formatting." + (interactive "*r") + (let ((s (buffer-substring-no-properties start end))) + (with-temp-buffer + (insert s) + (let ((sentence-end-double-space nil)) + (unfill-region (point-min) (point-max))) + (copy-region-as-kill (point-min) (point-max))))) + (defun acdw/dir (&optional file make-directory) "Place Emacs files in one place. -- cgit 1.4.1-21-gabe81