emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] canonical way to go beginning of a link


From: Haustedt, Jens
Subject: Re: [O] canonical way to go beginning of a link
Date: Wed, 6 Jul 2016 10:49:46 +0000

> but in things like font-lock it seems slow compared to a
> regexp. I have not found a reliable regexp approach though. say
> I want to search back for "cite:" with point at the ^ position
> below:

> some text cite:a-key
>             ^

> If I run (re-search-backward "cite:") at the point above, it does not go to 
> the point 2 characters back.

> Any ideas?

Given this setting:

some more text cite:a-key some text cite:a-key
                                      ^
When you run (re-search-backward "cite:") at the point above, the result is as 
follows:

some more text cite:a-key some text cite:a-key
               ^

This is exactly what I expected it to act.  In your example
above, the whole search pattern could not be found in ist entirety from
the indicated point on, so it could not be found at all and point
is not moved.

Maybe it is a good idea to move point forward for at least count
of chars in search pattern before the search executes?

Greets, Jens Haustedt





reply via email to

[Prev in Thread] Current Thread [Next in Thread]