branch: externals/denote
commit 2c7184352fd9bebc15732977e857a2d2f0f98257
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Tweak denote-link-add-links code
---
 denote.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/denote.el b/denote.el
index 83fc3df9ce..02c912fb0c 100644
--- a/denote.el
+++ b/denote.el
@@ -2509,11 +2509,11 @@ inserts links with just the identifier."
     (read-regexp "Insert links matching REGEX: " nil 
'denote-link--add-links-history)
     current-prefix-arg))
   (let ((current-file (buffer-file-name)))
-    (if-let ((files (delete current-file 
(denote-directory-files-matching-regexp regexp))))
-        (let ((beg (point)))
+    (if-let ((files (delete current-file 
(denote-directory-files-matching-regexp regexp)))
+             (beg (point)))
+        (progn
           (insert (denote-link--prepare-links files current-file id-only))
-          (unless (derived-mode-p 'org-mode)
-            (denote-link-buttonize-buffer beg (point))))
+          (denote-link-buttonize-buffer beg (point)))
       (user-error "No links matching `%s'" regexp))))
 
 (defalias 'denote-link-insert-links-matching-regexp (symbol-function 
'denote-link-add-links))

Reply via email to