emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] org-agenda: Make sure skipping warning/delay days never incr


From: Tim Ruffing
Subject: Re: [PATCH] org-agenda: Make sure skipping warning/delay days never increases their number
Date: Mon, 26 Feb 2024 15:07:41 +0100

On Wed, 2024-02-14 at 14:20 +0000, Ihor Radchenko wrote:
> > 
> We can do this - I do not see any code in the wild using the optional
> arguments. However, we should do it carefully - (1) Move the function
> to
> org-compat and mark obsolete, recommending a new function instead;
> (2)
> Create a new function with a new name (say,
> org-timestamp-get-warning-days) and without ZERO-OR-DELAY argument
> and
> use it across Org mode.
> 

Hm, now that I think about it again, I'm not sure that defining a new
function is worth the hassle. There's nothing wrong with the current 
function or the optional argument, in the sense that callers can simply
choose not to use the optional argument.

If anything, I think it would rather add a comment that it's
obsolete/there for historical reasons and should not be used. Let me
know if you think that's desirable.

> > -             (suppress-prewarning
> > +             (max-wdays
> 
> May you also rename this variable to be more clear. Something like,
> max-warning-days? These short variable names make the code very
> difficult to read.
> 
> > -             (wdays (or suppress-prewarning (org-get-wdays
> > s))))
> > +             (wdays (min max-wdays (org-get-wdays s))))
> 
> warning-days
> 
> > -             (suppress-delay
> > +             (max-ddays
> 
> max-deadline-warning-days
> 

Done.

Tim

Attachment: 0001-org-agenda-Make-sure-skipping-warning-delay-days-nev.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]