How to make org syntax links in any emacs buffer look like in org-mode?

痴心易碎 提交于 2019-12-01 15:27:22

问题


I am using emacs org-mode for managing my notes. Often I wish to use links to this notes from files, which I am editing in other modes, like AUCTeX.

See here for a descriptive screenshot. (I am not yet allowed to post images here.)

Storing and following this links works pretty well. But I find it disturbing to read the full org syntax of the links: [[file:notes.org::*note][Description]], which is obviously not folded outside of org-mode.

I wonder if there is any minor-mode which provides the folding of such links to a clickable Description, like it is done in org-mode.


回答1:


You can use links outside Org-mode.

4.5 Using links outside Org

You can insert and follow links that have Org syntax not only in Org, but in any Emacs buffer. For this, you should create two global commands, like this (please select suitable global keys yourself):

(global-set-key "\C-c L" 'org-insert-link-global)
(global-set-key "\C-c o" 'org-open-at-point-global)

-- Source: Using-links-outside-Org

Edit (1 Nov 2012): As of October 2011 the minor mode enabling org-like links didn't exist, but there were discussions. Now the minor mode exists, it is called org-link-minor-mode and is included in org-contrib.




回答2:


I think the standard answer would be to use the publishing methods within org-mode to publish to a different file type, and link to that instead. Publishing, once set up, is really easy and fast to use and can produce things like html files that you could safely link to from something else (that is hopefully HTML compliant). Since you didn't say what the other-thing(s) is that you're using it's hard to recommend a good publishing output.



来源:https://stackoverflow.com/questions/5166608/how-to-make-org-syntax-links-in-any-emacs-buffer-look-like-in-org-mode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!