Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a package or setting to show an org-mode link (under cursor) destination in the modeline or other area of Emacs window?

Tags:

emacs

org-mode

Is there a package or setting to show an org-mode link (under cursor - without using the mouse) destination in the modeline or other area of Emacs window? It would be nice to have instead of doing C-c C-l to look at it each time.

like image 692
Joe Avatar asked May 18 '15 20:05

Joe


People also ask

How do I turn on Org Mode in Emacs?

Emacs does not actually understand you are editing an Org document, yet. To enable Org mode on your current document, type M-x org-mode which will enable the Org mode on the current document.

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.

What is ORG mode doom Emacs?

Org is a system for writing plain text notes with syntax highlighting, code execution, task scheduling, agenda management, and many more. The whole idea is that you can write notes and mix them with references to things like articles, images, and example code combined with the output of that code after it is executed.

What does Org mode do?

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.


1 Answers

Try this:

(defun link-message () 
  (let ((object (org-element-context)))
    (when (eq (car object) 'link)
      (message "%s"
           (org-element-property :raw-link object)))))

(add-hook 'post-command-hook 'link-message)
like image 129
John Kitchin Avatar answered Oct 01 '22 16:10

John Kitchin