branch: externals/denote
commit dbe003bae7bb9f13e4fc31e7fabe3e9d21d105d1
Author: Jean-Philippe Gagné Guay <jeanphilippe...@gmail.com>
Commit: Jean-Philippe Gagné Guay <jeanphilippe...@gmail.com>

    Use with-temp-buffer instead of with-current-buffer in 
denote--regexp-in-file-p
---
 denote.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/denote.el b/denote.el
index cd82694bfc..31547eb157 100644
--- a/denote.el
+++ b/denote.el
@@ -1165,7 +1165,8 @@ appropriate."
 
 (defun denote--regexp-in-file-p (regexp file)
   "Return t if REGEXP matches in the FILE."
-  (with-current-buffer (find-file-noselect file)
+  (with-temp-buffer
+    (insert-file-contents file)
     (save-excursion
       (save-restriction
         (widen)

Reply via email to