diff options
author | Leo <sdl.web@gmail.com> | 2011-10-21 00:56:31 +0000 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2011-10-21 10:09:40 +0200 |
commit | 5e67e9d8246da0bccdb8619ff1fe7b47ab6ea8ef (patch) | |
tree | 03f7d8c22978d2e2dd5d55f29ea9080aeff16fcd | |
parent | 7caa7e1ff76e5a5b58f4146a76266258c3137f6c (diff) | |
download | org-mode-5e67e9d8246da0bccdb8619ff1fe7b47ab6ea8ef.tar.gz |
Check if marker is valid before use
* lisp/org-agenda.el (org-agenda-do-context-action): Check if marker
is valid before use.
-rw-r--r-- | lisp/org-agenda.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 3d89c63..cbe36af 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6784,13 +6784,13 @@ When called with a prefix argument, include all archive files as well." (defun org-agenda-do-context-action () "Show outline path and, maybe, follow mode window." (let ((m (org-get-at-bol 'org-marker))) - (if (and org-agenda-follow-mode m) - (if org-agenda-follow-indirect - (org-agenda-tree-to-indirect-buffer) - (org-agenda-show))) - (if (and m org-agenda-show-outline-path) - (org-with-point-at m - (org-display-outline-path t))))) + (when (and (markerp m) (marker-buffer m)) + (and org-agenda-follow-mode + (if org-agenda-follow-indirect + (org-agenda-tree-to-indirect-buffer) + (org-agenda-show))) + (and org-agenda-show-outline-path + (org-with-point-at m (org-display-outline-path t)))))) (defun org-agenda-show-priority () "Show the priority of the current item. |