Search code examples
emacsorg-mode

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


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.


Solution

  • 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)