For the upcoming org-mode version 9 org-add-link-type is obsolete, so if org-link-set-parameters is bound we will use that instead.

This commit is contained in:
Klaus Holst 2016-09-04 14:12:53 +02:00
parent a49ccf4ff0
commit 9f5a2da5b5
1 changed files with 8 additions and 0 deletions

View File

@ -120,6 +120,14 @@ Example usage:
(org-add-link-type "mu4e" 'org-mu4e-open)
(add-hook 'org-store-link-functions 'org-mu4e-store-link)
;; org-add-link-type is obsolete as of org-mode 9.
;; Instead we will use the org-link-set-parameters method
(if (fboundp 'org-link-set-parameters)
(org-link-set-parameters "mu4e"
:follow #'org-mu4e-open
:store #'org-mu4e-store-link))
(defun org-mu4e-open (path)
"Open the mu4e message (for paths starting with 'msgid:') or run
the query (for paths starting with 'query:')."