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

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

[nongnu] elpa/hyperdrive 43f50f2ae7 69/82: Change/Fix: (hyperdrive--org-


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 43f50f2ae7 69/82: Change/Fix: (hyperdrive--org-open-at-point) Don't handle fuzzy links
Date: Mon, 25 Sep 2023 19:00:55 -0400 (EDT)

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

    Change/Fix: (hyperdrive--org-open-at-point) Don't handle fuzzy links
    
    This allows the internal Org machinery handle fuzzy links like [[*Heading 
A]].
---
 hyperdrive-org.el | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/hyperdrive-org.el b/hyperdrive-org.el
index ef46ed239b..33657b5361 100644
--- a/hyperdrive-org.el
+++ b/hyperdrive-org.el
@@ -136,7 +136,7 @@ TARGET may be a CUSTOM_ID or a headline."
   "Handle relative links in hyperdrive-mode org files.
 
 Added to `org-open-at-point-functions' in order to short-circuit
-the logic for handling links of \"fuzzy\" or \"file\" type.
+the logic for handling links of \"file\" type.
 
 Uses `url-default-expander' to expand the relative link against
 the current location."
@@ -148,16 +148,10 @@ the current location."
            (link-type (org-element-property :type context))
            (raw-link-type (org-element-property :raw-link context)))
       (when (and (eq element-type 'link)
-                 (or
-                  ;; "fuzzy" is for relative links without ./ prefix.
-                  (equal "fuzzy" link-type)
-                  ;; "file is for absolute links and relative links with ./ 
prefix.
-                  (equal "file" link-type))
-                 ;; Allow links to explicitly point to local files by
-                 ;; prefixing with "file:" (because Org assumes that links
-                 ;; without a specified protocol are "file:" links).
+                 (equal "file" link-type)
+                 ;; Don't treat link as a relative/absolute path in the
+                 ;; hyperdrive if "file:" protocol prefix is explicit.
                  (not (string-prefix-p "file:" raw-link-type)))
-        ;; FIXME: For fuzzy links, passing to hyperdrive-expand-url is a no-no.
         (hyperdrive-open-url (hyperdrive-expand-url (org-element-property 
:path context)))))))
 
 (defun hyperdrive--org-insert-link-after-advice (&rest _)



reply via email to

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