From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Patch for bug in adjusting time ranges in Agenda Date: Sun, 16 Oct 2011 12:43:42 -0400 Message-ID: <31715.1318783422@alphaville.dokosmarshall.org> References: <87obxzitcv.fsf@gmail.com> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFToS-0006Td-7Y for emacs-orgmode@gnu.org; Sun, 16 Oct 2011 12:43:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFToQ-00031l-Mv for emacs-orgmode@gnu.org; Sun, 16 Oct 2011 12:43:48 -0400 Received: from g4t0015.houston.hp.com ([15.201.24.18]:6304) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFToQ-00031Q-Hv for emacs-orgmode@gnu.org; Sun, 16 Oct 2011 12:43:46 -0400 In-Reply-To: Message from Niels Giesen of "Sun\, 16 Oct 2011 18\:27\:15 +0200." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Niels Giesen Cc: nicholas.dokos@hp.com, Orgmode Niels Giesen wrote: > *bump* >=20 > Has this one slipped through (as I were posting two other patches round t= he same date, one also > having to do with date/time ranges in the agenda -- which were both accep= ted), or am I just > impatient? >=20 I tried to check patchwork (http://patchwork.newartisans.com/project/org-mo= de/) but the server seems to be having problems right now. However, that's the f= irst place to check when it comes back: if it's there, somebody will get to it s= ooner or later. Nick > On Sun, Oct 2, 2011 at 12:24 PM, Niels Giesen wr= ote: >=20 > Hi Orgers, >=20=20=20=20 > The discussion in the recent thread "Time range end in agenda view not > displayed" prompted me to take a closer look at time/date ranges in t= he > Agenda view. I noticed that the commands `org-agenda-do-date-later' a= nd > `org-agenda-do-date-earlier' do not work correctly on timestamp range= s, > in that they only shift the rightmost timestamp in the range. The pat= ch > below should fix this. >=20=20=20=20 > #+begin_src diff > =C2=A0From 2e6b64dc8dcae0fd312729af96ab10d8d2e9d91b Mon Sep 17 00:00:= 00 2001 > =C2=A0From: Niels Giesen > =C2=A0Date: Sun, 2 Oct 2011 09:15:21 +0200 > =C2=A0Subject: [PATCH] Fix shift-adjusting time and date ranges from = within Agenda. >=20=20=20=20 > =C2=A0,* org-mode/lisp/org-agenda.el (org-agenda-date-later): Adjust = both > =C2=A0 =C2=A0start and end timestamp for a range, and set > =C2=A0 =C2=A0`org-last-changed-timestamp' to a representation of the = new range. > =C2=A0--- > =C2=A0 lisp/org-agenda.el | =C2=A0 =C2=A08 +++++++- > =C2=A0 1 files changed, 7 insertions(+), 1 deletions(-) >=20=20=20=20 > =C2=A0diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el > =C2=A0index b1fa5f5..e4c1053 100644 > =C2=A0--- a/lisp/org-agenda.el > =C2=A0+++ b/lisp/org-agenda.el > =C2=A0@@ -7517,7 +7517,13 @@ the same tree node, and the headline of = the tree node in the Org-mode > file." > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(goto-char pos) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(if (not (org-at-timestamp-p)) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 (error "Cannot find time stamp")) > =C2=A0- =C2=A0 =C2=A0 =C2=A0 (org-timestamp-change arg (or what 'day)= )) > =C2=A0+ =C2=A0 =C2=A0 =C2=A0 (org-timestamp-change arg (or what 'day)) > =C2=A0+ =C2=A0 =C2=A0 =C2=A0 (when (org-at-date-range-p) > =C2=A0+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((end org-last-changed-times= tamp)) > =C2=A0+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (re-search-backward org-tr= -regexp-both) > =C2=A0+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (org-timestamp-change arg = (or what 'day)) > =C2=A0+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq org-last-changed-tim= estamp > =C2=A0+ =C2=A0 =C2=A0 =C2=A0 =C2=A0(concat org-last-changed-timestamp= "--" end))))) > =C2=A0 =C2=A0 =C2=A0 =C2=A0(org-agenda-show-new-time marker org-last-= changed-timestamp)) > =C2=A0 =C2=A0 =C2=A0 (message "Time stamp changed to %s" org-last-cha= nged-timestamp))) >=20=20=20=20 > =C2=A0-- > =C2=A01.7.2.5 >=20 > #+end_src >=20=20=20=20 > Regards, > niels > -- > http://pft.github.com >=20 > -- > http://pft.github.com >=20 >=20 > ---------------------------------------------------- > Alternatives: >=20 > ----------------------------------------------------