Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PaulSchulz opened this issue Nov 17, 2022 · 1 comment
Open

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

PaulSchulz opened this issue Nov 17, 2022 · 1 comment

Comments

@PaulSchulz
Copy link

PaulSchulz commented Nov 17, 2022

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

  • Start emacs with org-mode and org-journal
  • Create TODO entries in a journal file with 'org-journal-new-entry (add TODO on header line).
  • Save journal file as previous days date.
  • Run 'org-journal-new-entry' to recreate the day's journal file. Note that the 'TODO' entries have been copied .
  • Kill emacs
  • Restart emacs, run 'org-journal-new-entry' and note that TODO's are now missing.

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
Copy link
Owner

bastibe commented Nov 19, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants