Add delete functionality for works on brain switch

This commit is contained in:
Sameer Rahmani 2020-07-12 12:26:07 +01:00
parent 17448753e7
commit 67812ca1be
1 changed files with 2 additions and 2 deletions

View File

@ -127,9 +127,9 @@ CURRENT-WORK is the key that is considered to be the current work."
(interactive
(let* ((state (fg42/load-brain-state)))
(list state
(completing-read "Work: " (fg42/brain-keys state) nil 'confirm))))
(completing-read "Work: " (fg42/brain-keys state)))))
(let ((buf (get-buffer-create (format "*%s-notes*" work)))
(entries (cadr (assoc (intern work) (fg42/-brain-entry-map state)))))
(entries (cadr (assoc work (fg42/-brain-entry-map state)))))
(set-buffer buf)
(erase-buffer)
(mapcar (lambda (entry)