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: Ihor Radchenko
Subject: Re: [PATCH] org-agenda: Make sure skipping warning/delay days never increases their number
Date: Wed, 14 Feb 2024 14:20:46 +0000

Tim Ruffing <crypto@timruffing.de> writes:

>> Please do not remove arguments from the public functions. This may
>> break
>> code outside Org mode.
>> 
> Hm, sure, I assumed it's okay for this niche thing. Can we deprecate
> the argument somehow?

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.

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

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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