Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

customized links in the org mode

Tags:

emacs

org-mode

I use org mode to store shortcuts for my projects. Such org files contain mostly links which I create using org-insert-link. But sometimes the simple link is not sufficient so I have to use lisp functions. This works fine but it does not look very nice.

enter image description here

Is there a way to create a link which would call a lisp function?

like image 667
Oleg Pavliv Avatar asked Feb 18 '11 09:02

Oleg Pavliv


1 Answers

you can define new "link types" in org-mode with the function org-add-link-type to which you tell what elisp function you want to call for a particular protocol. So, in your case, you could define new protocols for "http-ie" and "load-xml-dirs" and write wrapper functions to process the parameters right. Then you would write your links as normal org links, but with a protocol prefix.

The example from the documentation page is quite straightforward I guess, let me know if it's not enough.

like image 80
Mortimer Avatar answered Sep 30 '22 12:09

Mortimer