Probably there is some more elegant way but if you run this on a link, you get the two pieces I think. In a filter or exporter, you might replace (org-element-context) with the link element/object
#+BEGIN_SRC emacs-lisp (defun parse-link () (interactive) (message-box "%s" (cons ;; path (org-element-property :path (org-element-context)) ;; description (buffer-substring (org-element-property :contents-begin (org-element-context)) (org-element-property :contents-end (org-element-context)))))) #+END_SRC Marcin Borkowski writes: > Hi all, > > so I have this: > > [[file:whatever.org][Some link]] > > How do I extract bith parts of this link programmatically? > > My use case is that I have an Org tree of links, and I want to export > them to certain XML format. > > TIA, -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu