From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: File local circular links Date: Fri, 4 Sep 2015 18:36:18 +0200 Message-ID: References: <87mvx3mwc4.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXtyU-0007pG-Ig for emacs-orgmode@gnu.org; Fri, 04 Sep 2015 12:36:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXtyO-0001f7-M8 for emacs-orgmode@gnu.org; Fri, 04 Sep 2015 12:36:26 -0400 Received: from mail-vk0-x22d.google.com ([2607:f8b0:400c:c05::22d]:34941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXtyO-0001f0-GV for emacs-orgmode@gnu.org; Fri, 04 Sep 2015 12:36:20 -0400 Received: by vkaw128 with SMTP id w128so14543181vka.2 for ; Fri, 04 Sep 2015 09:36:18 -0700 (PDT) In-Reply-To: <87mvx3mwc4.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode Hi Nicolas On Thu, Sep 3, 2015 at 4:06 PM, Nicolas Goaziou 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