bastibe / org-journal

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

Active timestamp in carry-over items is not updated #304

Closed brabalan closed 4 years ago

brabalan commented 4 years ago

Describe the bug When carrying-over an item from the previous day, the active timestamp is not updated, hence the entry no longer shows in the agenda.

To Reproduce Steps to reproduce the behavior:

Expected behavior The item is carried-over as

* TODO testing
 <2020-10-22>

Your Emacs Configuration

(use-package! org-journal
  :config
  (map!
   (:leader
    (:n "d o j" 'org-journal-new-entry)))
  :custom
  (org-journal-dir deft-directory)
  (org-journal-cache-file "~/.emacs.d/.local/org-journal.cache")
  (org-journal-date-prefix "#+TITLE: ")
  (org-journal-time-prefix "* ")
  (org-journal-file-format "%Y-%m-%d.org")
  (org-journal-date-format "%Y-%m-%d (%A)"))
(setq org-journal-enable-agenda-integration t)
casch-at commented 4 years ago

The regex is wrong https://github.com/bastibe/org-journal/blob/master/org-journal.el#L833, also https://github.com/bastibe/org-journal/blob/master/org-journal.el#L839 needs to be updated.

casch-at commented 4 years ago

Should be fixed with commit 00f3d39.

brabalan commented 4 years ago

It's almost fixed: it works for the last item to be carried over. If I have this for October 22:

* TODO test 1
 <2020-10-22>

* TODO test 2
 <2020-10-22>

after carry-over to October 23, I get this:

* TODO test 1
 <2020-10-22>

* TODO test 2
 <2020-10-23 Fri>
casch-at commented 4 years ago

hmm, in test it does work. Can you post a complete entry please.

casch-at commented 4 years ago

Would be appreciated if you can make a PR with some test journals files based on you configuration, and put it under tests/journals/daily. Than I can write a test similar to the test =org-journal-scheduled-carryover-test= in tests/org-journal-test.el

Thanks!

brabalan commented 4 years ago

I created a PR. I'm not sure this is what you expected. The behavior I get currently is that only the last entry has its inactive stamp updated.

casch-at commented 4 years ago

Thanks! Indeed, it doesn't work with your configuration. I'll debug it and let you know when I pushed a fix for it.

brabalan commented 4 years ago

I confirm it works. Thanks!