aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-08-19 22:17:33 +1000
committerYuchen Pei <id@ypei.org>2023-08-19 22:17:33 +1000
commiteb496dbcd9e1074dbbbca004f9aa2754bb18b2ec (patch)
tree0434bfec761816e5617d418d889eff9d09267d70 /emacs/.emacs.d/lisp/my
parentad4f5144f884f1f10d95dcb9e8ee6962c704341e (diff)
A hook after org-src-edit-exit
Diffstat (limited to 'emacs/.emacs.d/lisp/my')
-rw-r--r--emacs/.emacs.d/lisp/my/my-org.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-org.el b/emacs/.emacs.d/lisp/my/my-org.el
index 1b99dc5..f02784d 100644
--- a/emacs/.emacs.d/lisp/my/my-org.el
+++ b/emacs/.emacs.d/lisp/my/my-org.el
@@ -79,6 +79,14 @@ With a prefix, insert inactive dates.
"A :before advice for org-edit-src-exit."
(delete-trailing-whitespace))
+(defun my-org-edit-src-after-exit ()
+ "An :after advice for org-edit-src-exit.
+
+Deactivate mark and move point to after the block."
+ (deactivate-mark)
+ (re-search-forward "^[ \t]*#\\+end_")
+ (beginning-of-line 2))
+
;; navigation
(defun my-org-jump-to-last-visible-child ()
"Goto the last visible child."