Merge pull request #669 from kilesduli/fix-input-gpg-password-too-many-times

Fix denote--define-retrieve-front-matter not reusing opened buffer
This commit is contained in:
Protesilaos Stavrou 2026-01-14 20:52:01 +02:00 committed by GitHub
commit eaedec7463
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2645,14 +2645,13 @@ Subroutine of `denote--file-with-temp-buffer'."
(file-exists (file-exists-p file))
(buffer-modified (buffer-modified-p buffer)))
(cond
((or (and file-exists
buffer
(not buffer-modified)
(not (eq buffer-modified 'autosaved)))
(and file-exists (not buffer)))
(cons #'insert-file-contents file))
(buffer
((and file-exists
buffer
(not buffer-modified))
(cons #'insert-buffer buffer))
((and file-exists
(or (null buffer) buffer-modified))
(cons #'insert-file-contents file))
;; (t
;; (error "Cannot find anything about file `%s'" file))
)))