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

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

[nongnu] elpa/hyperdrive 016582b1a2 26/82: Tidy: (--org-insert-link-afte


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 016582b1a2 26/82: Tidy: (--org-insert-link-after-advice) Bind search-option at top
Date: Mon, 25 Sep 2023 19:00:51 -0400 (EDT)

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

    Tidy: (--org-insert-link-after-advice) Bind search-option at top
---
 hyperdrive-org.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hyperdrive-org.el b/hyperdrive-org.el
index 8d70055a44..c9623fa835 100644
--- a/hyperdrive-org.el
+++ b/hyperdrive-org.el
@@ -176,11 +176,12 @@ the current location."
            (_ (cl-assert (eq 'link (car link-element))))
            (url (org-element-property :raw-link link-element))
            (target-entry (hyperdrive-url-entry url))
+           (search-option (alist-get 'target (hyperdrive-entry-etc 
target-entry)))
            (host-format '(public-key)) (with-path t) (with-protocol t)
            fragment-prefix destination)
       (cond (hyperdrive-org-link-full-url
              ;; User wants only full "hyper://" URLs.
-             (when (alist-get 'target (hyperdrive-entry-etc target-entry))
+             (when search-option
                (setf fragment-prefix (concat "#" (url-hexify-string "::"))))
              (setf destination (hyperdrive--format-entry-url
                                 target-entry :fragment-prefix fragment-prefix
@@ -190,7 +191,7 @@ the current location."
              ;; Link points to same file on same hyperdrive: make link
              ;; relative.
              (setf destination
-                   (or (alist-get 'target (hyperdrive-entry-etc target-entry))
+                   (or search-option
                        (pcase org-link-file-path-type
                          ;; TODO: Handle `org-link-file-path-type' as a 
function.
                          ((or 'absolute 'noabbrev)



reply via email to

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