emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Toby Cubitt <tsc25@cantab.net>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: [PATCH] Fix bug in org-agenda-diary-sexp-prefix
Date: Fri, 26 Oct 2012 14:27:59 +0200	[thread overview]
Message-ID: <20121026122759.GA9074@c3po> (raw)

[-- Attachment #1: Type: text/plain, Size: 263 bytes --]

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: tsc25@cantab.net
web:   www.dr-qubit.org

[-- Attachment #2: 0001-Fix-bug-in-org-agenda-diary-sexp-prefix.patch --]
[-- Type: text/x-patch, Size: 1013 bytes --]

From b777c7ca29c74476893dd62599c344c0ff5998e6 Mon Sep 17 00:00:00 2001
From: "Toby S. Cubitt" <tsc25@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	other threads:[~2012-10-26 12:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-26 12:27 Toby Cubitt [this message]
2012-10-26 12:46 ` [PATCH] Fix bug in org-agenda-diary-sexp-prefix Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121026122759.GA9074@c3po \
    --to=tsc25@cantab.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=toby-dated-1352464070.9e210b@dr-qubit.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).