emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Niels Giesen <niels.giesen@gmail.com>
Cc: nicholas.dokos@hp.com, Orgmode <emacs-orgmode@gnu.org>
Subject: Re: Patch for bug in adjusting time ranges in Agenda
Date: Sun, 16 Oct 2011 12:43:42 -0400	[thread overview]
Message-ID: <31715.1318783422@alphaville.dokosmarshall.org> (raw)
In-Reply-To: Message from Niels Giesen <niels.giesen@gmail.com> of "Sun\, 16 Oct 2011 18\:27\:15 +0200." <CACDo9LdhRgEkcWc8EU9gBCsmjK+oAJKw7hjPL8xhisVyruEUYg@mail.gmail.com>

Niels Giesen <niels.giesen@gmail.com> wrote:

> *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?
> 

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.

Nick

> On Sun, Oct 2, 2011 at 12:24 PM, Niels Giesen <niels.giesen@gmail.com> 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
>      From 2e6b64dc8dcae0fd312729af96ab10d8d2e9d91b Mon Sep 17 00:00:00 2001
>      From: Niels Giesen <niels.giesen@gmail.com>
>      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:
> 
> ----------------------------------------------------

  reply	other threads:[~2011-10-16 16:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-02 10:24 Patch for bug in adjusting time ranges in Agenda Niels Giesen
2011-10-16 16:27 ` Niels Giesen
2011-10-16 16:43   ` Nick Dokos [this message]
2011-10-17  8:50     ` Niels Giesen
2011-10-17 14:50       ` Nick Dokos
2011-10-20  7:38       ` Carsten Dominik
2011-10-21  8:07       ` Carsten Dominik
2011-10-21  8:54         ` Christian Egli
2011-10-22  6:00           ` Niels Giesen
2011-10-22  6:24             ` Carsten Dominik
2011-10-22  6:40           ` Carsten Dominik
2011-10-22  9:49             ` Niels Giesen

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=31715.1318783422@alphaville.dokosmarshall.org \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=niels.giesen@gmail.com \
    /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).