emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Fix agenda display for late scheduled and deadline tasks
@ 2010-06-12 16:09 Bernt Hansen
  2010-06-12 16:13 ` Bernt Hansen
  0 siblings, 1 reply; 15+ messages in thread
From: Bernt Hansen @ 2010-06-12 16:09 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Bernt Hansen

* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled):
* lisp/org.el (org-time-string-to-seconds):
For deadline and scheduled agenda display ignore the cyclic repeater
when calculating how many days late the task is.  If you have a weekly
task and miss the date the agenda view will show more than a week late
now instead of resetting on the cyclic repeating date.  This makes it
much more obvious when you missed a repeating task after the repeater.
---
This patch is available at git://git.norang.ca/org-mode.git fix-agenda-late-tasks

-Bernt

 lisp/org-agenda.el |    4 ++--
 lisp/org.el        |   12 +++++++-----
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 93334b6..1977b84 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4573,7 +4573,7 @@ be skipped."
 	      pos (1- (match-beginning 1))
 	      d2 (org-time-string-to-absolute
 		  (match-string 1) d1 'past
-		  org-agenda-repeating-timestamp-show-all)
+		  org-agenda-repeating-timestamp-show-all t)
 	      diff (- d2 d1)
 	      wdays (if suppress-prewarning
 			(let ((org-deadline-warning-days suppress-prewarning))
@@ -4675,7 +4675,7 @@ FRACTION is what fraction of the head-warning time has passed."
 	      pos (1- (match-beginning 1))
 	      d2 (org-time-string-to-absolute
 		  (match-string 1) d1 'past
-		  org-agenda-repeating-timestamp-show-all)
+		  org-agenda-repeating-timestamp-show-all t)
 	      diff (- d2 d1))
 	(setq pastschedp (and todayp (< diff 0)))
 	;; When to show a scheduled item in the calendar:
diff --git a/lisp/org.el b/lisp/org.el
index 5cbd10a..d01bf8a 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14683,18 +14683,20 @@ days in order to avoid rounding problems."
 (defun org-time-string-to-seconds (s)
   (org-float-time (org-time-string-to-time s)))
 
-(defun org-time-string-to-absolute (s &optional daynr prefer show-all)
+(defun org-time-string-to-absolute (s &optional daynr prefer show-all ignore-cyclic)
   "Convert a time stamp to an absolute day number.
-If there is a specifyer for a cyclic time stamp, get the closest date to
-DAYNR.
+If there is a specifier for a cyclic time stamp, get the closest date to
+DAYN.
 PREFER and SHOW-ALL are passed through to `org-closest-date'.
