org-journal
org-journal copied to clipboard
org agenda integration may break org-journal-tag-alist and org-current-tag-alist
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:
- set
org-journal-enable-agenda-integration
tot
- set
org-journal-tag-alist
- set
org-tag-alist
which is different fromorg-journal-tag-alist
- 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):
- Emacs Version:
GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.16.0)
- org-journal version:
20210714.911
- org-mode version:
9.4.6
Interesting. I am not a user of org-agenda
myself. Would you like to create a pull request to solve this issue?
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.)