emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Mats Kindahl <mats.kindahl@oracle.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Resolve regexp ambiguity for item headers
Date: Wed, 12 Sep 2012 16:49:43 +0200	[thread overview]
Message-ID: <87627jthx4.fsf@gmail.com> (raw)
In-Reply-To: <504E4118.3040700@oracle.com> (Mats Kindahl's message of "Mon, 10 Sep 2012 21:35:52 +0200")

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

  reply	other threads:[~2012-09-12 14:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-10 13:20 [PATCH] Resolve regexp ambiguity for item headers Mats Kindahl
2012-09-10 18:24 ` Nicolas Goaziou
2012-09-10 19:35   ` Mats Kindahl
2012-09-12 14:49     ` Nicolas Goaziou [this message]
2012-09-19  9:14       ` Bastien
2012-09-19  9:19         ` Mats Kindahl
2012-09-19 13:58           ` Nicolas Goaziou
2012-09-19 16:51             ` Bastien
2012-09-19 18:14               ` Nick Dokos
2012-09-21  8:56                 ` Bastien

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=87627jthx4.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mats.kindahl@oracle.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).