0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 14:46:27 +00:00

Better error message when selecting empty link

This commit is contained in:
Carsten Dominik 2009-11-26 07:14:49 +01:00
parent c98716af61
commit a50243cdc4
2 changed files with 5 additions and 0 deletions

View file

@ -1,5 +1,8 @@
2009-11-26 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-insert-link): Improve error message when there is no
default link to select with RET.
* org-agenda.el (org-agenda-filter-by-tag): Use char argument from
parameter list.

View file

@ -7926,6 +7926,8 @@ Use TAB to complete link prefixes, then RET for type-specific completion support
nil nil nil
'tmphist
(car (car org-stored-links)))))
(if (not (string-match "\\S-" link))
(error "No link selected"))
(if (or (member link all-prefixes)
(and (equal ":" (substring link -1))
(member (substring link 0 -1) all-prefixes)