[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] File local circular links
From: |
Michael Brand |
Subject: |
Re: [O] File local circular links |
Date: |
Fri, 4 Sep 2015 18:36:18 +0200 |
Hi Nicolas
On Thu, Sep 3, 2015 at 4:06 PM, Nicolas Goaziou <address@hidden> wrote:
> Can't you simply do
>
> (org-link-search ":file local circular link:" (point))
>
> ?
In my previous example the
(org-link-search "[[:file local circular link:]]" (point))
to get enough from the org-link-search argument AVOID-POS would work
to jump between the two links. But when the second link is in a
headline
-------------------------------------
[[:file local circular link:]]
some text
* [[:file local circular link:]]
-------------------------------------
the second link jumps only to itself with the new org-link-search. I
understand that this is desired behavior because the headline gets
priority over the target on line 1. Before your change the target on
line 1 was the match when following the link on line 3, which was a
bug that I wrongly relied on to jump backwards. My conclusion is that
org-link-search is the wrong function for my purpose and I will have
to implement something with re-search-forward on my own.
> You could also use target-links
My main requirement is that the link has to be also the target, not a
link and a target side by side. How could that be fulfilled with
target-links?
Michael