From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: How to change a link? Date: Wed, 15 Oct 2014 02:19:58 +0200 Message-ID: <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]:35749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeCKD-0002kz-Mn for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 20:20:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeCK7-0007uh-PN for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 20:20:21 -0400 Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:38261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeCK7-0007t5-B6 for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 20:20:15 -0400 Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id C16335B86B for ; Wed, 15 Oct 2014 02:20:12 +0200 (CEST) Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zr6ZG86tGzu5 for ; Wed, 15 Oct 2014 02:20:12 +0200 (CEST) Received: from localhost (99-229.echostar.pl [213.156.99.229]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id 8A2CF400BC for ; Wed, 15 Oct 2014 02:20:12 +0200 (CEST) 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 List Hi list, 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 2. if it is, change it so that it points to the analogous place in another file. Any hints about how to do these things? (The rationale is that I'm writing a function which splits a single Org file into a bunch of smaller ones, and I want to preserve links.) Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University