aboutsummaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init/ycp-org.el4
-rw-r--r--emacs/.emacs.d/lisp/my/my-org.el4
2 files changed, 7 insertions, 1 deletions
diff --git a/emacs/.emacs.d/init/ycp-org.el b/emacs/.emacs.d/init/ycp-org.el
index da56b51..71ed6bc 100644
--- a/emacs/.emacs.d/init/ycp-org.el
+++ b/emacs/.emacs.d/init/ycp-org.el
@@ -380,6 +380,7 @@
(my-package org-attach
(:delay 15)
(setq org-attach-store-link-p 'attached)
+ (setq org-attach-sync-delete-empty-dir t)
(require 'my-org)
(my-setq-from-local my-org-attach-copy-attached-targets)
(add-to-list 'org-attach-commands '((?k) my-org-attach-copy-attached-docs
@@ -459,7 +460,8 @@
(advice-add
'org-capture-place-template
:around 'my-org-capture-place-template-dont-delete-windows))
- (advice-add 'org-insert-structure-template :after 'my-org-edit-special))
+ (advice-add 'org-insert-structure-template :after 'my-org-edit-special)
+ (advice-add 'org-edit-src-exit :before 'my-org-edit-src-before-exit))
(my-package my-org
(:delay 30)
diff --git a/emacs/.emacs.d/lisp/my/my-org.el b/emacs/.emacs.d/lisp/my/my-org.el
index 63db9fa..1b99dc5 100644
--- a/emacs/.emacs.d/lisp/my/my-org.el
+++ b/emacs/.emacs.d/lisp/my/my-org.el
@@ -75,6 +75,10 @@ With a prefix, insert inactive dates.
(when (eq major-mode 'mhtml-mode)
(browse-url-of-buffer)))
+(defun my-org-edit-src-before-exit ()
+ "A :before advice for org-edit-src-exit."
+ (delete-trailing-whitespace))
+
;; navigation
(defun my-org-jump-to-last-visible-child ()
"Goto the last visible child."