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

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

[elpa] externals/denote bd14d37c4d 05/10: Make denote-format-link use Or


From: ELPA Syncer
Subject: [elpa] externals/denote bd14d37c4d 05/10: Make denote-format-link use Org links if FILE-TYPE is nil
Date: Mon, 20 May 2024 00:57:51 -0400 (EDT)

branch: externals/denote
commit bd14d37c4dcd758c122eb666cb3a4573c382a2af
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Make denote-format-link use Org links if FILE-TYPE is nil
---
 denote.el | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/denote.el b/denote.el
index 3d0a4b2071..ee1ad4e2b3 100644
--- a/denote.el
+++ b/denote.el
@@ -3734,9 +3734,16 @@ The format of such links is 
`denote-id-only-link-format'."  )
 FILE-TYPE and ID-ONLY are used to get the format of the link.
 See the `:link' property of `denote-file-types'."
   (format
-   (if (or id-only (null description) (string-empty-p description))
-       denote-id-only-link-format
-     (denote--link-format file-type))
+   (cond
+    ((or id-only (null description) (string-empty-p description))
+     denote-id-only-link-format)
+    ;; NOTE 2024-05-20: If there is no file type, we want to use the
+    ;; Org format because it is still a usable link with the help of
+    ;; the command `org-open-at-point-global'.
+    ((null file-type)
+     (denote--link-format 'org))
+    (t
+     (denote--link-format file-type)))
    (denote-retrieve-filename-identifier file)
    description))
 



reply via email to

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