emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Dennis J Lin <djlin@uiuc.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: BUG?: repeat items disappears in agenda
Date: Sun, 20 Jan 2008 15:37:33 +0100	[thread overview]
Message-ID: <48F709E7-8D83-4021-8AA1-4AB71A9ECE53@science.uva.nl> (raw)
In-Reply-To: <20080118215529.GG17250@seeker.homedns.org>

Hi Dennis, thanks for the patch.

I am not sure yet if you are using the right condition though.  It  
seems to me that extending the late-warning-period makes sens only for  
repeating *tasks*, where the base date keeps changing each time you  
mark this entry as DONE.  So maybe the condition should be that it is  
today *and* that the item is a task marked by a TODO keyword.

Or: maybe for Scheduled, we should no relate to the *nearest* match of  
the repeater, but to the most recent one.  This way you would get over- 
due warnings right up to the day where the next occurrence of this  
item is scheduled.  So you would never loose sight on the item.

Hmmmm.  More discussion please!

- Carsten

On Jan 18, 2008, at 10:55 PM, Dennis J Lin wrote:

> Salutations!
>
>> Please post your code, you can always do this, the copyright question
>> only star when we decide to use it.  And even then, 4 lines is very  
>> little.
>
> Sure, please see it below :-)
>
> Dennis Lin
>
>>>
>>> Basically, in org-agenda-get-scheduled, we call
>>> org-time-string-to-absolute passing in d1 (the day that we're trying
>>> to get agenda items for.)  The problems is that if d1 is today, we
>>> will get the closest day, which may be in the future, leading to the
>>> problem.  The patch that I've found was to not pass in d1 if  
>>> todayp is
>>> true.
>>>
>>> I have a 4 line patch implementing this (and I probably should write
>>> another one to fix a similar problem with deadlines), but I've not
>>> signed a FSF release, so I don't know if you want me to post my code
>>> here.
>
> Now, this patch is now quite old (it was for 5.08) but it should still
> apply cleanly.  Looking at it, it might be whitespace damaged, and
> there should be a similar change for the get-deadline.  However, I
> think it gets the idea across (and seems to fix the problem for me.)
>
> Dennis Lin
>
> --- old/org.el	2007-09-05 03:16:41.000000000 -0500
> +++ new/org.el	2007-09-09 00:50:36.000000000 -0500
> @@ -18676,7 +18676,9 @@
> 	(org-agenda-skip)
> 	(setq s (match-string 1)
> 	      pos (1- (match-beginning 1))
> -	      d2 (org-time-string-to-absolute (match-string 1) d1)
> +	      d2 (if todayp
> +                     (org-time-string-to-absolute (match-string 1))
> +                   (org-time-string-to-absolute (match-string 1) d1))
> 	      diff (- d2 d1))
> 	(setq pastschedp (and todayp (< diff 0)))
> 	;; When to show a scheduled item in the calendar:

  reply	other threads:[~2008-01-20 14:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18 16:04 BUG?: repeat items disappears in agenda Wanrong Lin
2008-01-18 21:24 ` Dennis J Lin
2008-01-18 21:42   ` Carsten Dominik
2008-01-18 21:55     ` Dennis J Lin
2008-01-20 14:37       ` Carsten Dominik [this message]
2008-01-20 16:51         ` Bernt Hansen
2008-01-20 21:21           ` Wanrong Lin
2008-01-20 17:21         ` Dennis J Lin

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=48F709E7-8D83-4021-8AA1-4AB71A9ECE53@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=djlin@uiuc.edu \
    --cc=emacs-orgmode@gnu.org \
    /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).