summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-12-31 08:11:55 (GMT)
committer Bastien Guerry <bzg@altern.org>2012-12-31 08:29:14 (GMT)
commit8897a53ff414a85eadc9d7e94ea1f248278b47e6 (patch)
treefe4ba9962d78d94e8bfa23d0ba397c1ae98c6ff7
parente8aaca4de65a81f02fe60eb6855024cbf6590390 (diff)
downloadorg-mode-8897a53ff414a85eadc9d7e94ea1f248278b47e6.zip
org-mode-8897a53ff414a85eadc9d7e94ea1f248278b47e6.tar.gz
org-agenda.el (org-agenda-open-link): Fix bug when no link is matched
* org-agenda.el (org-agenda-open-link): Fix bug when no link is matched. Return a message instead of an error.
-rw-r--r--lisp/org-agenda.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index b076dbd..8d56732 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7906,7 +7906,7 @@ It also looks at the text of the entry itself."
(lkend (cdr lkall))
trg)
(cond
- (buffer
+ ((and buffer (stringp lk))
(with-current-buffer buffer
(setq trg (and (string-match org-bracket-link-regexp lk)
(match-string 1 lk)))
@@ -7930,7 +7930,7 @@ It also looks at the text of the entry itself."
(beginning-of-line 1)
(looking-at (concat ".*?\\(" org-bracket-link-regexp "\\)"))))
(org-open-link-from-string (match-string 1)))
- (t (error "No link to open here")))))
+ (t (message "No link to open here")))))
(defun org-agenda-copy-local-variable (var)
"Get a variable from a referenced buffer and install it here."