emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Check marker is valid before use
@ 2011-10-20 19:56 Leo
  2011-10-21  8:09 ` [Accepted] " Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Leo @ 2011-10-20 19:56 UTC (permalink / raw)
  To: emacs-orgmode

 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 bf03b68c..f4b8bcbf 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6784,13 +6784,13 @@ (defun org-agenda-previous-line ()
 (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.
-- 
1.7.7

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-31 13:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-20 19:56 [PATCH] Check marker is valid before use Leo
2011-10-21  8:09 ` [Accepted] " Carsten Dominik
2011-10-31 13:43   ` Leo

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).