From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Patch for bug in adjusting time ranges in Agenda Date: Thu, 20 Oct 2011 09:38:02 +0200 Message-ID: References: <87obxzitcv.fsf@gmail.com> <31715.1318783422@alphaville.dokosmarshall.org> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:53001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGnCb-0007CF-KG for emacs-orgmode@gnu.org; Thu, 20 Oct 2011 03:38:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGnCa-0000VN-3Y for emacs-orgmode@gnu.org; Thu, 20 Oct 2011 03:38:09 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:44471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGnCZ-0000Ut-Me for emacs-orgmode@gnu.org; Thu, 20 Oct 2011 03:38:07 -0400 Received: by eye4 with SMTP id 4so2912168eye.0 for ; Thu, 20 Oct 2011 00:38:06 -0700 (PDT) In-Reply-To: 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 Never mind resubmitting, I will take a look at the patch later today. - Carsten On Oct 17, 2011, at 10:50 AM, Niels Giesen wrote: >=20 >=20 > On Sun, Oct 16, 2011 at 6:43 PM, Nick Dokos = wrote: > Niels Giesen wrote: >=20 > > *bump* > > > > Has this one slipped through (as I were posting two other patches = round the same date, one also > > having to do with date/time ranges in the agenda -- which were both = accepted), or am I just > > impatient? > > >=20 > I tried to check patchwork = (http://patchwork.newartisans.com/project/org-mode/) > but the server seems to be having problems right now. However, that's = the first > place to check when it comes back: if it's there, somebody will get to = it sooner > or later. >=20 > Ok, I checked today (server is up again) and it's not there. But I've = been a fool. Should've submitted as an attachment as per = http://orgmode.org/worg/org-contribute.html . Should I try and resubmit? > =20 >=20 > Nick >=20 > > On Sun, Oct 2, 2011 at 12:24 PM, Niels Giesen = wrote: > > > > Hi Orgers, > > > > 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 the > > Agenda view. I noticed that the commands = `org-agenda-do-date-later' and > > `org-agenda-do-date-earlier' do not work correctly on timestamp = ranges, > > in that they only shift the rightmost timestamp in the range. = The patch > > below should fix this. > > > > #+begin_src diff > > =46rom 2e6b64dc8dcae0fd312729af96ab10d8d2e9d91b Mon Sep 17 = 00:00:00 2001 > > From: Niels Giesen > > Date: Sun, 2 Oct 2011 09:15:21 +0200 > > Subject: [PATCH] Fix shift-adjusting time and date ranges from = within Agenda. > > > > ,* org-mode/lisp/org-agenda.el (org-agenda-date-later): Adjust = both > > start and end timestamp for a range, and set > > `org-last-changed-timestamp' to a representation of the new = range. > > --- > > lisp/org-agenda.el | 8 +++++++- > > 1 files changed, 7 insertions(+), 1 deletions(-) > > > > diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el > > index b1fa5f5..e4c1053 100644 > > --- a/lisp/org-agenda.el > > +++ b/lisp/org-agenda.el > > @@ -7517,7 +7517,13 @@ the same tree node, and the headline of = the tree node in the Org-mode > > file." > > (goto-char pos) > > (if (not (org-at-timestamp-p)) > > (error "Cannot find time stamp")) > > - (org-timestamp-change arg (or what 'day))) > > + (org-timestamp-change arg (or what 'day)) > > + (when (org-at-date-range-p) > > + (let ((end org-last-changed-timestamp)) > > + (re-search-backward org-tr-regexp-both) > > + (org-timestamp-change arg (or what 'day)) > > + (setq org-last-changed-timestamp > > + (concat org-last-changed-timestamp "--" end))))) > > (org-agenda-show-new-time marker = org-last-changed-timestamp)) > > (message "Time stamp changed to %s" = org-last-changed-timestamp))) > > > > -- > > 1.7.2.5 > > > > #+end_src > > > > Regards, > > niels > > -- > > http://pft.github.com > > > > -- > > http://pft.github.com > > > > > > ---------------------------------------------------- > > Alternatives: > > > > ---------------------------------------------------- >=20 >=20 >=20 > --=20 > http://pft.github.com - Carsten