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

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

[nongnu] elpa/hyperdrive dafc7f1b93 72/82: Fix: (hyperdrive--org-link-go


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive dafc7f1b93 72/82: Fix: (hyperdrive--org-link-goto) Use org-link-search
Date: Mon, 25 Sep 2023 19:00:56 -0400 (EDT)

branch: elpa/hyperdrive
commit dafc7f1b933ffc1e1df02a0660c364a2d88d4c43
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>

    Fix: (hyperdrive--org-link-goto) Use org-link-search
---
 hyperdrive-org.el | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/hyperdrive-org.el b/hyperdrive-org.el
index 0a1965e077..47dff61750 100644
--- a/hyperdrive-org.el
+++ b/hyperdrive-org.el
@@ -118,11 +118,8 @@ raw URL, not an Org link."
   "Go to TARGET in current Org buffer.
 TARGET may be a CUSTOM_ID or a headline."
   (cl-assert (eq 'org-mode major-mode))
-  ;; We do not ensure that a target only exists once in the file, but
-  ;; neither does Org always do so.
-  (goto-char (or (org-find-property "CUSTOM_ID" target)
-                 (org-find-exact-headline-in-buffer target)
-                 (hyperdrive-error "Unable to find entry in file: %S" 
target))))
+  ;; Remove leading "::" from target.
+  (org-link-search (substring target (length "::"))))
 
 (defun hyperdrive-org-link-complete ()
   "Create a hyperdrive org link."



reply via email to

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