The commit message in the attached patch explains the problem, and the
simple fix.

Toby
-- 
Dr T. S. Cubitt
Mathematics and Quantum Information group
Department of Mathematics
Complutense University
Madrid, Spain

email: ts...@cantab.net
web:   www.dr-qubit.org
>From b777c7ca29c74476893dd62599c344c0ff5998e6 Mon Sep 17 00:00:00 2001
From: "Toby S. Cubitt" <ts...@cantab.net>
Date: Fri, 26 Oct 2012 14:06:28 +0200
Subject: [PATCH] Fix bug in org-agenda-diary-sexp-prefix

* lisp/org-agenda.el (org-agenda-get-sexps): reset `extra' to nil at
beginning of re-search-forward loop, otherwise next iteration picks up
`extra' value from previous entry.
---
 lisp/org-agenda.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index b9588bb..a2ed3b6 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5482,7 +5482,8 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
 		tags (save-excursion (org-backward-heading-same-level 0)
 				     (org-get-tags-at))
 		todo-state (org-get-todo-state)
-		warntime (org-entry-get (point) "APPT_WARNTIME"))
+		warntime (org-entry-get (point) "APPT_WARNTIME")
+		extra nil)
 
 	  (dolist (r (if (stringp result)
 			 (list result)
-- 
1.7.8.6

Reply via email to