mirror of
https://github.com/protesilaos/denote.git
synced 2026-09-10 07:16:20 -04:00
Fix trimming of Org links in `denote-link-ol-follow'
This patch makes it so only search options in Org links get trimmed when checking whether the linked file exists. The old regex erroneously truncates filenames containing a single colon, so "/tmp/foo:bar/file.ext" becomes "/tmp/foo".
This commit is contained in:
parent
a576d8917c
commit
54494edf5a
|
|
@ -6849,7 +6849,7 @@ query of file contents or file names (see the commands
|
|||
|
||||
Uses the function `denote-directory' to establish the path to the file."
|
||||
(if-let* ((match (denote-link--ol-resolve-link-to-target link))
|
||||
(_ (file-exists-p (string-trim-right match ":[^/]+.*"))))
|
||||
(_ (file-exists-p (string-trim-right match ":\\{2\\}.*"))))
|
||||
(org-link-open-as-file match nil)
|
||||
(denote--act-on-query-link match)))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue