about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el3
-rw-r--r--lisp/acdw.el10
2 files changed, 11 insertions, 2 deletions
diff --git a/init.el b/init.el index 7e2c1ea..63a327c 100644 --- a/init.el +++ b/init.el
@@ -1334,8 +1334,7 @@ if ripgrep is installed, otherwise `consult-grep'."
1334 "<S-return>" acdw-org/org-table-copy-down 1334 "<S-return>" acdw-org/org-table-copy-down
1335 "M-SPC M-SPC" insert-zero-width-space 1335 "M-SPC M-SPC" insert-zero-width-space
1336 "C-c C-l" org-insert-link-dwim 1336 "C-c C-l" org-insert-link-dwim
1337 "M-w" kill-ring-save-unfilled 1337 "M-w" acdw/copy-region-plain)
1338 "M-=" acdw-org/count-words-stupidly)
1339 1338
1340 (with-eval-after-load 'org-export 1339 (with-eval-after-load 'org-export
1341 (add-to-list 'org-export-filter-final-output-functions 1340 (add-to-list 'org-export-filter-final-output-functions
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