[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 11a4d1f9a9 3/6: Merge pull request #325 from gam
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 11a4d1f9a9 3/6: Merge pull request #325 from gamecubate/main |
Date: |
Fri, 26 Apr 2024 00:58:05 -0400 (EDT) |
branch: externals/denote
commit 11a4d1f9a9127445dda33231e134570b0b2c0bf1
Merge: 59e6c43f9b 6f1773a9b7
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: GitHub <noreply@github.com>
Merge pull request #325 from gamecubate/main
File link conversion tracks the value of org-link-file-path-type
---
denote-org-extras.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/denote-org-extras.el b/denote-org-extras.el
index d6df935e32..d7c9edb40a 100644
--- a/denote-org-extras.el
+++ b/denote-org-extras.el
@@ -240,6 +240,15 @@ description."
(_ (error "`%s' is an unknown link type" type)))
(format
"\\[\\[\\(?1:%s:\\)\\(?:\\(?2:.*?\\)\\(?3:::.*\\)?\\]\\|\\]\\)\\(?4:\\[\\(?:.*?\\)\\]\\)?\\]"
group-1)))
+;;;###autoload
+(defun denote-org-extras-get-path-by-id (id)
+ "Return the path, relative or absolute, as indicated by
+org-link-file-path-type, to the denote file matching id."
+ (if (or (eql org-link-file-path-type 'adaptive)
+ (eql org-link-file-path-type 'relative))
+ (denote-get-relative-path-by-id id)
+ (denote-get-path-by-id id)))
+
;;;###autoload
(defun denote-org-extras-convert-links-to-file-type ()
"Convert denote: links to file: links in the current Org buffer.
@@ -253,7 +262,7 @@ resolve to a file in the variable `denote-directory'."
(let* ((id (match-string-no-properties 2))
(search (or (match-string-no-properties 3) ""))
(desc (or (match-string-no-properties 4) ""))
- (file (save-match-data (denote-get-path-by-id id))))
+ (file (save-match-data (denote-org-extras-get-path-by-id
id))))
(when id
(let ((new-text (if desc
(format "[[file:%s%s]%s]" file search desc)
- [elpa] externals/denote updated (59e6c43f9b -> 2a8aa0030b), ELPA Syncer, 2024/04/26
- [elpa] externals/denote 2acca69a24 4/6: Tweak the denote-org-extras function that checks org-link-file-path-type, ELPA Syncer, 2024/04/26
- [elpa] externals/denote 11a4d1f9a9 3/6: Merge pull request #325 from gamecubate/main,
ELPA Syncer <=
- [elpa] externals/denote 6f1773a9b7 2/6: File link conversion tracks the value of org-link-file-path-type, ELPA Syncer, 2024/04/26
- [elpa] externals/denote 534c8075b3 5/6: Update the manual's acknowledgements, ELPA Syncer, 2024/04/26
- [elpa] externals/denote fb2d14a763 1/6: Add denote-save-buffers and denote-rename-confirmations, ELPA Syncer, 2024/04/26
- [elpa] externals/denote 2a8aa0030b 6/6: Merge pull request #324 from jeanphilippegg/denote-rename-confirmations, ELPA Syncer, 2024/04/26