From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id YFnGJa7LzGUtYQEAqHPOHw:P1 (envelope-from ) for ; Wed, 14 Feb 2024 15:18:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id YFnGJa7LzGUtYQEAqHPOHw (envelope-from ) for ; Wed, 14 Feb 2024 15:18:22 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=TAU5cfBW; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707920302; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=r2BbIFKRrrkjyKv+6WgJLTfhuECpfAn6RLAk6laY8Wk=; b=iGUTO2QTW4Xm8gNvgNmDqn7PMwgnPWpl1xqM1x5dMpDqYLqwKShhhER22rUMXbsdxU4Rd4 hakR9V5Ph7mxIafXVjHXATCWSgbmnvxRuV4kv254jgY20I/DDFwpP8Ud7JeD1hrKDMFCMe YH7ujwWtIkb4JdSZNRwXSZJU/zgDAJpsOfs+a3/5jUZ+X1FO7OEmrQpR+bk/NO024K7lt9 Mpek9IUk9eCL7cyKmI/95OfmfFldTD5JIYvgPd9XIiUmHuayhspSqhNDvQ+TbWzu49/8QA HAHVULnZEd1EVUzUiS4AyfDOJVJvL3lY2lz/qq0H5VIVKhZop1kHj939aaV/8A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=TAU5cfBW; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707920302; a=rsa-sha256; cv=none; b=pjD0lQXAqb6KvblnCme9wRZgNZ+FoESNyVPTV70YTHkDjdyS4d/tOFhmpTXJ51Cn+thok0 8VOBa+gh68QLbsFWfqxT0Qr6gSvKUYru37Wj8cpfMe1h1D2oWU2PPJ2CZYgg+AdLNxatY1 2hBq6YnFiKSqBUdAvylAZBULuSSQY+j6AIIMn7fJC6lsVOy+I3bX53iQEf6Mdr1zFTEbBJ cG296367gxCW/rJFcF1gTu0Q50Z1MkLxzAdYS68MKtDXP07QRmCcm7CICCF4PB8vX3j4aF GMu8PKft27K4ZlThYM05e/4rgVeaLX7huJxUYQM03h/MV1Tlf2aptOelnubQYw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4CEA1D6CD for ; Wed, 14 Feb 2024 15:18:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raG4f-0002O0-Dm; Wed, 14 Feb 2024 09:17:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1raG4b-0002N0-Bv for emacs-orgmode@gnu.org; Wed, 14 Feb 2024 09:17:18 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1raG4Z-0001ym-9Q for emacs-orgmode@gnu.org; Wed, 14 Feb 2024 09:17:17 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id AE712240028 for ; Wed, 14 Feb 2024 15:17:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707920232; bh=ACkQL535wG3bBTXFsg2JTEBjFxicSS7NDMc3yJgnbRI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=TAU5cfBW/FUVwSKXcTSZRREBl2sPu5Foo85rgcKGB8hReQ1u86hM5nzIwfRYuoR8O H6LFT57vnmA51i8EAgJrvoxqGrVYomgyGvPMwrfhTMQKoUJkezvFexxKrNrJeg8uMn 5t8G1eujVWQ+j83R5cqolrzPSEboaJjtREHpIOC0+He7n6Q8Jmou+kgj5y5snm8HrI UYYqkoXcMEFDiA0DCED5VerBXRIZm5o43thAqv4NVuX1bVBqpHO3Nrv1zCTgEgdiYn 5qlQYgOUAhdKO0U2A2rPHhloD6N7/HSBZ+BIiVHxvJIa3JwtCmMocrjpjpx8sSnYQj 7aRaJ49NaEkYw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TZgHq3S3Qz6tm4; Wed, 14 Feb 2024 15:17:11 +0100 (CET) From: Ihor Radchenko To: Tim Ruffing Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] org-agenda: Make sure skipping warning/delay days never increases their number In-Reply-To: References: <87sf1wl9x4.fsf@localhost> Date: Wed, 14 Feb 2024 14:20:46 +0000 Message-ID: <87frxvt9dt.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -5.59 X-Spam-Score: -5.59 X-Migadu-Queue-Id: 4CEA1D6CD X-TUID: 5XGa9Q+MVpZs Tim Ruffing 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 . Support Org development at , or support my work at