On 2014-10-15, at 12:19, Nicolas Goaziou wrote: > Hello, > > Marcin Borkowski <mb...@wmi.amu.edu.pl> 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)))
OK, it works, but: if the link description is empty, after this change it's still empty, so that it becomes the result of concatenation. I'd like the link description to stay the same, no matter whether it's empty or not. How do I set the /contents/ of a link object (as opposed to a property)? > Regards, Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University