Marcin Borkowski <mb...@wmi.amu.edu.pl> writes: > 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.)
[[http:www.orgmode.org][Org-mode]] #+BEGIN_SRC emacs-lisp :results raw (save-excursion (re-search-backward org-link-re-with-space) (goto-char (match-beginning 0)) (org-dp-contents (org-element-at-point))) #+END_SRC #+results: ((link (:type "http" :path "www.orgmode.org" :raw-link "http:www.orgmode.org" :application nil :search-option nil :begin 609 :end 643 :contents-begin 633 :contents-end 641 :post-blank 0 :parent ...))) so these ,---- | :type "http" :path "www.orgmode.org" :raw-link "http:www.orgmode.org" `---- are your candidates for getting and setting with 'org-element-property' and 'org-element-put-property'. -- cheers, Thorsten