Hello, if you use magit mode for your git repositories and want to create/follow links to magit status buffers (showing the current branch) like this:
[[magit:/usr/local/emacs/org-mode/][/usr/local/emacs/org-mode/]] you may want to use this code snippet: --8<---------------cut here---------------start------------->8--- (defun org-magit-store-link () "Store a link to a directory to open with magit." (when (eq major-mode 'magit-mode) (let* ((dir default-directory) (link (org-make-link "magit:" dir)) (desc (abbreviate-file-name dir))) (org-store-link-props :type "magit" :link link :description desc) link))) (defun org-magit-open (dir) "Follow a magit link to DIR." (require 'magit) (magit-status dir)) (org-add-link-type "magit" 'org-magit-open nil) (add-hook 'org-store-link-functions 'org-magit-store-link) --8<---------------cut here---------------end--------------->8--- Greetings, Stephan _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode