Hello, Org mode hackers, Here is a recipe for a bug on the maint branch that causes standard skipping conditions to have no effect.
1. Change the load path setting in `setup.el'. 2. Start Emacs with `emacs -Q -l setup.el'. 3. Customize the agenda commands with `M-x org-agenda C'. 4. Add a new command, change the match field to tag `foo', and add a standard skipping condition for TODO states, so that the command looks like this in the customization buffer: ,---- | INS DEL Choice: Value Menu Single command: | Access Key(s) : x | [X] Description: Describe command here | Choice: Value Menu Tags/Property match (all agenda files) | Match (only for some commands): foo | Local settings for this command. Remember to quote values: | INS DEL Setting: Value Menu Standard skipping condition: | org-agenda-skip-function | List: | List: | Skipping range: Value Menu Skip entry | Conditions for skipping: | INS DEL Condition type: Value Menu TODO state is: | todo | Choice: Value Menu any not-done state | INS | INS | [ ] Export: | INS `---- 5. Type `M-x org-agenda x'. The resulting agenda view looks like this: ,---- | Headlines with TAGS match: foo | Press `C-u r' to search again with new search string | test-case: TODO Buckle my shoe :foo: `---- I expected the TODO item to be filtered out. This is the value of `org-agenda-custom-commands': ,---- | (("x" "Describe command here" tags "foo" | ((org-agenda-skip-function | '(org-agenda-skip-entry-if todo todo)))) | ("n" "Agenda and all TODO's" | ((agenda "" nil) | (alltodo "" nil)) | nil)) `---- The problem seems to be that the arguments to `org-agenda-skip-entry-if' are unquoted. The following steps verify that. 6. Change `org-agenda-custom-commands', quoting the arguments to `org-agenda-skip-entry-if'. ,---- | (setq org-agenda-custom-commands | '(("x" "Describe command here" tags "foo" | ((org-agenda-skip-function | '(org-agenda-skip-entry-if 'todo 'todo)))) | ("n" "Agenda and all TODO's" | ((agenda "" nil) | (alltodo "" nil)) | nil))) `---- 7. Remake the custom agenda view with `M-x org-agenda x'. ,---- | Headlines with TAGS match: foo | Press `C-u r' to search again with new search string `---- As expected, the TODO item is filtered. Best, Thomas