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

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

[nongnu] elpa/hyperdrive 2a611e471f 42/82: Change: (--org-normalize-link


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 2a611e471f 42/82: Change: (--org-normalize-link) Add search-option to path link
Date: Mon, 25 Sep 2023 19:00:53 -0400 (EDT)

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

    Change: (--org-normalize-link) Add search-option to path link
---
 hyperdrive-org.el | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/hyperdrive-org.el b/hyperdrive-org.el
index 755bed0c56..2fe41bf38c 100644
--- a/hyperdrive-org.el
+++ b/hyperdrive-org.el
@@ -213,19 +213,22 @@ FIXME: Docstring, maybe move details from 
`hyperdrive-org-link-full-url'."
              (hyperdrive-entry-path hyperdrive-current-entry))
             (hyperdrive-entry-path target-entry))))
       (hyperdrive--ensure-dot-slash-prefix-path
-       (pcase org-link-file-path-type
-         ;; TODO: Handle `org-link-file-path-type' as a function.
-         ((or 'absolute
-              ;; TODO: Consider special-casing `noabbrev' - who knows?
-              ;; `noabbrev' is like `absolute' because hyperdrives have
-              ;; no home directory.
-              'noabbrev
-              (and 'adaptive (guard (not adaptive-target-p))))
-          (hyperdrive-entry-path target-entry))
-         ((or 'relative (and 'adaptive (guard adaptive-target-p)))
-          (file-relative-name
-           (hyperdrive-entry-path target-entry)
-           (file-name-directory (hyperdrive-entry-path 
hyperdrive-current-entry)))))))))
+       (apply #'concat
+              (pcase org-link-file-path-type
+                ;; TODO: Handle `org-link-file-path-type' as a function.
+                ((or 'absolute
+                     ;; TODO: Consider special-casing `noabbrev' - who knows?
+                     ;; `noabbrev' is like `absolute' because hyperdrives have
+                     ;; no home directory.
+                     'noabbrev
+                     (and 'adaptive (guard (not adaptive-target-p))))
+                 (hyperdrive-entry-path target-entry))
+                ((or 'relative (and 'adaptive (guard adaptive-target-p)))
+                 (file-relative-name
+                  (hyperdrive-entry-path target-entry)
+                  (file-name-directory (hyperdrive-entry-path 
hyperdrive-current-entry)))))
+              (when search-option
+                (list "::" search-option)))))))
 
 ;;;###autoload
 (with-eval-after-load 'org



reply via email to

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