Open obsidian links in org mode

I use Org Mode to manage my tasks but Obsidian to manage my research notes and writing. That often means I have an Obsidian link embedded in a .org file and I need to open it. Out of the box Org Mode has no idea what a link beginning with obsidian: means but with the code snippet below you can get Org Mode to open links directly to your Obsidian documents.

;; Recognize filetypes
;; Make obsidian:// links open via your default browser/handler
(after! org
  (org-link-set-parameters
   "obsidian"
   :follow (lambda (link)
             (browse-url (concat "obsidian:" link)))
   :help-echo "Open Obsidian link"))

Put this code in config.el then reload Emacs and you can open Obsidian links in Org Mode and go directly to the Obsidian file under your cursor.

0 responses to “How to Open Obsidian Links in Org Mode”

Leave a Reply

Your email address will not be published. Required fields are marked *

To respond on your own website, enter the URL of your response which should contain a link to this post’s permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post’s URL again. (Find out more about Webmentions.)