-the variable date is bound by the calendar when this is called."
+the variable date is bound by the calendar when this is called.
+IGNORE-CYCLIC ignores cyclic repeaters so the returned absolute date 
+is based on the original date."
   (cond
    ((and daynr (string-match "\\`%%\\((.*)\\)" s))
     (if (org-diary-sexp-entry (match-string 1 s) "" date)
 	daynr
       (+ daynr 1000)))
-   ((and daynr (string-match "\\+[0-9]+[dwmy]" s))
+   ((and (not ignore-cyclic) daynr (string-match "\\+[0-9]+[dwmy]" s))
     (org-closest-date s (if (and (boundp 'daynr) (integerp daynr)) daynr
 			  (time-to-days (current-time))) (match-string 0 s)
 			  prefer show-all))
-- 
1.7.1.256.g3499

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

* [PATCH] Fix agenda display for late scheduled and deadline tasks
  2010-06-12 16:09 [PATCH] Fix agenda display for late scheduled and deadline tasks Bernt Hansen
@ 2010-06-12 16:13 ` Bernt Hansen
  2010-06-16 14:16   ` Bastien
  2010-06-21 12:45   ` Matt Lundin
  0 siblings, 2 replies; 15+ messages in thread
From: Bernt Hansen @ 2010-06-12 16:13 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Bernt Hansen

* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled):
* lisp/org.el (org-time-string-to-seconds):
For deadline and scheduled agenda display ignore the cyclic repeater
when calculating how many days late the task is.  If you have a weekly
task and miss the date the agenda view will show more than a week late
now instead of resetting on the cyclic repeating date.  This makes it
much more obvious when you missed a repeating task after the repeater.
---
Updated patch - fixes DAYN -> DAYNR in the docstring.

-Bernt

 lisp/org-agenda.el |    4 ++--
 lisp/org.el        |   10 ++++++----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 93334b6..1977b84 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4573,7 +4573,7 @@ be skipped."
 	      pos (1- (match-beginning 1))
 	      d2 (org-time-string-to-absolute
 		  (match-string 1) d1 'past
-		  org-agenda-repeating-timestamp-show-all)
+		  org-agenda-repeating-timestamp-show-all t)
 	      diff (- d2 d1)
 	      wdays (if suppress-prewarning
 			(let ((org-deadline-warning-days suppress-prewarning))
@@ -4675,7 +4675,7 @@ FRACTION is what fraction of the head-warning time has passed."
 	      pos (1- (match-beginning 1))
 	      d2 (org-time-string-to-absolute
 		  (match-string 1) d1 'past
-		  org-agenda-repeating-timestamp-show-all)
+		  org-agenda-repeating-timestamp-show-all t)
 	      diff (- d2 d1))
 	(setq pastschedp (and todayp (< diff 0)))
 	;; When to show a scheduled item in the calendar:
diff --git a/lisp/org.el b/lisp/org.el
index 5cbd10a..f23a9e8 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14683,18 +14683,20 @@ days in order to avoid rounding problems."
 (defun org-time-string-to-seconds (s)
   (org-float-time (org-time-string-to-time s)))
 
-(defun org-time-string-to-absolute (s &optional daynr prefer show-all)
+(defun org-time-string-to-absolute (s &optional daynr prefer show-all ignore-cyclic)
   "Convert a time stamp to an absolute day number.
-If there is a specifyer for a cyclic time stamp, get the closest date to
+If there is a specifier for a cyclic time stamp, get the closest date to
 DAYNR.
 PREFER and SHOW-ALL are passed through to `org-closest-date'.
-the variable date is bound by the calendar when this is called."
+the variable date is bound by the calendar when this is called.
+IGNORE-CYCLIC ignores cyclic repeaters so the returned absolute date
+is based on the original date."
   (cond
    ((and daynr (string-match "\\`%%\\((.*)\\)" s))
     (if (org-diary-sexp-entry (match-string 1 s) "" date)
 	daynr
       (+ daynr 1000)))
-   ((and daynr (string-match "\\+[0-9]+[dwmy]" s))
+   ((and (not ignore-cyclic) daynr (string-match "\\+[0-9]+[dwmy]" s))
     (org-closest-date s (if (and (boundp 'daynr) (integerp daynr)) daynr
 			  (time-to-days (current-time))) (match-string 0 s)
 			  prefer show-all))
-- 
1.7.1.256.g3499

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

* Re: [PATCH] Fix agenda display for late scheduled and deadline tasks
  2010-06-12 16:13 ` Bernt Hansen
@ 2010-06-16 14:16   ` Bastien
  2010-06-21 12:45   ` Matt Lundin
  1 sibling, 0 replies; 15+ messages in thread
From: Bastien @ 2010-06-16 14:16 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Bernt Hansen <bernt@norang.ca> writes:

> * lisp/org-agenda.el (org-agenda-get-deadlines):
> (org-agenda-get-scheduled):
> * lisp/org.el (org-time-string-to-seconds):
> For deadline and scheduled agenda display ignore the cyclic repeater
> when calculating how many days late the task is.  If you have a weekly
> task and miss the date the agenda view will show more than a week late
> now instead of resetting on the cyclic repeating date.  This makes it
> much more obvious when you missed a repeating task after the repeater.

Yes, this makes more sense.

Applied, thanks.

-- 
 Bastien

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

* Re: [PATCH] Fix agenda display for late scheduled and deadline tasks
  2010-06-12 16:13 ` Bernt Hansen
  2010-06-16 14:16   ` Bastien
@ 2010-06-21 12:45   ` Matt Lundin
  2010-06-21 12:51     ` Bernt Hansen
  1 sibling, 1 reply; 15+ messages in thread
From: Matt Lundin @ 2010-06-21 12:45 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Hi Bernt,

Bernt Hansen <bernt@norang.ca> writes:

> * lisp/org-agenda.el (org-agenda-get-deadlines):
> (org-agenda-get-scheduled):
> * lisp/org.el (org-time-string-to-seconds):
> For deadline and scheduled agenda display ignore the cyclic repeater
> when calculating how many days late the task is.  If you have a weekly
> task and miss the date the agenda view will show more than a week late
> now instead of resetting on the cyclic repeating date.  This makes it
> much more obvious when you missed a repeating task after the repeater.
> ---
> Updated patch - fixes DAYN -> DAYNR in the docstring.

I believe this patch breaks the functionality of
org-agenda-repeating-timestamp-show-all.

I have org-agenda-repeating-timestamp-show-all set to t, but only one
occurrence of each repeating timestamp is shown.

Thanks,
Matt 

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

* Re: [PATCH] Fix agenda display for late scheduled and deadline tasks
  2010-06-21 12:45   ` Matt Lundin
@ 2010-06-21 12:51     ` Bernt Hansen
  2010-06-21 13:02       ` Bernt Hansen
  0 siblings, 1 reply; 15+ messages in thread
From: Bernt Hansen @ 2010-06-21 12:51 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode

Matt Lundin <mdl@imapmail.org> writes:

> Hi Bernt,
>
> Bernt Hansen <bernt@norang.ca> writes:
>
>> * lisp/org-agenda.el (org-agenda-get-deadlines):
>> (org-agenda-get-scheduled):
>> * lisp/org.el (org-time-string-to-seconds):
>> For deadline and scheduled agenda display ignore the cyclic repeater
>> when calculating how many days late the task is.  If you have a weekly
>> task and miss the date the agenda view will show more than a week late
>> now instead of resetting on the cyclic repeating date.  This makes it
>> much more obvious when you missed a repeating task after the repeater.
>> ---
>> Updated patch - fixes DAYN -> DAYNR in the docstring.
>
> I believe this patch breaks the functionality of
> org-agenda-repeating-timestamp-show-all.
>
> I have org-agenda-repeating-timestamp-show-all set to t, but only one
> occurrence of each repeating timestamp is shown.

Hi Matt,

Sorry about that.  I don't use org-agenda-repeating-timestamp-show-all.

I guess we have two options

 1) revert the patch
 2) continue with the old behaviour if this variable is set.

I'm not sure what is best here -- if we go with option 2) then the
agenda display for scheduled and deadline tasks changes based on this
variable which may not be obvious.

I'll try to post a patch for option 2) later today.

Thanks for the feedback.

Regards,
Bernt

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

* Re: [PATCH] Fix agenda display for late scheduled and deadline tasks
  2010-06-21 12:51     ` Bernt Hansen
@ 2010-06-21 13:02       ` Bernt Hansen
  2010-06-21 13:06         ` Carsten Dominik
  0 siblings, 1 reply; 15+ messages in thread
From: Bernt Hansen @ 2010-06-21 13:02 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode

Bernt Hansen <bernt@norang.ca> writes:

> Matt Lundin <mdl@imapmail.org> writes:
>
>> I believe this patch breaks the functionality of
>> org-agenda-repeating-timestamp-show-all.
>>
>> I have org-agenda-repeating-timestamp-show-all set to t, but only one
>> occurrence of each repeating timestamp is shown.
>
> Hi Matt,
>
> Sorry about that.  I don't use org-agenda-repeating-timestamp-show-all.

Actually I do use that... and I never noticed :/

Right now I'm thinking reverting the patch is probably the easiest fix
for this.

-Bernt

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

* Re: Re: [PATCH] Fix agenda display for late scheduled and deadline tasks
  2010-06-21 13:02       ` Bernt Hansen
@ 2010-06-21 13:06         ` Carsten Dominik
  2010-06-21 13:08           ` Bernt Hansen
  0 siblings, 1 reply; 15+ messages in thread
From: Carsten Dominik @ 2010-06-21 13:06 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Matt Lundin, emacs-orgmode

Hi Bernt,

if you get the the commit ID, I'll revert the patch.

- Carsten

On Jun 21, 2010, at 3:02 PM, Bernt Hansen wrote:

> Bernt Hansen <bernt@norang.ca> writes:
>
>> Matt Lundin <mdl@imapmail.org> writes:
>>
>>> I believe this patch breaks the functionality of
>>> org-agenda-repeating-timestamp-show-all.
>>>
>>> I have org-agenda-repeating-timestamp-show-all set to t, but only  
>>> one
>>> occurrence of each repeating timestamp is shown.
>>
>> Hi Matt,
>>
>> Sorry about that.  I don't use org-agenda-repeating-timestamp-show- 
>> all.
>
> Actually I do use that... and I never noticed :/
>
> Right now I'm thinking reverting the patch is probably the easiest fix
> for this.
>
> -Bernt
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

* Re: Re: [PATCH] Fix agenda display for late scheduled and deadline tasks
  2010-06-21 13:06         ` Carsten Dominik
@ 2010-06-21 13:08           ` Bernt Hansen
  2010-06-21 13:21             ` Carsten Dominik
  0 siblings, 1 reply; 15+ messages in thread
From: Bernt Hansen @ 2010-06-21 13:08 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Matt Lundin, emacs-orgmode



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

> Hi Bernt,
>
> if you get the the commit ID, I'll revert the patch.
>

commit 14b689946d398d352f7157bed8a1aa1e31a9e934
Author: Bastien Guerry <bzg@altern.org>
Date:   Wed Jun 16 16:12:31 2010 +0200

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

* Re: Re: [PATCH] Fix agenda display for late scheduled and deadline tasks
  2010-06-21 13:08           ` Bernt Hansen
@ 2010-06-21 13:21             ` Carsten Dominik
  2010-06-22 21:40               ` [PATCH v2] " Bernt Hansen
  0 siblings, 1 reply; 15+ messages in thread
From: Carsten Dominik @ 2010-06-21 13:21 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Matt Lundin, emacs-orgmode

OK, I reverted this patch.

Thanks1

- Carsten

On Jun 21, 2010, at 3:08 PM, Bernt Hansen wrote:

>
>
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> Hi Bernt,
>>
>> if you get the the commit ID, I'll revert the patch.
>>
>
> commit 14b689946d398d352f7157bed8a1aa1e31a9e934
> Author: Bastien Guerry <bzg@altern.org>
> Date:   Wed Jun 16 16:12:31 2010 +0200

- Carsten

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

* [PATCH v2] Fix agenda display for late scheduled and deadline tasks
  2010-06-21 13:21             ` Carsten Dominik
@ 2010-06-22 21:40               ` Bernt Hansen
  2010-06-23 15:26                 ` Carsten Dominik
  2010-07-01 13:00                 ` Carsten Dominik
  0 siblings, 2 replies; 15+ messages in thread
From: Bernt Hansen @ 2010-06-22 21:40 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Bernt Hansen

* lisp/org.el (org-time-string-to-absolute):

  Ignore the cyclic repeater when displaying items on today's agenda
  date.  If you have a weekly task and miss the date the agenda view
  will show more than a week late now instead of resetting on the
  cyclic repeating date.  This makes it much more obvious when you
  missed a repeating task after the repeater.
---
Here's a new version of this patch which I think addresses Matt's issue and it's simpler 
which is always a bonus.

The patch is available at git://git.norang.ca/org-mode.git fix-agenda-late-tasks

-Bernt


 lisp/org.el |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 2628152..4ebf31d 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14700,16 +14700,17 @@ If there is a specifyer for a cyclic time stamp, get the closest date to
 DAYNR.
 PREFER and SHOW-ALL are passed through to `org-closest-date'.
 the variable date is bound by the calendar when this is called."
-  (cond
-   ((and daynr (string-match "\\`%%\\((.*)\\)" s))
-    (if (org-diary-sexp-entry (match-string 1 s) "" date)
-	daynr
-      (+ daynr 1000)))
-   ((and daynr (string-match "\\+[0-9]+[dwmy]" s))
-    (org-closest-date s (if (and (boundp 'daynr) (integerp daynr)) daynr
-			  (time-to-days (current-time))) (match-string 0 s)
-			  prefer show-all))
-   (t (time-to-days (apply 'encode-time (org-parse-time-string s))))))
+  (let ((today (calendar-absolute-from-gregorian (calendar-current-date))))
+    (cond
+     ((and daynr (string-match "\\`%%\\((.*)\\)" s))
+      (if (org-diary-sexp-entry (match-string 1 s) "" date)
+	  daynr
+	(+ daynr 1000)))
+     ((and daynr (not (eq daynr today)) (string-match "\\+[0-9]+[dwmy]" s))
+	   (org-closest-date s (if (and (boundp 'daynr) (integerp daynr)) daynr
+				 (time-to-days (current-time))) (match-string 0 s)
+				 prefer show-all))
+      (t (time-to-days (apply 'encode-time (org-parse-time-string s)))))))
 
 (defun org-days-to-iso-week (days)
   "Return the iso week number."
-- 
1.7.1.359.gd0b8d

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

* Re: [PATCH v2] Fix agenda display for late scheduled and deadline tasks
  2010-06-22 21:40               ` [PATCH v2] " Bernt Hansen
@ 2010-06-23 15:26                 ` Carsten Dominik
  2010-06-23 15:38                   ` Bernt Hansen
  2010-07-01 13:00                 ` Carsten Dominik
  1 sibling, 1 reply; 15+ messages in thread
From: Carsten Dominik @ 2010-06-23 15:26 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Hi Bernt,

can you point me to the thread which discusses this issue?

Thanks.

- Carsten

On Jun 22, 2010, at 11:40 PM, Bernt Hansen wrote:

> * lisp/org.el (org-time-string-to-absolute):
>
>  Ignore the cyclic repeater when displaying items on today's agenda
>  date.  If you have a weekly task and miss the date the agenda view
>  will show more than a week late now instead of resetting on the
>  cyclic repeating date.  This makes it much more obvious when you
>  missed a repeating task after the repeater.
> ---
> Here's a new version of this patch which I think addresses Matt's  
> issue and it's simpler
> which is always a bonus.
>
> The patch is available at git://git.norang.ca/org-mode.git fix- 
> agenda-late-tasks
>
> -Bernt
>
>
> lisp/org.el |   21 +++++++++++----------
> 1 files changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/lisp/org.el b/lisp/org.el
> index 2628152..4ebf31d 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -14700,16 +14700,17 @@ If there is a specifyer for a cyclic time  
> stamp, get the closest date to
> DAYNR.
> PREFER and SHOW-ALL are passed through to `org-closest-date'.
> the variable date is bound by the calendar when this is called."
> -  (cond
> -   ((and daynr (string-match "\\`%%\\((.*)\\)" s))
> -    (if (org-diary-sexp-entry (match-string 1 s) "" date)
> -	daynr
> -      (+ daynr 1000)))
> -   ((and daynr (string-match "\\+[0-9]+[dwmy]" s))
> -    (org-closest-date s (if (and (boundp 'daynr) (integerp daynr))  
> daynr
> -			  (time-to-days (current-time))) (match-string 0 s)
> -			  prefer show-all))
> -   (t (time-to-days (apply 'encode-time (org-parse-time-string  
> s))))))
> +  (let ((today (calendar-absolute-from-gregorian (calendar-current- 
> date))))
> +    (cond
> +     ((and daynr (string-match "\\`%%\\((.*)\\)" s))
> +      (if (org-diary-sexp-entry (match-string 1 s) "" date)
> +	  daynr
> +	(+ daynr 1000)))
> +     ((and daynr (not (eq daynr today)) (string-match "\\+[0-9]+ 
> [dwmy]" s))
> +	   (org-closest-date s (if (and (boundp 'daynr) (integerp daynr))  
> daynr
> +				 (time-to-days (current-time))) (match-string 0 s)
> +				 prefer show-all))
> +      (t (time-to-days (apply 'encode-time (org-parse-time-string  
> s)))))))
>
> (defun org-days-to-iso-week (days)
>   "Return the iso week number."
> -- 
> 1.7.1.359.gd0b8d
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

* Re: [PATCH v2] Fix agenda display for late scheduled and deadline tasks
  2010-06-23 15:26                 ` Carsten Dominik
@ 2010-06-23 15:38                   ` Bernt Hansen
  2010-06-23 15:42                     ` Carsten Dominik
  0 siblings, 1 reply; 15+ messages in thread
From: Bernt Hansen @ 2010-06-23 15:38 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

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

> can you point me to the thread which discusses this issue?

I believe this is the same thread you are looking for.

The patch is a reply to the original patch I sent out.  Bastien applied
it and then Matt Lundin reported an issue with it.

http://thread.gmane.org/gmane.emacs.orgmode/26154

-Bernt

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

* Re: [PATCH v2] Fix agenda display for late scheduled and deadline tasks
  2010-06-23 15:38                   ` Bernt Hansen
@ 2010-06-23 15:42                     ` Carsten Dominik
  0 siblings, 0 replies; 15+ messages in thread
From: Carsten Dominik @ 2010-06-23 15:42 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode


On Jun 23, 2010, at 5:38 PM, Bernt Hansen wrote:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> can you point me to the thread which discusses this issue?
>
> I believe this is the same thread you are looking for.
>
> The patch is a reply to the original patch I sent out.  Bastien  
> applied
> it and then Matt Lundin reported an issue with it.
>
> http://thread.gmane.org/gmane.emacs.orgmode/26154

Ah, OK, thanks.  SOrry for the noise.

- Carsten
>

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

* Re: [PATCH v2] Fix agenda display for late scheduled and deadline tasks
  2010-06-22 21:40               ` [PATCH v2] " Bernt Hansen
  2010-06-23 15:26                 ` Carsten Dominik
@ 2010-07-01 13:00                 ` Carsten Dominik
  2010-07-01 13:19                   ` Bernt Hansen
  1 sibling, 1 reply; 15+ messages in thread
From: Carsten Dominik @ 2010-07-01 13:00 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Applied, thanks.

Please note that I had to change the commit message so that
the second paragraph can be used as a ChangeLog entry with an
ultra-short description.  Also, sendon etc lines are not
indented, unlike an org-mode list entry.

The third paragraph is your original description, not indented.

Thanks for this fix!

- Carsten

On Jun 22, 2010, at 11:40 PM, Bernt Hansen wrote:

> * lisp/org.el (org-time-string-to-absolute):
>
>  Ignore the cyclic repeater when displaying items on today's agenda
>  date.  If you have a weekly task and miss the date the agenda view
>  will show more than a week late now instead of resetting on the
>  cyclic repeating date.  This makes it much more obvious when you
>  missed a repeating task after the repeater.
> ---
> Here's a new version of this patch which I think addresses Matt's  
> issue and it's simpler
> which is always a bonus.
>
> The patch is available at git://git.norang.ca/org-mode.git fix- 
> agenda-late-tasks
>
> -Bernt
>
>
> lisp/org.el |   21 +++++++++++----------
> 1 files changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/lisp/org.el b/lisp/org.el
> index 2628152..4ebf31d 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -14700,16 +14700,17 @@ If there is a specifyer for a cyclic time  
> stamp, get the closest date to
> DAYNR.
> PREFER and SHOW-ALL are passed through to `org-closest-date'.
> the variable date is bound by the calendar when this is called."
> -  (cond
> -   ((and daynr (string-match "\\`%%\\((.*)\\)" s))
> -    (if (org-diary-sexp-entry (match-string 1 s) "" date)
> -	daynr
> -      (+ daynr 1000)))
> -   ((and daynr (string-match "\\+[0-9]+[dwmy]" s))
> -    (org-closest-date s (if (and (boundp 'daynr) (integerp daynr))  
> daynr
> -			  (time-to-days (current-time))) (match-string 0 s)
> -			  prefer show-all))
> -   (t (time-to-days (apply 'encode-time (org-parse-time-string  
> s))))))
> +  (let ((today (calendar-absolute-from-gregorian (calendar-current- 
> date))))
> +    (cond
> +     ((and daynr (string-match "\\`%%\\((.*)\\)" s))
> +      (if (org-diary-sexp-entry (match-string 1 s) "" date)
> +	  daynr
> +	(+ daynr 1000)))
> +     ((and daynr (not (eq daynr today)) (string-match "\\+[0-9]+ 
> [dwmy]" s))
> +	   (org-closest-date s (if (and (boundp 'daynr) (integerp daynr))  
> daynr
> +				 (time-to-days (current-time))) (match-string 0 s)
> +				 prefer show-all))
> +      (t (time-to-days (apply 'encode-time (org-parse-time-string  
> s)))))))
>
> (defun org-days-to-iso-week (days)
>   "Return the iso week number."
> -- 
> 1.7.1.359.gd0b8d
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

* Re: [PATCH v2] Fix agenda display for late scheduled and deadline tasks
  2010-07-01 13:00                 ` Carsten Dominik
@ 2010-07-01 13:19                   ` Bernt Hansen
  0 siblings, 0 replies; 15+ messages in thread
From: Bernt Hansen @ 2010-07-01 13:19 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

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

> Applied, thanks.
>
> Please note that I had to change the commit message so that
> the second paragraph can be used as a ChangeLog entry with an
> ultra-short description.  Also, sendon etc lines are not
> indented, unlike an org-mode list entry.
>
> The third paragraph is your original description, not indented.
>
> Thanks for this fix!

Thanks,

I'll try (harder) to use the right commit message format next time.

Regards,
Bernt

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

end of thread, other threads:[~2010-07-01 13:19 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-12 16:09 [PATCH] Fix agenda display for late scheduled and deadline tasks Bernt Hansen
2010-06-12 16:13 ` Bernt Hansen
2010-06-16 14:16   ` Bastien
2010-06-21 12:45   ` Matt Lundin
2010-06-21 12:51     ` Bernt Hansen
2010-06-21 13:02       ` Bernt Hansen
2010-06-21 13:06         ` Carsten Dominik
2010-06-21 13:08           ` Bernt Hansen
2010-06-21 13:21             ` Carsten Dominik
2010-06-22 21:40               ` [PATCH v2] " Bernt Hansen
2010-06-23 15:26                 ` Carsten Dominik
2010-06-23 15:38                   ` Bernt Hansen
2010-06-23 15:42                     ` Carsten Dominik
2010-07-01 13:00                 ` Carsten Dominik
2010-07-01 13:19                   ` Bernt Hansen

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