1

I amended .emacs as shown below. Then M-x load-file ~/.emacs. What I want to do in test.org is add MEntal tags to each of the two entries, for example Read and Reminder, respectively. Using the column view I type 'e' in the tags column of the first entry, then 'R'. I expect 'Read' to autocomplete, instead I get '[No match]'. Is there something wrong with the global tag hierarchy defined in .emacs?

~/.emacs:

(setq org-tag-alist '(
              (:startgrouptag)
                      ("ACTivities")
                      (:grouptags)
                      ("MEntal")
                      ("PHysical")
                      ("TRansact")
                      (:endgrouptag)
                      (:startgrouptag)
                      ("MEntal")
                      (:grouptags)
                      ("Read")
                      ("Write")
                      ("Reminder")
                      (:endgrouptag)
              )
      )

test.org:

#+TAGS: [ editor : emacs ]

* 2019
** 2019-12 December
*** 2019-12-01 Sunday
**** TODO [#C] [[http://tuhdo.github.io/helm-intro.html][Helm-intro]]                                                                  :emacs:
     - State "TODO"       from              [2019-12-01 Sun 17:31]
**** `C-u C-c C-q` to realign tags                                                                  :emacs:
   Entered on [2019-12-01 Sun 20:29]

enter image description here

6
  • I can reproduce this, in two ways: trying to edit the TAGS column in columns view, or using C-q without columns view. It works fine without the explicit #+TAGS entry (which is wrong by the way: the syntax is #+TAGS: tag1 tag2 tag3 .... with no square brackets and no colons AFAIK). At first sight, it looks like a bug to me.
    – NickD
    Dec 10, 2019 at 2:10
  • @NickD the syntax of the in file tag specification is borrowed from the manual If I remove the line, autocomplete still ignores the globally defined tags.
    – user19777
    Dec 10, 2019 at 2:20
  • Yes, you are right about the syntax. After removing the line, did you save the file, kill the buffer and reopen the file?
    – NickD
    Dec 10, 2019 at 2:29
  • No, sorry, I hadn't. Now that I did, autocomplete works. If add at the beginning, #+TAGS: tag1 tag2, and reload, it does not work. In other words local tag specs interferes. But I should be able to mix global and local tags, though.
    – user19777
    Dec 10, 2019 at 2:39
  • You might want to bring it up on the Org mode mailing list.
    – NickD
    Dec 10, 2019 at 13:28

1 Answer 1

1

This was suggested to me through the org-mode mailing list: replace ‘org-tag-persistent-alist’ instead of org-tag-alist in ~/.emacs. I tried it: autocomplete works for both the local and global tag lists.

1
  • 1
    Thanks for closing the loop!
    – NickD
    Dec 12, 2019 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.