diff options
Diffstat (limited to 'lisp/org/org-protocol.el')
-rw-r--r-- | lisp/org/org-protocol.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index 59f08f1dfa2..1b32f515f79 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el @@ -9,7 +9,7 @@ ;; Author: Ross Patterson <me AT rpatterson DOT net> ;; Maintainer: Sebastian Rose <sebastian_rose AT gmx DOT de> ;; Keywords: org, emacsclient, wp -;; Version: 6.33x +;; Version: 6.35i ;; This file is part of GNU Emacs. ;; @@ -470,9 +470,10 @@ Now template ?b will be used." (url (org-protocol-sanitize-uri (car parts))) (type (if (string-match "^\\([a-z]+\\):" url) (match-string 1 url))) - (title (cadr parts)) - (region (caddr parts)) - (orglink (org-make-link-string url title)) + (title (or (cadr parts) "")) + (region (or (caddr parts) "")) + (orglink (org-make-link-string + url (if (string-match "[^[:space:]]" title) title url))) remember-annotation-functions) (setq org-stored-links (cons (list url title) org-stored-links)) |