Do not allow a link description that is entirely white

This commit is contained in:
Carsten Dominik 2009-11-20 06:47:39 +01:00
parent 764dc91fe3
commit 4824387e1c
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2009-11-20 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-make-link-string): Don't allow a description with
only white space.
2009-11-19 Carsten Dominik <carsten.dominik@gmail.com>
* org-agenda.el (org-agenda-insert-diary-strategy): New variable.

View File

@ -7709,6 +7709,10 @@ according to FMT (default from `org-email-link-description-format')."
"Make a link with brackets, consisting of LINK and DESCRIPTION."
(unless (string-match "\\S-" link)
(error "Empty link"))
(when (and description
(stringp description)
(not (string-match "\\S-" description)))
(setq description nil))
(when (stringp description)
;; Remove brackets from the description, they are fatal.
(while (string-match "\\[" description)