all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Tim Ruffing <crypto@timruffing.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] org-agenda: Make sure skipping warning/delay days never increases their number
Date: Wed, 14 Feb 2024 14:20:46 +0000	[thread overview]
Message-ID: <87frxvt9dt.fsf@localhost> (raw)
In-Reply-To: <de7a5a2502ddba9237d7812e9f37e2d541b50f48.camel@timruffing.de>

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	other threads:[~2024-02-14 14:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-13 10:34 [PATCH] org-agenda: Make sure skipping warning/delay days never increases their number Tim Ruffing
2024-02-13 14:24 ` Ihor Radchenko
2024-02-13 15:58   ` Tim Ruffing
2024-02-14 14:20     ` Ihor Radchenko [this message]
2024-02-26 14:07       ` Tim Ruffing
2024-02-27 12:49         ` Ihor Radchenko
2024-02-27 22:26           ` Tim Ruffing
2024-02-28 11:56             ` Ihor Radchenko
2024-02-28 12:33               ` Bastien Guerry
2024-02-28 13:18                 ` Ihor Radchenko

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87frxvt9dt.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=crypto@timruffing.de \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.