>From 5d04e3a9404b2109751da6e43fba24a7cace00a8 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Fri, 16 Jun 2017 13:24:44 +0200 Subject: [PATCH] org-protocol: add option to surpress warning about old links --- lisp/org-protocol.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el index 825435674..531345b58 100644 --- a/lisp/org-protocol.el +++ b/lisp/org-protocol.el @@ -271,6 +271,10 @@ This should be a single regexp string." :package-version '(Org . "8.0") :type 'string) +(defvar org-protocol-warn-about-old-links t + "If non-nil (the default), issue a warning when org protocol +receives old style links.") + ;;; Helper functions: (defun org-protocol-sanitize-uri (uri) @@ -618,8 +622,9 @@ CLIENT is ignored." (if new-style (funcall func (org-protocol-parse-parameters result new-style)) - (warn "Please update your Org Protocol handler \ -to deal with new-style links.") + (when org-protocol-warn-about-old-links + (warn "Please update your Org Protocol handler \ +to deal with new-style links.\n You may set `org-protocol-warn-about-old-links' to nil to surpress this message.")) (funcall func result)))) ;; Greedy protocol handlers are responsible for ;; parsing their own filenames. -- 2.13.1