emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Fix org-agenda-skip-if bug
Date: Fri, 16 Mar 2012 19:16:28 +0100	[thread overview]
Message-ID: <87aa3gqtf6.fsf@altern.org> (raw)
In-Reply-To: <20120212210639.GA19747@c3po.home> (Toby Cubitt's message of "Sun, 12 Feb 2012 22:06:39 +0100")

Hi Toby,

Toby Cubitt <tsc25@cantab.net> writes:

> There appears to be a bug in how org-agenda-skip-if parses the list of
> CONDITIONS supplied to it.

Applied, thanks.  

> The combination '(nottodo todo) is a valid condition, matching todo items
> whose state isn't a todo-type keyword (according to the keyword types
> defined in `org-todo-keywords'). But `org-agenda-skip-if' tests first for
> conditions of the form '(todo x) using (memq 'todo conditions), which
> mistakenly picks up '(nottodo todo) as well.
>
> Simply reversing the order of the memq tests for 'todo and 'nottodo fixes
> this particular case, which is what the attached patch does.

Thanks for the explanations.

> Note that there's still a slightly different issue with combinations of
> multiple todo tests, which this patch does not fix. The docstring
> suggests that CONDITIONS is allowed to be a list of multiple
> tests. E.g. '(nottodo CANCELLED todo done) should match any done state
> except CANCELLED. But, faced with this combination,
> `organ-agenda-skip-if' will only apply the first '(nottodo CANCELLED)
> test, and ignores the second.
>
> However, it's not clear to me whether this is a problem with the code or
> the docstring. Perhaps it was never intended to support combinations of
> multiple todo tests.

I don't know.  If someone can digg this issue further and report what
should be fixed, that'd help.

Thanks!

-- 
 Bastien

      reply	other threads:[~2012-03-16 18:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-12 21:06 Toby Cubitt
2012-03-16 18:16 ` Bastien [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87aa3gqtf6.fsf@altern.org \
    --to=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: [PATCH] Fix org-agenda-skip-if bug' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).