From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Morgan Subject: Standard skipping conditions have no effect Date: Sun, 01 Jun 2014 19:21:01 -0400 Message-ID: <874n04usgy.fsf@azha.ziiuu.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrGcn-0003vE-7p for emacs-orgmode@gnu.org; Sun, 01 Jun 2014 21:01:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrGcf-0003S2-LZ for emacs-orgmode@gnu.org; Sun, 01 Jun 2014 21:01:17 -0400 Received: from mail-qg0-f47.google.com ([209.85.192.47]:56173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrGcf-0003Rw-Is for emacs-orgmode@gnu.org; Sun, 01 Jun 2014 21:01:09 -0400 Received: by mail-qg0-f47.google.com with SMTP id j107so9693721qga.34 for ; Sun, 01 Jun 2014 18:01:09 -0700 (PDT) Received: from azha.ziiuu.com (cpe-68-173-37-126.nyc.res.rr.com. [68.173.37.126]) by mx.google.com with ESMTPSA id c101sm7365231qge.14.2014.06.01.18.01.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Jun 2014 18:01:08 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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