Thorsten Jolitz <tjol...@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.