From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
To: Thorsten Jolitz <tjolitz@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Possible regexp bug in org.el
Date: Tue, 01 Apr 2014 12:16:49 +0200 [thread overview]
Message-ID: <878urp1him.fsf@yahoo.fr> (raw)
In-Reply-To: <87ob0lmlg2.fsf@gmail.com> (Thorsten Jolitz's message of "Tue, 01 Apr 2014 11:46:21 +0200")
Thorsten Jolitz <tjolitz@gmail.com> writes:
> here is a possible regexp bug in org.el I discovered by accident:
>
> ,---------------------------------------------
> | 7734: (and (not (looking-back "^\*+"))
> `---------------------------------------------
It's almost certainly a typo, but it introduces no bug because '*' can't
bear its special meaning after '^', so the regexp engine will make it
match exactly the '*' character. But it'd be better written as "^*+"
(but this is not recommended) or, preferably, "^\\*+" indeed.
Here's the relevant manual excerpt from (info "(elisp) Regexp Special") :
> *Please note:* For historical compatibility, special characters are
> treated as ordinary ones if they are in contexts where their special
> meanings make no sense. For example, `*foo' treats `*' as ordinary
> since there is no preceding expression on which the `*' can act. It is
> poor practice to depend on this behavior; quote the special character
> anyway, regardless of where it appears.
--
Nico.
next prev parent reply other threads:[~2014-04-01 10:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-01 9:46 Possible regexp bug in org.el Thorsten Jolitz
2014-04-01 10:16 ` Nicolas Richard [this message]
2014-04-16 16:28 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878urp1him.fsf@yahoo.fr \
--to=theonewiththeevillook@yahoo.fr \
--cc=emacs-orgmode@gnu.org \
--cc=tjolitz@gmail.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.