From 05b75094153c05ca9002d8660fb7f5544dd75134 Mon Sep 17 00:00:00 2001 From: "Prof. Jayanth R Varma" Date: Mon, 18 Jun 2018 13:19:32 +0530 Subject: [PATCH] Use org mode 9 org-link-set-parameters Org 9 changed the way new link types are defined. This patch updates org-notmuch to use the new `org-link-set-parameters` function. Old style does not work anymore --- contrib/lisp/org-notmuch.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/contrib/lisp/org-notmuch.el b/contrib/lisp/org-notmuch.el index 0affd71cb..8823383dd 100644 --- a/contrib/lisp/org-notmuch.el +++ b/contrib/lisp/org-notmuch.el @@ -44,8 +44,10 @@ (require 'org) ;; Install the link type -(org-add-link-type "notmuch" 'org-notmuch-open) -(add-hook 'org-store-link-functions 'org-notmuch-store-link) +(org-link-set-parameters + "notmuch" + :follow 'org-notmuch-open + :store 'org-notmuch-store-link) (defun org-notmuch-store-link () "Store a link to a notmuch search or message." @@ -76,8 +78,10 @@ Can link to more than one message, if so all matching messages are shown." -(org-add-link-type "notmuch-search" 'org-notmuch-search-open) -(add-hook 'org-store-link-functions 'org-notmuch-search-store-link) +(org-link-set-parameters + "notmuch-search" + :follow 'org-notmuch-search-open + :store 'org-notmuch-search-store-link) (defun org-notmuch-search-store-link () "Store a link to a notmuch search or message."