bastibe / org-journal

A simple org-mode based journaling mode
BSD 3-Clause "New" or "Revised" License
1.23k stars 122 forks source link

org-journal-new-entry needs to save any new file it creates. #403

Open PaulSchulz opened 1 year ago

PaulSchulz commented 1 year ago

Describe the bug Several time now I have lost my TODO's which get copied to a new org-journal file when the 'org-journal-new-entry' is run for the first time in the day. I do this, and them my emacs/system crashes (high load on startup) and all of the TODO's are lost.

To Reproduce

Expected behavior Don't allow TODO entries to be lost.

The current behavour removes the TODO's from the previous day as it copies them into the current day, but by not saving the new file will cause the TODO's to be completely removed from any existing files on disk.

(I realise that I can resolve this for myself if I remember to deliberately save my files after creating the new journal file. This has proved to be problematic when experiencing interuptions and system issues.)

Your Emacs Configuration org-journal Archive: melpa Version: 20220920.1514

bastibe commented 1 year ago

You could add save-buffer to org-journal-after-entry-create-hook.