Here is a simple file:

#+TAGS: math(m) music(u)

* Gödel :math:
* Bach :music:
* Gauss :math:
* Beethoven :music:
* Mozart :music:

Then I tried M-x org-tags-view

Match: +math

I expected that Gödel and Gauss will be printed, but instead I get an empty buffer that says:

Headlines with TAGS match: +math
Press ‘C-u r’ to search again with new search string

What's wrong?

1 Answer 1


org-tags-view shows matches in all agenda files: you have to add this file to your agenda files (at least temporarily). You can do that with C-c[: that adds it to the front of the list of agenda files (i.e. to the variable org-agenda-files). You can later delete it from the list if you want with C-c] (i.e., this will remove the file you're visiting from org-agenda-files). But while it's on the list, you can search for tags with org-tags-view.

  • How to do this using all buffers in a specific directory? Mar 16, 2022 at 6:56
  • @EmmanuelGoldstein You can add a directory to org-agenda-files. For that, Org will search files that match org-agenda-file-regexp (try to look at their docstrings with C-h v) Sep 2, 2022 at 11:14
  • Is it possible to use org-tags-view for the current buffer that is in the window?
    – alper
    Apr 21, 2023 at 15:53
  • You can let-bind org-agenda-files to the current file around a call to org-tags-view.
    – NickD
    Apr 21, 2023 at 16:02

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.