Skip to content

Commit

Permalink
Do not kill notes buffer for one-file-per-note.
Browse files Browse the repository at this point in the history
Until now, with the setting `one-file-per-note` for `ebib-notes-storage`, every
time the entry buffer is updated, the notes buffer is killed. This was mainly to
prevent dozens of notes buffers from staying alive in an Emacs session. However,
it leads to a problem with the setting `all` for `ebib-notes-show-note-method`,
as seen in Github issue #283.

We may decide to turn this into a user-configurable option if users are annoyed
by the many note buffers staying open.
  • Loading branch information
Joost Kremers committed Jan 6, 2024
1 parent e6a88d6 commit f0f65cc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ebib.el
Original file line number Diff line number Diff line change
Expand Up @@ -699,12 +699,9 @@ not have an associated index buffer, create one and fill it."
MATCH-STR is a regexp that will be highlighted when it occurs in
the field contents."
(when ebib--note-window
(if (window-live-p ebib--note-window)
(let ((buf (window-buffer ebib--note-window)))
(delete-window ebib--note-window)
(if (eq ebib-notes-storage 'one-file-per-note)
(kill-buffer buf))
(setq ebib--needs-update nil))) ; See below.
(when (window-live-p ebib--note-window)
(delete-window ebib--note-window)
(setq ebib--needs-update nil)) ; See below.
(setq ebib--note-window nil))
(with-current-ebib-buffer 'entry
(let ((inhibit-read-only t)
Expand Down

0 comments on commit f0f65cc

Please sign in to comment.