Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs org-mode tags not found

I'm learning to use emacs and org-mode. I create a few tags, in a .org file, as such :outline: lets say. And then searched for them using:

C-c a m outline
C-c a t outline
C-c \   outline

And the output is always (basically, did't find anything):

Headlines with TAGS match: outline
Press `C-u r' to search again with new search string

What am I doing wrong. Can someone please tell me what I'm missing?

Thanks in advance.

like image 264
Jenia Ivanov Avatar asked Oct 18 '25 13:10

Jenia Ivanov


1 Answers

Common problems when initially setting up org-mode include, but are not limited to, properly configuring the org-agenda-files variable. A user may choose to have one or more files, or a directory.

Here is an example of multiple files:

(setq org-agenda-files 
  (list "~/org/gtd.org" "~/org/work.org" "~/org/personal.org"))

Here is an example of a directory:

(setq org-agenda-files (list "~/"))

(setq org-agenda-file-regexp "\\`[^.].*\\.org\\|.todo\\'")

It is interesting to note that there is also non-interactive function with the same name, which looks up the configuration of the org-agenda-files variable -- the function is what org-mode generally relies upon when any other function looks up the value of the variable. To see an example of how that non-interactive function works, the user can do something like this:

M-x eval-expression RET (org-agenda-files) RET

The importance of setting the org-agenda-files variable can be seen by examining the function org-match-sparse-tree, which in turn calls org-scan-tags using org-make-tags-matcher, which uses org-global-tags-completion-table, which uses the function org-agenda-files, which uses the variable org-agenda-files. If the variable org-agenda-files is not set up correctly, a tags search and auto-completion of tags will not work correctly.

Another common issue arises when the variable org-tag-alist has not yet been properly set up -- here is a link to the manual page on that issue: http://www.orgmode.org/manual/Setting-tags.html

like image 167
lawlist Avatar answered Oct 20 '25 11:10

lawlist



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!