diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-02-17 21:46:22 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-02-17 21:46:22 -0500 |
commit | bb7d073cdbbf9afb2b1f48db0fd70cae88305c1b (patch) | |
tree | f023774ad6536d4d41dd1a3224a6926c9290d28b | |
parent | 16b0cd1e44eb82d084f2238aec164f39e610d081 (diff) | |
download | bog-bb7d073cdbbf9afb2b1f48db0fd70cae88305c1b.tar.gz |
Clean up previous duplicate heading buffer
When bog-list-duplicate-heading-citekeys doesn't find any duplicate
headings, check for a buffer from a previous call. If one is found,
kill it because its information is now stale.
-rw-r--r-- | bog.el | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -425,7 +425,9 @@ is only active if `bog-use-citekey-cache' is non-nil)." (dup-cks (sort (bog--find-duplicates (bog-all-heading-citekeys)) #'string-lessp))) (if (not dup-cks) - (message "No duplicate citekeys found") + (progn (message "No duplicate citekeys found") + (and (get-buffer bufname) + (kill-buffer bufname))) (with-current-buffer (get-buffer-create bufname) (erase-buffer) (insert (mapconcat #'identity dup-cks "\n")) |