开发者

customized links in the org mode

开发者 https://www.devze.com 2023-02-12 01:38 出处:网络
I use org mode to store shortcuts for my projects. Such org files contain mostly links which I create using org-insert-link. But somet开发者_运维技巧imes the simple link is not sufficient so I have to

I use org mode to store shortcuts for my projects. Such org files contain mostly links which I create using org-insert-link. But somet开发者_运维技巧imes the simple link is not sufficient so I have to use lisp functions. This works fine but it does not look very nice.

customized links in the org mode

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消