Open jmburgos opened 3 years ago
This is my attempt which did not worked:
(defun org-journal-delete-old-carryover-except-logbook (old_entries)
"Delete all carryover entries from the previous day's journal, except those with a LOGBOOK drawer. If the parent heading has no more content, delete it as well."
(require 'cl-seq)
(mapc (lambda (x)
(unless (cl-member "LOGBOOK" x :test #'string-match)
(unless (save-excursion
(goto-char (1- (cadr x)))
(org-goto-first-child))
(kill-region (car x) (cadr x)))
))
(reverse old_entries)))
Is this perhaps something you could solve with a custom org-journal-carryover-items
? It currently selects for TODO items, but the search patterns are quite powerful, and do allow filtering by properties etc.
Hello everyone,
I am trying to mody the
org-journal-delete-old-carryover
function so it will not delete entries that have a LOGBOOK drawer. It should be pretty straightforward, just adding an new conditional clause, but I guess my elisp is not up to the task. Could anyone give me a hand?