From 112ef17dec8aa7dfaba5d6ee0018d8fe3b6639e6 Mon Sep 17 00:00:00 2001 From: Allen Li Date: Tue, 11 Dec 2018 19:32:56 -0800 Subject: [PATCH] org-protocol: Don't corrupt org-stored-link if url is nil * lisp/org-protocol.el (org-protocol-do-capture): Handle nil case. --- lisp/org-protocol.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el index c0eb52c2b..81ab47698 100644 --- a/lisp/org-protocol.el +++ b/lisp/org-protocol.el @@ -503,8 +503,8 @@ Now template ?b will be used." url (if (string-match "[^[:space:]]" title) title url)) title)) (org-capture-link-is-already-stored t)) ;; avoid call to org-store-link - (setq org-stored-links - (cons (list url title) org-stored-links)) + (when url + (push (if (string= title "") (list url) (list url title)) org-stored-links)) (org-store-link-props :type type :link url :description title -- 2.20.0