branch: externals/denote-menu
commit 655c9ef1f9a268f501bd7a417c7627830d8da644
Author: Mohamed Suliman <sulim...@tcd.ie>
Commit: Mohamed Suliman <sulim...@tcd.ie>

    denote-menu-list-denotes now kills any pre-existing buffer
    
    Kills any *Denote* buffers before setting up a new one. This is needed
    for the workaround mentioned in issue #11 to work.
---
 denote-menu.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/denote-menu.el b/denote-menu.el
index 5e75c09bdb..8c9ddbad84 100644
--- a/denote-menu.el
+++ b/denote-menu.el
@@ -92,6 +92,9 @@ denote file corresponding to the button."
 (defun denote-menu-list-notes ()
   "Display list of Denote files in variable `denote-directory'."
   (interactive)
+  ;; kill any existing *Denote* buffer
+  (when (get-buffer "*Denote*")
+  (kill-buffer "*Denote*"))
   (let ((buffer (get-buffer-create "*Denote*")))
     (with-current-buffer buffer
       (setq buffer-file-coding-system 'utf-8)

Reply via email to