Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Org-mode: embed links to info files

I maintain a diary (internal blog containing thoughts to remember) in org-mode, and sometimes, as i study Emacs, i store learned skills and tricks with references to info files.

Currently i do the following. I open the needed info file, press c to copy current node name, press < s TAB - that is an easy template which unwraps into a src-block. Then i add lisp expression and paste node name and finally the link looks like this:

#+begin_src emacs-lisp
(info "(org) Properties and Columns")
#+end_src

When i need to view the info file, i put cursor after lisp sexp and press C-x C-e (eval-last-sexp).

This process is tedious and inelegant. What is the best way to embed links to info files in org-mode?

Edit: I've found how one can add links to info nodes. Org-mode manual on External links describes these equivalent methods using links:

[[info:org#Tags]]
[[elisp:(info "(org) Tags")]]

With the first variant i'm not sure how to automatically transform (org) Tags in org#Tags. How can i further simplify this process?

like image 954
Mirzhan Irkegulov Avatar asked May 04 '12 08:05

Mirzhan Irkegulov


People also ask

How do you add a link in Org mode?

Links in Org are plain text, and you can type or paste them straight into the buffer. By using this command, the links are automatically enclosed in double brackets, and you will be asked for the optional descriptive text.

How do I make a link directly to a file?

Create a hyperlink to a file on your computerSelect the text or picture that you want to display as a hyperlink. Press Ctrl+K. Under Link to, do one of the following: To link to an existing file, click Existing File or Web Page under Link to, and then find the file in the Look in list or the Current Folder list.

Why is ORG mode so great?

Org mode is routinely used to build and manage complex workflows. It does this using an elegantly simple syntax that scales from basic markup to full LaTeX typesetting and from plain text notes to literate programs. Everything you need to get started is demonstrated in the example.

What can Org mode do?

Org Mode offers the ability to insert source code in the document being edited, which is automatically exported and/or executed when exporting the document; the result(s) produced by this code can be automatically fetched back in the resulting output.


1 Answers

You do it as in any of the supported link types (see the "Handling links" section in the manual). In the info file, you say M-x org-store-link, (bind it to C-c l as suggested in the manual) and then in your org file, you insert the link with C-c C-l. There you just have to select the link to your info file from the list of stored links.

like image 93
rvf0068 Avatar answered Oct 04 '22 02:10

rvf0068