diff options
author | Nicolas Richard <theonewiththeevillook@yahoo.fr> | 2015-02-27 13:16:36 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-02-28 00:51:35 +0100 |
commit | f8731eaeec6cfab0ca65cea6c1ef4ed79982031c (patch) | |
tree | 8f61844944720e076899907e09b65e7bd19b6f53 | |
parent | 18685d98527e0479b8108cac420b23d481fd5bfd (diff) | |
download | org-mode-f8731eaeec6cfab0ca65cea6c1ef4ed79982031c.tar.gz |
org-agenda: Nicer error message when accessing killed buffer
* lisp/org-agenda.el (org-agenda-switch-to): Throw an error if marker
points to no buffer.
-rw-r--r-- | lisp/org-agenda.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 29313a1..b0e1224 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -8583,6 +8583,7 @@ It also looks at the text of the entry itself." (org-agenda-error))) (buffer (marker-buffer marker)) (pos (marker-position marker))) + (unless buffer (user-error "Trying to switch to non-existent buffer")) (org-pop-to-buffer-same-window buffer) (and delete-other-windows (delete-other-windows)) (widen) |