1

In org-mode, I want to make an agenda view showing all notes tagged with "NOTE" or "LOGG". The following code does not produce the result I want:

(setq org-agenda-custom-commands '(("o" "NOTES" tags "+NOTE+LOGG")))

This code will sort out all notes tagged with both NOTE and LOGG.

How can I change my code to filter out notes containing either NOTE or LOGG?

4

The OR operator is "|". Searching for NOTE|LOGG will find entries with the NOTE tag OR the LOGG tag.

There is a list of all the available options on the advanced searching page of the manual. The basic operations are:

| or 
& and 
+ include matches 
- exclude matches 

OR always comes last in the order of operations.

Regular expression searches are also possible using {}. A search for +{NOTE\\|LOGG} will also find entries with NOTE OR LOGG.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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