emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Patch for bug in adjusting time ranges in Agenda
@ 2011-10-02 10:24 Niels Giesen
  2011-10-16 16:27 ` Niels Giesen
  0 siblings, 1 reply; 12+ messages in thread
From: Niels Giesen @ 2011-10-02 10:24 UTC (permalink / raw)
  To: Orgmode

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Patch for bug in adjusting time ranges in Agenda
  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
  0 siblings, 1 reply; 12+ messages in thread
From: Niels Giesen @ 2011-10-16 16:27 UTC (permalink / raw)
  To: Orgmode

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

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

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

[-- Attachment #2: Type: text/html, Size: 3102 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Patch for bug in adjusting time ranges in Agenda
  2011-10-16 16:27 ` Niels Giesen
@ 2011-10-16 16:43   ` Nick Dokos
  2011-10-17  8:50     ` Niels Giesen
  0 siblings, 1 reply; 12+ messages in thread
From: Nick Dokos @ 2011-10-16 16:43 UTC (permalink / raw)
  To: Niels Giesen; +Cc: nicholas.dokos, Orgmode

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:
> 
> ----------------------------------------------------

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Patch for bug in adjusting time ranges in Agenda
  2011-10-16 16:43   ` Nick Dokos
@ 2011-10-17  8:50     ` Niels Giesen
  2011-10-17 14:50       ` Nick Dokos
                         ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Niels Giesen @ 2011-10-17  8:50 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Orgmode

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

On Sun, Oct 16, 2011 at 6:43 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:

> 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.
>

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?


>
> 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:
> >
> > ----------------------------------------------------
>



-- 
http://pft.github.com

[-- Attachment #2: Type: text/html, Size: 5005 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Patch for bug in adjusting time ranges in Agenda
  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
  2 siblings, 0 replies; 12+ messages in thread
From: Nick Dokos @ 2011-10-17 14:50 UTC (permalink / raw)
  To: Niels Giesen; +Cc: nicholas.dokos, Orgmode

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

> On Sun, Oct 16, 2011 at 6:43 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:
> 
>     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.
> 
> 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?

Probably, but make sure that the attachment is typed properly
(text/plain will work, application/octet-stream will not). Inline
patches should be accepted though, so I'm not sure why the original did
not go through: it may be the indentation of the patch that confused
patchwork.

Nick

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Patch for bug in adjusting time ranges in Agenda
  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
  2 siblings, 0 replies; 12+ messages in thread
From: Carsten Dominik @ 2011-10-20  7:38 UTC (permalink / raw)
  To: Niels Giesen; +Cc: nicholas.dokos, 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:

> 
> 
> On Sun, Oct 16, 2011 at 6:43 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:
> 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.
> 
> 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?
>  
> 
> 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:
> >
> > ----------------------------------------------------
> 
> 
> 
> -- 
> http://pft.github.com

- Carsten

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Patch for bug in adjusting time ranges in Agenda
  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
  2 siblings, 1 reply; 12+ messages in thread
From: Carsten Dominik @ 2011-10-21  8:07 UTC (permalink / raw)
  To: Niels Giesen; +Cc: nicholas.dokos, Orgmode

I have just checked in a slightly modified patch.

Thanks, this was really a bug.

- Carsten

On Oct 17, 2011, at 10:50 AM, Niels Giesen wrote:

> 
> 
> On Sun, Oct 16, 2011 at 6:43 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:
> 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.
> 
> 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?
>  
> 
> 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:
> >
> > ----------------------------------------------------
> 
> 
> 
> -- 
> http://pft.github.com

- Carsten

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Patch for bug in adjusting time ranges in Agenda
  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:40           ` Carsten Dominik
  0 siblings, 2 replies; 12+ messages in thread
From: Christian Egli @ 2011-10-21  8:54 UTC (permalink / raw)
  To: emacs-orgmode

Hi Carsten

Carsten Dominik <carsten.dominik@gmail.com> writes:

> I have just checked in a slightly modified patch.

I think there is a problem with this checkin. The variable
org-agenda-move-date-from-past-immediately-to-today is not defined.
Should this be a defcustom somewhere?

Debugger entered--Lisp error: (void-variable org-agenda-move-date-from-past-immediately-to-today)
  org-agenda-date-later(1)
  org-agenda-do-date-later(nil)
  call-interactively(org-agenda-do-date-later nil nil)

Thanks
-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Patch for bug in adjusting time ranges in Agenda
  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
  1 sibling, 1 reply; 12+ messages in thread
From: Niels Giesen @ 2011-10-22  6:00 UTC (permalink / raw)
  To: Christian Egli, Carsten Dominik; +Cc: emacs-orgmode

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

Same here.

By the way, you don't necessarily have to mark the patch as a TINYCHANGE: I
have signed the papers with the FSF, but I just have problems updating
http://orgmode.org/worg/org-contribute.html.

