0

When I create an org todo entry in a weekly journal file under a date heading using org-journal, that todo will not appear in org-agenda unless I specifically assign a deadline or scheduling date to the item. The org-journal documentation seems to imply that todos created in a org-journal file can inherit a deadline from the file or header.

If that is the case, I wonder what I might be doing wrong. If not, what might be a way to achieve this kind of customization?

Here are my org-journal customizations:

(setq org-journal-dir "~/Documents/org/journal/")
(setq org-journal-file-type 'weekly)
(setq org-journal-file-format "%Y-%m-%d")
(setq org-journal-time-format "TODO ")
(setq org-journal-time-prefix "** ")
(setq org-journal-date-format "%A, %B %d %Y")

(defun org-journal-date-format-func (time)
  "Custom function to insert journal date header,
and some custom text on a newly created journal file."
  (when (= (buffer-size) 0)
    (insert
     (pcase org-journal-file-type
       (`daily "#+TITLE: Daily Journal\n\n")
       (`weekly (concat"#+TITLE: Weekly Journal " (format-time-string "(Wk #%V)" time) "\n\n"))
       (`monthly "#+TITLE: Monthly Journal\n\n")
       (`yearly "#+TITLE: Yearly Journal\n\n"))))
  (concat org-journal-date-prefix (format-time-string "%A, %x" time)))
(setq org-journal-date-format 'org-journal-date-format-func)

2 Answers 2

2

A way to achieve this:

You can use the built-in function org-journal-new-scheduled-entry to add a timestamp (and TODO when no prefix is given) to your journal entries so they show up in the agenda.

I bind it to a key (use-package config): :bind ("C-c j a" . org-journal-new-scheduled-entry)

You are prompted for a date. Just hit RET to get the current date/time. The resulting entries (in a daily journal) look like this:

* 2020-09-14
** 14:25 TODO test.
<2020-09-14>

2
  • I discovered this solution as well, thank you. I think it is probably the right solution, given that you might not always want the scheduled date to inherit from the current entry, since it's possible the scheduling could have been for an earlier date and you want to preserve that information.
    – fraxture
    Sep 14, 2020 at 18:00
  • Can no longer do it on Version 2.1.2; have to manually insert date.
    – phoxd
    Mar 8 at 19:46
0

I had a similar question. After some experimenting, I realized it only fails to show up in the agenda buffer. It still shows up in the todo buffer meaning the integration is working. For a headline to show up in the agenda buffer, it has to have a timestamp. You can simply create a timestamp by evoking 'org-time-stamp' or pressing 'C-c .' alongside or below the headline you would like to show up in the agenda buffer. Hope this helps.

In org-journal, there is another function that carries over the todo items from today to the next day if it is still marked as todo at the end of day. If it has a timestamp of today, I bet it won't be carried over.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.