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

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

[elpa] externals/embark db03cc10c5 3/6: Visibly jump to org remote headi


From: ELPA Syncer
Subject: [elpa] externals/embark db03cc10c5 3/6: Visibly jump to org remote headings when acting on them?
Date: Fri, 8 Sep 2023 15:57:48 -0400 (EDT)

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

    Visibly jump to org remote headings when acting on them?
---
 embark-org.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/embark-org.el b/embark-org.el
index e73993599d..efc1e2ad17 100644
--- a/embark-org.el
+++ b/embark-org.el
@@ -580,9 +580,10 @@ 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)
+(defun embark-org-goto-remote-heading (&rest args)
   "Jump to org remote heading TARGET."
-  (let ((marker (get-text-property 0 'org-marker target)))
+  (when-let ((target (if (cdr args) (plist-get args :target) (car args)))
+             (marker (get-text-property 0 'org-marker target)))
     (pop-to-buffer (marker-buffer marker))
     (goto-char marker)
     (pulse-momentary-highlight-one-line)))
@@ -590,8 +591,8 @@ target.  Applies RUN to the REST of the arguments."
 (map-keymap
  (lambda (key cmd)
    (unless (where-is-internal cmd (list embark-general-map))
-     (cl-pushnew 'embark-org--at-remote-heading
-                 (alist-get cmd embark-around-action-hooks))))
+     (cl-pushnew 'embark-org-goto-remote-heading
+                 (alist-get cmd embark-pre-action-hooks))))
  embark-org-heading-map)
 
 (setf (alist-get 'org-remote-heading embark-default-action-overrides)



reply via email to

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