emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to change a link?


From: Nicolas Goaziou
Subject: Re: [O] How to change a link?
Date: Wed, 15 Oct 2014 12:19:08 +0200

Hello,

Marcin Borkowski <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]