[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote db5acd3317 1/4: Fix regression to make denote-li
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote db5acd3317 1/4: Fix regression to make denote-link not fail in Org capture buffers |
Date: |
Mon, 25 Mar 2024 09:57:52 -0400 (EDT) |
branch: externals/denote
commit db5acd33172996cb8781a71b077f4c0b9bff7386
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Fix regression to make denote-link not fail in Org capture buffers
Thanks to Sven Seebeck for reporting this bug in issue 298:
<https://github.com/protesilaos/denote/issues/298>.
---
denote.el | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/denote.el b/denote.el
index 19b312f17e..1c438c799b 100644
--- a/denote.el
+++ b/denote.el
@@ -3727,12 +3727,11 @@ system path. FILE-TYPE is a symbol as described in
treats the active region specially, is up to it."
(interactive
(let* ((file (denote-file-prompt nil "Link to FILE"))
- (file-type (when buffer-file-name
- (denote-filetype-heuristics buffer-file-name)))
+ (file-type (denote-filetype-heuristics buffer-file-name))
(description (when (file-exists-p file)
(denote--link-get-description file))))
(list file file-type description current-prefix-arg)))
- (unless (and buffer-file-name (denote-file-has-supported-extension-p
buffer-file-name))
+ (unless (or file-type (and buffer-file-name
(denote-file-has-supported-extension-p buffer-file-name)))
(user-error "The current file type is not recognized by Denote"))
(unless (file-exists-p file)
(user-error "The linked file does not exist"))