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

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

[elpa] externals/denote 341cd28b5a 266/355: Fix bug with 'default-direct


From: ELPA Syncer
Subject: [elpa] externals/denote 341cd28b5a 266/355: Fix bug with 'default-directory' reset
Date: Sun, 26 Jun 2022 23:58:31 -0400 (EDT)

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

    Fix bug with 'default-directory' reset
    
    This would override the default-directory when using something like 'M-x
    denote-link-add-links' from a file whose directory had a local value for
    'denote-directory'.
    
    Thanks to Sven Seebeck for reporting the bug in issue 16 over at the
    GitHub mirror: <https://github.com/protesilaos/denote/issues/16>.
---
 denote-retrieve.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/denote-retrieve.el b/denote-retrieve.el
index 5fc57339c1..f4c1cba768 100644
--- a/denote-retrieve.el
+++ b/denote-retrieve.el
@@ -73,11 +73,10 @@ FILE is a note in the variable `denote-directory'.
 
 Optional GROUP is a regexp construct for
 `denote-retrieve--search'."
-  (let ((default-directory (denote-directory)))
-    (with-temp-buffer
-      (insert-file-contents file)
-      (or (denote-retrieve--search regexp group)
-          nil))))
+  (with-temp-buffer
+    (insert-file-contents file)
+    (or (denote-retrieve--search regexp group)
+        nil)))
 
 (defun denote-retrieve--value-title (file &optional group)
   "Return title from FILE, optionally matching regexp GROUP."



reply via email to

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