Преглед на файлове

Update notmuch and notmuch-search link definitions

* contrib/lisp/org-notmuch.el ("notmuch"):

Update to use org-link-set-parameters.
Robert Klein преди 8 години
родител
ревизия
3f2a03dad6
променени са 1 файла, в които са добавени 6 реда и са изтрити 4 реда
  1. 6 4
      contrib/lisp/org-notmuch.el

+ 6 - 4
contrib/lisp/org-notmuch.el

@@ -65,8 +65,9 @@ Should accept a notmuch search string as the sole argument."
 
 
 ;; 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."
@@ -98,8 +99,9 @@ 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."