org-journal icon indicating copy to clipboard operation
org-journal copied to clipboard

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

Open Vonfry opened this issue 3 years ago • 2 comments

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):

  • 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

Vonfry avatar Aug 11 '21 04:08 Vonfry

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

bastibe avatar Sep 08 '21 09:09 bastibe

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.)

whym avatar Apr 06 '23 10:04 whym