From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: How to change a link? Date: Wed, 15 Oct 2014 12:19:08 +0200 Message-ID: <87bnpd4ov7.fsf@nicolasgoaziou.fr> References: <87a94yjia9.fsf@wmi.amu.edu.pl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeLf9-0006Fb-07 for emacs-orgmode@gnu.org; Wed, 15 Oct 2014 06:18:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeLex-0001Fq-Jn for emacs-orgmode@gnu.org; Wed, 15 Oct 2014 06:18:34 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:53281) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeLex-0001FQ-Eh for emacs-orgmode@gnu.org; Wed, 15 Oct 2014 06:18:23 -0400 In-Reply-To: <87a94yjia9.fsf@wmi.amu.edu.pl> (Marcin Borkowski's message of "Wed, 15 Oct 2014 02:19:58 +0200") 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: Marcin Borkowski Cc: org-mode List Hello, Marcin Borkowski writes: > assume that I have a link object (e.g., I'm in the ellipsis part of > this: > > (org-element-map (org-element-parse-buffer 'object) 'link > (lambda (elt) ... )) > > What I want to do is this: > 1. check whether it is an internal link, and (member (org-element-property :type elt) '("custom-id" "fuzzy")) > 2. if it is, change it so that it points to the analogous place in > another file. (org-element-put-property elt :raw-link (concat "file:path/to/other-file.org::" (org-element-property :path elt))) Untested. Regards, -- Nicolas Goaziou