(problem is: "error: unable to create temporary sha1 filename ./objects/3e:
Permission denied"
I mailed Matt about this a fortnight ago, but haven't heard from him yet).

On Fri, Oct 21, 2011 at 10:54 AM, Christian Egli <christian.egli@sbs.ch>wrote:

> Hi Carsten
>
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
> > I have just checked in a slightly modified patch.
>
> I think there is a problem with this checkin. The variable
> org-agenda-move-date-from-past-immediately-to-today is not defined.
> Should this be a defcustom somewhere?
>
> Debugger entered--Lisp error: (void-variable
> org-agenda-move-date-from-past-immediately-to-today)
>  org-agenda-date-later(1)
>  org-agenda-do-date-later(nil)
>  call-interactively(org-agenda-do-date-later nil nil)
>
> Thanks
> --
> Christian Egli
> Swiss Library for the Blind, Visually Impaired and Print Disabled
> Grubenstrasse 12, CH-8045 Zürich, Switzerland
>
>
>


-- 
http://pft.github.com

[-- Attachment #2: Type: text/html, Size: 1807 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Patch for bug in adjusting time ranges in Agenda
  2011-10-22  6:00           ` Niels Giesen
@ 2011-10-22  6:24             ` Carsten Dominik
  0 siblings, 0 replies; 12+ messages in thread
From: Carsten Dominik @ 2011-10-22  6:24 UTC (permalink / raw)
  To: Niels Giesen; +Cc: emacs-orgmode, Christian Egli


On 22.10.2011, at 08:00, Niels Giesen wrote:

> Same here.
> 
> By the way, you don't necessarily have to mark the patch as a TINYCHANGE: I have signed the papers with the FSF, but I just have problems updating http://orgmode.org/worg/org-contribute.html.
> 
> (problem is: "error: unable to create temporary sha1 filename ./objects/3e: Permission denied"
> I mailed Matt about this a fortnight ago, but haven't heard from him yet).

Don't know what the error means, but I have added you!

- Carsten

> 
> On Fri, Oct 21, 2011 at 10:54 AM, Christian Egli <christian.egli@sbs.ch> wrote:
> Hi Carsten
> 
> Carsten Dominik <carsten.dominik@gmail.com> writes:
> 
> > I have just checked in a slightly modified patch.
> 
> I think there is a problem with this checkin. The variable
> org-agenda-move-date-from-past-immediately-to-today is not defined.
> Should this be a defcustom somewhere?
> 
> Debugger entered--Lisp error: (void-variable org-agenda-move-date-from-past-immediately-to-today)
>  org-agenda-date-later(1)
>  org-agenda-do-date-later(nil)
>  call-interactively(org-agenda-do-date-later nil nil)
> 
> Thanks
> --
> Christian Egli
> Swiss Library for the Blind, Visually Impaired and Print Disabled
> Grubenstrasse 12, CH-8045 Zürich, Switzerland
> 
> 
> 
> 
> 
> -- 
> http://pft.github.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Patch for bug in adjusting time ranges in Agenda
  2011-10-21  8:54         ` Christian Egli
  2011-10-22  6:00           ` Niels Giesen
@ 2011-10-22  6:40           ` Carsten Dominik
  2011-10-22  9:49             ` Niels Giesen
  1 sibling, 1 reply; 12+ messages in thread
From: Carsten Dominik @ 2011-10-22  6:40 UTC (permalink / raw)
  To: Christian Egli; +Cc: emacs-orgmode


On 21.10.2011, at 10:54, Christian Egli wrote:

> Hi Carsten
> 
> Carsten Dominik <carsten.dominik@gmail.com> writes:
> 
>> I have just checked in a slightly modified patch.
> 
> I think there is a problem with this checkin. The variable
> org-agenda-move-date-from-past-immediately-to-today is not defined.
> Should this be a defcustom somewhere?

Yes, I forgot to put that in.  Done now.

- Carsten

> 
> Debugger entered--Lisp error: (void-variable org-agenda-move-date-from-past-immediately-to-today)
>  org-agenda-date-later(1)
>  org-agenda-do-date-later(nil)
>  call-interactively(org-agenda-do-date-later nil nil)
> 
> Thanks
> -- 
> Christian Egli
> Swiss Library for the Blind, Visually Impaired and Print Disabled
> Grubenstrasse 12, CH-8045 Zürich, Switzerland
> 
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Patch for bug in adjusting time ranges in Agenda
  2011-10-22  6:40           ` Carsten Dominik
@ 2011-10-22  9:49             ` Niels Giesen
  0 siblings, 0 replies; 12+ messages in thread
From: Niels Giesen @ 2011-10-22  9:49 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode, Christian Egli

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On 21.10.2011, at 10:54, Christian Egli wrote:
>
>> Hi Carsten
>> 
>> Carsten Dominik <carsten.dominik@gmail.com> writes:
>> 
>>> I have just checked in a slightly modified patch.
>> 
>> I think there is a problem with this checkin. The variable
>> org-agenda-move-date-from-past-immediately-to-today is not defined.
>> Should this be a defcustom somewhere?
>
> Yes, I forgot to put that in.  Done now.
>

Hmm. Found another bug, which presumably existed with my original patch
too:

#+begin_example
  Week-agenda (W42):
  Monday     17 October 2011 W42
    org:        Scheduled:  finish plugin
    org:        (1/3):  finish plugin
  Tuesday    18 October 2011
    org:        (2/3):  finish plugin
  Wednesday  19 October 2011
    org:        (3/3):  finish plugin
  Thursday   20 October 2011
  Friday     21 October 2011
  Saturday   22 October 2011
    org:        Sched. 6x:  finish plugin
  Sunday     23 October 2011
#+end_example

When on the line
: org:        Scheduled:  finish plugin
or on the line
: org:        Sched. 6x:  finish plugin

`org-agenda-later' doesn't work properly. This is because org-marker is
at the beginning of the timestamp at these kind of entries, not the end.

This causes both `org-at-date-range-p' to return nil and (presuming it
did return t) the re-search-backward code to fail.

On the other entries (the 1/3, 2/3 and 3/3 lines) shifting the date does
work, as the marker is at the end of the date range.

I am not sure as to the proper course of action here:

1. should the initial marker point to the end of the date range?
2. should `org-at-date-range-p' return t too at the beginning of a date range?
3. should `org-date-later' handle the case where the marker is at the
   beginning of a date range itself?

   
-- 
http://pft.github.com/

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-10-22  9:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).