bastibe / org-journal

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

org agenda integration may break org-journal-tag-alist and org-current-tag-alist #361

Open Vonfry opened 3 years ago

Vonfry commented 3 years ago

Describe the bug When org agenda integration is enabled, org-current-tag-alist may not be org-journal-tag-alist but org-tag-alist instead which is set by org-agenda.

To Reproduce Steps to reproduce the behavior:

  1. set org-journal-enable-agenda-integration to t
  2. set org-journal-tag-alist
  3. set org-tag-alist which is different from org-journal-tag-alist
  4. open a journal

org-journal-mode -> org-mode is called at first, and org-journal-tag-alist assigns to org-current-tag-alist. Then org-agenda-mode is enabled, and org-tag-alist assigns to org-current-tag-alist.

Expected behavior org-current-tag-alist should be equal to org-journal-tag-alist.

Desktop (please complete the following information):

bastibe commented 2 years ago

Interesting. I am not a user of org-agenda myself. Would you like to create a pull request to solve this issue?

whym commented 1 year ago

As a (clearly sub-optimal) workaround I re-bind the function below to C-c C-c in org-journal-mode-map.

    (defun my--set-tag-plus-ctrlc-ctrlc ()
      (interactive)
      (org-journal--set-current-tag-alist)
      (org-ctrl-c-ctrl-c))

(This won't work if you need org-journal-tag-alist to work in contexts other than C-c C-c.)