3

I have a number of repeating tasks set up in my org-mode file. I also have org-log-into-drawer set to t (see here). This works nicely so that after a while I have something like this:

* TODO My repeating task
  SCHEDULED: <2016-06-27 Mon .+1d>
  :LOGBOOK:
  - State "DONE"  from "TODO"  [2016-06-26 Mon 16:34]
  - State "DONE"  from "TODO"  [2016-06-25 Mon 16:32]
  - State "DONE"  from "TODO"  [2016-06-24 Mon 15:34]
  - State "DONE"  from "TODO"  [2016-06-23 Mon 12:34]
  :END:

However, the :LOGBOOK: drawer continues to be filled with new entries ad infinitum. Eventually this becomes unwieldy and I have to manually prune out the older entries.

Is it possible to limit the maximum number of entries in a :LOGBOOK: drawer so that older entries are discarded when new ones are added?

Community
  • 1
  • 1
FixMaker
  • 3,759
  • 3
  • 26
  • 44
  • Here is a link to an older discussion regarding logbook entries that includes some old code that counts the number of entries, etc. The new version of that function is different, but the code snippets in the thread *should be* sufficient to give you or anyone who is interested in answering this question a giant leap forwards . . . . http://comments.gmane.org/gmane.emacs.orgmode/36365 To see the current version of that function, evaluate `(require 'org-habit)` and then `M-x find-function RET org-habit-parse-todo RET`. Or, just start with looking at the current version if you want. – lawlist Jun 26 '16 at 17:31

0 Answers0