summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2021-08-12 21:06:07 -0500
committerCase Duckworth2021-08-12 21:07:47 -0500
commitfe2f9241d2911d61cb1a8da0d97f41ade8e56c1a (patch)
treeaace0e0f41851236587b630deaa8ca800dfa2741 /lisp
parentOnly show wc mode-line in wc-mode (diff)
downloademacs-fe2f9241d2911d61cb1a8da0d97f41ade8e56c1a.tar.gz
emacs-fe2f9241d2911d61cb1a8da0d97f41ade8e56c1a.zip
Add acdw/copy-region-plain
This is finally the thing I was looking for
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw.el10
1 files changed, 10 insertions, 0 deletions
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."
309 309
310;;; Specialized functions 310;;; Specialized functions
311 311
312(defun acdw/copy-region-plain (start end)
313 "Copy a region to clipboard, removing all Org formatting."
314 (interactive "*r")
315 (let ((s (buffer-substring-no-properties start end)))
316 (with-temp-buffer
317 (insert s)
318 (let ((sentence-end-double-space nil))
319 (unfill-region (point-min) (point-max)))
320 (copy-region-as-kill (point-min) (point-max)))))
321
312(defun acdw/dir (&optional file make-directory) 322(defun acdw/dir (&optional file make-directory)
313 "Place Emacs files in one place. 323 "Place Emacs files in one place.
314 324