emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/embark cd7c880aff 2/6: Add default action override for


From: ELPA Syncer
Subject: [elpa] externals/embark cd7c880aff 2/6: Add default action override for org-remote-heading
Date: Fri, 8 Sep 2023 15:57:48 -0400 (EDT)

branch: externals/embark
commit cd7c880aff3855f839d181a348de7f8138c3db48
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>

    Add default action override for org-remote-heading
---
 embark-org.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/embark-org.el b/embark-org.el
index 90d30601cf..e73993599d 100644
--- a/embark-org.el
+++ b/embark-org.el
@@ -580,6 +580,13 @@ target.  Applies RUN to the REST of the arguments."
         (apply run :target target rest)))
     (apply run :target target rest)))
 
+(defun embark-org-goto-remote-heading (target)
+  "Jump to org remote heading TARGET."
+  (let ((marker (get-text-property 0 'org-marker target)))
+    (pop-to-buffer (marker-buffer marker))
+    (goto-char marker)
+    (pulse-momentary-highlight-one-line)))
+
 (map-keymap
  (lambda (key cmd)
    (unless (where-is-internal cmd (list embark-general-map))
@@ -587,5 +594,8 @@ target.  Applies RUN to the REST of the arguments."
                  (alist-get cmd embark-around-action-hooks))))
  embark-org-heading-map)
 
+(setf (alist-get 'org-remote-heading embark-default-action-overrides)
+      #'embark-org-goto-remote-heading)
+
 (provide 'embark-org)
 ;;; embark-org.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]