From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dennis J Lin Subject: Re: Re: BUG?: repeat items disappears in agenda Date: Fri, 18 Jan 2008 15:55:29 -0600 Message-ID: <20080118215529.GG17250@seeker.homedns.org> References: <4790CE1B.8040701@gmail.com> <874pdaomid.fsf@uiuc.edu> <7B164E1D-3884-4BBF-AB2B-E90068254CEF@science.uva.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JFzCj-00053s-Ak for emacs-orgmode@gnu.org; Fri, 18 Jan 2008 16:56:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JFzCe-00051U-Mv for emacs-orgmode@gnu.org; Fri, 18 Jan 2008 16:56:48 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JFzCe-00051O-8P for emacs-orgmode@gnu.org; Fri, 18 Jan 2008 16:56:44 -0500 Received: from jadzia.ifp.uiuc.edu ([130.126.122.22]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JFzCd-0005bY-Px for emacs-orgmode@gnu.org; Fri, 18 Jan 2008 16:56:43 -0500 Content-Disposition: inline In-Reply-To: <7B164E1D-3884-4BBF-AB2B-E90068254CEF@science.uva.nl> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: emacs-orgmode@gnu.org 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: