diff options
-rw-r--r-- | init.el | 6 | ||||
-rw-r--r-- | lisp/acdw.el | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/init.el b/init.el index 98b64ab..aaecee4 100644 --- a/init.el +++ b/init.el | |||
@@ -1131,6 +1131,7 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
1131 | (require 'acdw-org) ; so I don't clutter up init.el | 1131 | (require 'acdw-org) ; so I don't clutter up init.el |
1132 | (:option org-adapt-indentation nil | 1132 | (:option org-adapt-indentation nil |
1133 | org-catch-invisible-edits 'smart | 1133 | org-catch-invisible-edits 'smart |
1134 | org-clock-clocked-in-display 'mode-line | ||
1134 | org-confirm-babel-evaluate nil | 1135 | org-confirm-babel-evaluate nil |
1135 | org-ellipsis " …" | 1136 | org-ellipsis " …" |
1136 | org-export-coding-system 'utf-8-unix | 1137 | org-export-coding-system 'utf-8-unix |
@@ -1152,13 +1153,14 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
1152 | org-src-tab-acts-natively t | 1153 | org-src-tab-acts-natively t |
1153 | org-src-window-setup 'current-window | 1154 | org-src-window-setup 'current-window |
1154 | org-startup-truncated nil | 1155 | org-startup-truncated nil |
1155 | org-tags-column (- 0 fill-column -3) | 1156 | org-tags-column 0 ; (- 0 fill-column -3) |
1156 | org-directory "~/org") | 1157 | org-directory "~/org") |
1157 | 1158 | ||
1158 | (:bind "RET" acdw-org/return-dwim | 1159 | (:bind "RET" acdw-org/return-dwim |
1159 | "<S-return>" acdw-org/org-table-copy-down | 1160 | "<S-return>" acdw-org/org-table-copy-down |
1160 | "M-SPC M-SPC" insert-zero-width-space | 1161 | "M-SPC M-SPC" insert-zero-width-space |
1161 | "C-c C-l" org-insert-link-dwim) | 1162 | "C-c C-l" org-insert-link-dwim |
1163 | "M-w" kill-ring-save-unfilled) | ||
1162 | 1164 | ||
1163 | (with-eval-after-load 'org-export | 1165 | (with-eval-after-load 'org-export |
1164 | (add-to-list 'org-export-filter-final-output-functions | 1166 | (add-to-list 'org-export-filter-final-output-functions |
diff --git a/lisp/acdw.el b/lisp/acdw.el index 2f878a9..15756c2 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el | |||
@@ -87,6 +87,16 @@ ARG). When called with multiple arguments or a list, it returns | |||
87 | (save-restriction | 87 | (save-restriction |
88 | (unfill-region (point-min) (point-max)))))) | 88 | (unfill-region (point-min) (point-max)))))) |
89 | 89 | ||
90 | (defun kill-ring-save-unfilled (start end &optional region) | ||
91 | "Unfill, kill, then re-fill the region defined by START and END positions. | ||
92 | REGION is passed straight to `kill-ring-save'." | ||
93 | (interactive "*r") | ||
94 | (save-excursion | ||
95 | (save-restriction | ||
96 | (unfill-region start end) | ||
97 | (kill-ring-save start end region) | ||
98 | (fill-region start end)))) | ||
99 | |||
90 | (defmacro when-unfocused (name &rest forms) | 100 | (defmacro when-unfocused (name &rest forms) |
91 | "Define a function NAME, executing FORMS, that fires when Emacs | 101 | "Define a function NAME, executing FORMS, that fires when Emacs |
92 | is unfocused." | 102 | is unfocused." |