[Orgmode] Re: Using org-agenda-filter-preset with or'd tags
David Maus dm...@ictsoc.de writes: At Mon, 20 Dec 2010 14:12:39 + (UTC), johnt wrote: I tried various filters to verify my syntax. using (org-agenda-filter-preset '(+...@work)) works fine but is not what I want. using (org-agenda-filter-preset '(@Work | critical)) also doesn't work. There are some errors in your `org-agenda-filter-preset': 1. You should not quote this list, because the entire structure of `org-agenda-custom-commands' is already quoted. Quoting a list works fine in my org-agenda-custom-commands settings. In fact, there are other variables that have quoted lists as their setting, such as org-agenda-entry-types. 2. Format of `org-agenda-filter-preset' (C-h v org-agenda-filter-preset RET): , | A preset of the tags filter used for secondary agenda filtering. | This must be a list of strings, each string must be a single tag preceded | by + or -. ` So (@work | critical) is wrong format. That's the problem. 3. The preset filter ANDs the tags together and as far as I am aware of (our could think of) it is not possible to OR tags together. However, I wonder why you would like to set the preset-filter: The tags-todo query already selects only tasks that are either tagged @work or critical? It would make sense if org-agenda-todo-ignore-scheduled is 'all or 'past. To use or logic to filter the agenda, I would recommend setting org-agenda-skip-function. --8---cut here---start-8--- (setq org-agenda-custom-commands '((W Work Schedule ((agenda ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp :\\(@Work\\|critical\\):))) (org-agenda-ndays 1))) (tags-todo @Work|critical) --8---cut here---end---8--- Best, Matt ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Using org-agenda-filter-preset with or'd tags
Matt Lundin m...@imapmail.org writes: To use or logic to filter the agenda, I would recommend setting org-agenda-skip-function. (setq org-agenda-custom-commands '((W Work Schedule ((agenda ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp :\\(@Work\\|critical\\):))) (org-agenda-ndays 1))) (tags-todo @Work|critical) The above contains a typo. It should read: (setq org-agenda-custom-commands '((W Work Schedule ((agenda ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp :\\(@Work\\|critical\\):)) (org-agenda-ndays 1))) (tags-todo @Work|critical) Best, Matt ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Using org-agenda-filter-preset with or'd tags
On Jan 11, 2011, at 2:20 PM, Matt Lundin wrote: David Maus dm...@ictsoc.de writes: At Mon, 20 Dec 2010 14:12:39 + (UTC), johnt wrote: I tried various filters to verify my syntax. using (org-agenda-filter-preset '(+...@work)) works fine but is not what I want. using (org-agenda-filter-preset '(@Work | critical)) also doesn't work. There are some errors in your `org-agenda-filter-preset': 1. You should not quote this list, because the entire structure of `org-agenda-custom-commands' is already quoted. Quoting a list works fine in my org-agenda-custom-commands settings. In fact, there are other variables that have quoted lists as their setting, such as org-agenda-entry-types. Yes. The way the variable settings are used when constructing the agenda views is actually causing evaluation of the values. So the quote is good here. - Carsten 2. Format of `org-agenda-filter-preset' (C-h v org-agenda-filter-preset RET): , | A preset of the tags filter used for secondary agenda filtering. | This must be a list of strings, each string must be a single tag preceded | by + or -. ` So (@work | critical) is wrong format. That's the problem. 3. The preset filter ANDs the tags together and as far as I am aware of (our could think of) it is not possible to OR tags together. However, I wonder why you would like to set the preset-filter: The tags-todo query already selects only tasks that are either tagged @work or critical? It would make sense if org-agenda-todo-ignore-scheduled is 'all or 'past. To use or logic to filter the agenda, I would recommend setting org-agenda-skip-function. --8---cut here---start-8--- (setq org-agenda-custom-commands '((W Work Schedule ((agenda ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp :\\(@Work\\|critical\\):))) (org-agenda-ndays 1))) (tags-todo @Work|critical) --8---cut here---end---8--- Best, Matt ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Using org-agenda-filter-preset with or'd tags
On Tue, Jan 11, 2011 at 08:22, Matt Lundin m...@imapmail.org wrote: Matt Lundin m...@imapmail.org writes: To use or logic to filter the agenda, I would recommend setting org-agenda-skip-function. (setq org-agenda-custom-commands '((W Work Schedule ((agenda ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp :\\(@Work\\|critical\\):))) (org-agenda-ndays 1))) (tags-todo @Work|critical) The above contains a typo. It should read: (setq org-agenda-custom-commands '((W Work Schedule ((agenda ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp :\\(@Work\\|critical\\):)) (org-agenda-ndays 1))) (tags-todo @Work|critical) Best, Matt Thanks for the suggestion. It did not completely work for me because the @Work tag was inherited. However I think I can change my process a little to make it work. John ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode