From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Resolve regexp ambiguity for item headers Date: Wed, 12 Sep 2012 16:49:43 +0200 Message-ID: <87627jthx4.fsf@gmail.com> References: <504DE922.1000707@oracle.com> <87ehm93fd7.fsf@gmail.com> <504E4118.3040700@oracle.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBoKA-0002Fd-83 for emacs-orgmode@gnu.org; Wed, 12 Sep 2012 10:54:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBoK4-0002f3-DN for emacs-orgmode@gnu.org; Wed, 12 Sep 2012 10:53:54 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:54916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBoK4-0002eo-61 for emacs-orgmode@gnu.org; Wed, 12 Sep 2012 10:53:48 -0400 Received: by wibhq4 with SMTP id hq4so4365512wib.12 for ; Wed, 12 Sep 2012 07:53:47 -0700 (PDT) In-Reply-To: <504E4118.3040700@oracle.com> (Mats Kindahl's message of "Mon, 10 Sep 2012 21:35:52 +0200") 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: Mats Kindahl Cc: emacs-orgmode Hello, > Well... the most important point for me is that it shouldn't choke on > these lines, but otherwise I'm open to suggestions. In your case, I think that the problem really comes from a bad case matching: if SUBMITTED is a keyword, "** Submitted" shouldn't be matched. IOW, todo keywords are/ought to be case sensitive. > My rationale for doing it this way was: > > * The code I looked at assumes that the headline text is there, so > it's likely that it's the common assumption. > * It is clearly the case that todo keywords are optional. > * It is not so clear that the headline text is optional >From my point of view everything is optional but todo keywords and tags bind stronger than headline's text. I.e. ** TODO :work: is an empty headline with a TODO keyword and a "work" tag. > However: > > * The regular expression matches completely empty headlines, so maybe > the intention is to allow matching items with just a todo keyword? Yes, it is. Note that I'm not convinced by empty headlines nor do I use them, but as an outliner, Org should accept them nonetheless. The question is: how much of the code base shares this opinion? Regards, -- Nicolas Goaziou