From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp. Resent-From: Yuchen Pei Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Aug 2021 05:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 50195@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs Received: via spool by submit@debbugs.gnu.org id=B.16298709693471 (code B ref -1); Wed, 25 Aug 2021 05:57:01 +0000 Received: (at submit) by debbugs.gnu.org; 25 Aug 2021 05:56:09 +0000 Received: from localhost ([127.0.0.1]:45447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIltP-0000tu-Sa for submit@debbugs.gnu.org; Wed, 25 Aug 2021 01:56:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:58406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIjsS-0005wX-BA for submit@debbugs.gnu.org; Tue, 24 Aug 2021 23:47:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIjsQ-0005IL-1U for bug-gnu-emacs@gnu.org; Tue, 24 Aug 2021 23:46:58 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:39845) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIjsO-0002iM-1K for bug-gnu-emacs@gnu.org; Tue, 24 Aug 2021 23:46:57 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 481285C0194 for ; Tue, 24 Aug 2021 23:46:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 24 Aug 2021 23:46:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h=from :to:subject:date:message-id:mime-version:content-type; s=fm2; bh=uYzacf65fwZOw/NCvQdND4fgHpyX4o51wlorSvXsm3I=; b=BPMxVQZGQeQq K6NMs6cg2hO1By+J0Ubvr1OQTFCK3vTGh5b2MjVe54k64ytC4PHbYyLvy9PWcrL1 UZl6uSlkftitLfWpTTLSdPMaK7AfNiV9GrMeNWjQcd/GIJ1F1KAIGipTK1LU2yip rrUfCVDf8Ne9zRHKjXMGBz1bGQWgMG1YMEhS8bJs0tFSg9p+FC5Az6B7i0txMYZ+ aklHLqJndCvA7D/2zcRWjDmeY9vBVC/6kNUXSHVfQdNp/XDFsCXAOrm8rlKZ2grb 90fuYioIdGRZ5X/mDny02ZLPoOreoQQxSoplfUnZt79Dbg9VXrXMNAD/cLanbvv8 J1/1Qkg3+A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=uYzacf65fwZOw/NCvQdND4fgHpyX4 o51wlorSvXsm3I=; b=sXMk65QnmLNGUrHC38oCwscinsiUPALZlx1nj2JTKGpDL dxs26In1ztUw3cFRjDQEPrMjVBVzda03fo/0UNwNtfFg2UQ0Wdq+oiJBdTLXIbQd UZXjK8QIPx1NHYyI9zfF0+cy5ZdS89JhzLvfybbjOQCTyaocmBdFAIum6hB7Wd9D PDX8f8sFIItYn3+VM+/lCYWH3p6V6H8FKXxNMEcqwI80vV+mXF0sJPWbRNYKY733 S9+3Ht5l4dse+K6oEQqQR9x4TNoSE5R9XFs8gtEm+3xJzcPgpdWdtxcVdDpU+4oa 3yRb6M/E/ZIiAu8/pWCwl49POTIJxL9Z1Udce+g2A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddtkedgjeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpegfhffvufffkfggtgesghdtreertd ertdenucfhrhhomhepjghutghhvghnucfrvghiuceohhhiseihphgvihdrmhgvqeenucgg tffrrghtthgvrhhnpedtkeevfeetgefgueffueegfeelieekudduuddukefggfeuleffhf ejiefgfedukeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehhiheshihpvghirdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 24 Aug 2021 23:46:52 -0400 (EDT) User-agent: mu4e 1.4.13; emacs 27.2 From: Yuchen Pei Date: Wed, 25 Aug 2021 13:46:48 +1000 Message-ID: <87fsuychjr.fsf@ypei.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=66.111.4.26; envelope-from=hi@ypei.me; helo=out2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Mailman-Approved-At: Wed, 25 Aug 2021 01:56:05 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; format=flowed Hello, See below my first patch to Emacs. The copyright assignment has already been done BTW. Let me know what you think. Would you like me to add some tests? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Adding-diary-offset-a-diary-sexp-offsetting-another-.patch Content-Transfer-Encoding: quoted-printable Content-Description: the patch From=20d385b1bc02f2922fbff4496f81d4574d0abcf082 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Wed, 25 Aug 2021 13:37:20 +1000 Subject: [PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp. A bit like diary-remind, as a diary-sexp rather than reminder, and also support both positive and negative offsets. This is useful when for example your organization has a committee meeting two days after every monthly meeting which takes place on the third Thursday, or if you would like to attend a virtual meeting scheduled in a different timezone causing a difference in the date. =2D-- doc/emacs/calendar.texi | 14 ++++++++++++++ lisp/calendar/diary-lib.el | 11 +++++++++++ 2 files changed, 25 insertions(+) diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index 3750e78e70..44766c92de 100644 =2D-- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -1363,6 +1363,20 @@ Special Diary Entries Thursday of January, February, and March. If the month is @code{t}, the entry applies to all months of the year. =20 +@findex diary-offset +@example +%%(diary-offset '(diary-float t 3 4) 2) Monthly post-event committee meeti= ng +@end example + +@noindent +This entry applies to the Saturday after the third Thursday of each +month. The 2 specifies number of days after when the sexp +@samp{'(diary-float t 3 4)} would evaluate to @code{t}. This is +useful when for example your organization has a committee meeting two +days after every monthly meeting which takes place on the third +Thursday, or if you would like to attend a virtual meeting scheduled +in a different timezone causing a difference in the date. + Each of the standard sexp diary entries takes an optional parameter specifying the name of a face or a single-character string to use when marking the entry in the calendar. Most generally, sexp diary entries diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index f57fe26058..d83a60680f 100644 =2D-- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -2014,6 +2014,17 @@ diary-cyclic (and (>=3D diff 0) (zerop (% diff n)) (cons mark (format entry cycle (diary-ordinal-suffix cycle)))))) =20 +;; To be called from diary-sexp-entry, where DATE, ENTRY are bound. +(defun diary-offset (sexp days) + "Offsetted diary entry. +Entry applies if the date is DAYS days after another diary-sexp SEXP." + (with-no-warnings (defvar date) (defvar entry)) + (integerp days) + (let ((date + (calendar-gregorian-from-absolute + (- (calendar-absolute-from-gregorian date) days)))) + (eval sexp))) + (defun diary-day-of-year () "Day of year and number of days remaining in the year of date diary entr= y." (with-no-warnings (defvar date)) =2D-=20 2.33.0 --=-=-= Content-Type: text/plain; format=flowed -- Best, Yuchen PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYSW9KAscaGlAeXBlaS5t ZQAKCRAhJn6T74bf0JT9AP9UEdlRQiZAk+qf5qN6FAqS+mRfJaH2UmK1EvugkQzI ogEA2LBVAIN7KF1xaLTEUNKQsbzkXFQQ1HEg33+o69AjBAw= =0z74 -----END PGP SIGNATURE----- --==-=-=-- From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp. Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Aug 2021 11:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Yuchen Pei Cc: 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.16298911308753 (code B ref 50195); Wed, 25 Aug 2021 11:33:01 +0000 Received: (at 50195) by debbugs.gnu.org; 25 Aug 2021 11:32:10 +0000 Received: from localhost ([127.0.0.1]:45923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIr8Y-0002DL-4G for submit@debbugs.gnu.org; Wed, 25 Aug 2021 07:32:10 -0400 Received: from quimby.gnus.org ([95.216.78.240]:35412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIr8S-00024z-Q8 for 50195@debbugs.gnu.org; Wed, 25 Aug 2021 07:32:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vd8nbazx68Je0L8Yg6ZoMNAt2Q9yzqZcPyu4wItbDa4=; b=CLglNv5Zg85ggQKCam/b1lk5tT A3RygLS78udoyjATjf7v0U+kuCT/qEhxG03kZdKu5wB+ZMmWlSG75qBojBQxuSWKODcwJNl9+6WZE bJEx28iRP7PhHWCOK1EbwKMFYSap8UxpyJPTHpz7xrEtuRp0oBd7F59no6IuXQc1cbkc=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIr8I-0003Up-0B; Wed, 25 Aug 2021 13:31:54 +0200 From: Lars Ingebrigtsen References: <87fsuychjr.fsf@ypei.me> Date: Wed, 25 Aug 2021 13:31:49 +0200 In-Reply-To: <87fsuychjr.fsf@ypei.me> (Yuchen Pei's message of "Wed, 25 Aug 2021 13:46:48 +1000") Message-ID: <878s0plpzu.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Yuchen Pei writes: > Let me know what you think. Would you like me to add some tests? Looks useful -- some tests would be nice. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Yuchen Pei writes: > Let me know what you think. Would you like me to add some tests? Looks useful -- some tests would be nice. > +;; To be called from diary-sexp-entry, where DATE, ENTRY are bound. > +(defun diary-offset (sexp days) > + "Offsetted diary entry. > +Entry applies if the date is DAYS days after another diary-sexp SEXP." > + (with-no-warnings (defvar date) (defvar entry)) > + (integerp days) > + (let ((date The (integerp days) here doesn't do anything -- is it supposed to be (when (integerp days) ? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Aug 2021 11:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Yuchen Pei Cc: 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.162989238920447 (code B ref 50195); Wed, 25 Aug 2021 11:54:02 +0000 Received: (at 50195) by debbugs.gnu.org; 25 Aug 2021 11:53:09 +0000 Received: from localhost ([127.0.0.1]:45969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIrSu-0005Jj-LW for submit@debbugs.gnu.org; Wed, 25 Aug 2021 07:53:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIrSr-0005JD-N0 for 50195@debbugs.gnu.org; Wed, 25 Aug 2021 07:53:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43732) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIrSm-0008Hv-C4; Wed, 25 Aug 2021 07:53:00 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2967 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIrSl-0004eU-TQ; Wed, 25 Aug 2021 07:53:00 -0400 Date: Wed, 25 Aug 2021 14:52:55 +0300 Message-Id: <83mtp5vizs.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87fsuychjr.fsf@ypei.me> (message from Yuchen Pei on Wed, 25 Aug 2021 13:46:48 +1000) References: <87fsuychjr.fsf@ypei.me> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Yuchen Pei > Date: Wed, 25 Aug 2021 13:46:48 +1000 > > See below my first patch to Emacs. The copyright assignment has > already been done BTW. Congrats, and welcome aboard. > Let me know what you think. Some minor comments below. > Would you like me to add some tests? Adding more tests is always welcome, thanks. > Subject: [PATCH] Adding diary-offset, a diary-sexp offsetting another > diary-sexp. "git am" uses the Subject for the heading line, and this Subject is too long for that. Please consider making it shorter. > A bit like diary-remind, as a diary-sexp rather than reminder, and > also support both positive and negative offsets. > > This is useful when for example your organization has a committee > meeting two days after every monthly meeting which takes place on the > third Thursday, or if you would like to attend a virtual meeting > scheduled in a different timezone causing a difference in the date. The commit log message should include a ChangeLog-style description of the files and functions where you made the changes. See CONTRIBUTE for more details about the format we prefer. Also, please in the next version include the bug number as part of the log message. > --- a/doc/emacs/calendar.texi > +++ b/doc/emacs/calendar.texi > @@ -1363,6 +1363,20 @@ Special Diary Entries > Thursday of January, February, and March. If the month is @code{t}, the > entry applies to all months of the year. > > +@findex diary-offset > +@example > +%%(diary-offset '(diary-float t 3 4) 2) Monthly post-event committee meeting That line is too long, and will overflow the page width in the printed version of the manual. Please break it in two. > +@noindent > +This entry applies to the Saturday after the third Thursday of each > +month. The 2 specifies number of days after when the sexp > +@samp{'(diary-float t 3 4)} would evaluate to @code{t}. This is ^^^^^^^^^^^^^^^^^^^^^^^^^^^ This should be in @code, not @samp. I'd also wrap it in @w{..}, so that it doesn't get broken between two lines. > +(defun diary-offset (sexp days) > + "Offsetted diary entry. The first line of a doc string should preferably mention the arguments, but without becoming too long, so it could still fit on a single line. > + (with-no-warnings (defvar date) (defvar entry)) Why did you need this? > + (integerp days) Isn't it better to use an assertion? Thanks. From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp. Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Aug 2021 12:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: Yuchen Pei , 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.162989318529956 (code B ref 50195); Wed, 25 Aug 2021 12:07:01 +0000 Received: (at 50195) by debbugs.gnu.org; 25 Aug 2021 12:06:25 +0000 Received: from localhost ([127.0.0.1]:45995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIrfg-0007mz-O0 for submit@debbugs.gnu.org; Wed, 25 Aug 2021 08:06:25 -0400 Received: from quimby.gnus.org ([95.216.78.240]:35772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIrfa-0007me-BH for 50195@debbugs.gnu.org; Wed, 25 Aug 2021 08:06:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=VKRNXBP9CaaWkcbNKO2HD3bSuNnwQhwhrcoBalKWvgM=; b=Zi4CWBM4mCWAeGQz171UMTvSIX UeLAvYup34cUFdbXqWFGR5WMZYIsp279jlSa9d0+9Y8+zh9slCYLnfHhqnXtO1AksS0mgWPTXxS37 TRVzaD5swtrnIjSReRbnjjQsiEJnh/ORrAZ015QM8Gw9csmnLP7MnrnIeu7rSWytwA2Y=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIrfP-0003u5-Jr; Wed, 25 Aug 2021 14:06:07 +0200 From: Lars Ingebrigtsen References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> Date: Wed, 25 Aug 2021 14:06:02 +0200 In-Reply-To: <83mtp5vizs.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Aug 2021 14:52:55 +0300") Message-ID: <875yvtk9ud.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> + (with-no-warnings (defvar date) (defvar entry)) > > Why did you need this? It's how all these functions in diary-lib are defined after the lexical rewrite -- the `eval' depends on those dynamic variables. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> + (with-no-warnings (defvar date) (defvar entry)) > > Why did you need this? It's how all these functions in diary-lib are defined after the lexical rewrite -- the `eval' depends on those dynamic variables. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Aug 2021 12:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lars Ingebrigtsen Cc: hi@ypei.me, 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.162989431231690 (code B ref 50195); Wed, 25 Aug 2021 12:26:02 +0000 Received: (at 50195) by debbugs.gnu.org; 25 Aug 2021 12:25:12 +0000 Received: from localhost ([127.0.0.1]:46014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIrxs-0008Ev-HM for submit@debbugs.gnu.org; Wed, 25 Aug 2021 08:25:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIrxm-0008ED-9d for 50195@debbugs.gnu.org; Wed, 25 Aug 2021 08:25:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44994) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIrxg-0004nO-UT; Wed, 25 Aug 2021 08:24:56 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4927 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIrxg-0002Kx-Hi; Wed, 25 Aug 2021 08:24:56 -0400 Date: Wed, 25 Aug 2021 15:24:54 +0300 Message-Id: <83fsuxvhih.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <875yvtk9ud.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 25 Aug 2021 14:06:02 +0200) References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> <875yvtk9ud.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: Yuchen Pei , 50195@debbugs.gnu.org > Date: Wed, 25 Aug 2021 14:06:02 +0200 > > Eli Zaretskii writes: > > >> + (with-no-warnings (defvar date) (defvar entry)) > > > > Why did you need this? > > It's how all these functions in diary-lib are defined after the lexical > rewrite -- the `eval' depends on those dynamic variables. Ugh! Is it worth it? If we cannot convert these functions to use lexical-binding, maybe we should say lexical-binding: nil in the first line of the file, and remove all those gross kludges? From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp. Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Aug 2021 12:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: hi@ypei.me, 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.16298951528932 (code B ref 50195); Wed, 25 Aug 2021 12:40:02 +0000 Received: (at 50195) by debbugs.gnu.org; 25 Aug 2021 12:39:12 +0000 Received: from localhost ([127.0.0.1]:46043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIsBQ-0002Jw-0i for submit@debbugs.gnu.org; Wed, 25 Aug 2021 08:39:12 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIsBK-0002JN-Ny for 50195@debbugs.gnu.org; Wed, 25 Aug 2021 08:39:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=93QfErOZxgqH+7Bh2AFa0bhLu0nqeq0GuTQwX5MGJXg=; b=L9T16Lq4NMhFVWe40KyjdnUHIx TCbl1RhTZxVgyNuk/Ujc82/ADtaEEXlVC9XEbOZoR0ZjBHve1ovO2wBG0nxoLo3kW9ggF+2PBwlfx 4f3mOI7pyz+u34Zz9sb5l8Gtk3wYWc3BgyMPNFeNlVa1P5PljjCELb7PYzw16ECwxiMM=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIsB9-0004At-L7; Wed, 25 Aug 2021 14:38:55 +0200 From: Lars Ingebrigtsen References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> <875yvtk9ud.fsf@gnus.org> <83fsuxvhih.fsf@gnu.org> Date: Wed, 25 Aug 2021 14:38:51 +0200 In-Reply-To: <83fsuxvhih.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Aug 2021 15:24:54 +0300") Message-ID: <87lf4pitr8.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> It's how all these functions in diary-lib are defined after the lexical >> rewrite -- the `eval' depends on those dynamic variables. > > Ugh! Is it worth it? If we cannot convert these functions to [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> It's how all these functions in diary-lib are defined after the lexical >> rewrite -- the `eval' depends on those dynamic variables. > > Ugh! Is it worth it? If we cannot convert these functions to use > lexical-binding, maybe we should say lexical-binding: nil in the first > line of the file, and remove all those gross kludges? I think having all files lexically bound is a win in itself -- it means that you know the Lisp dialect without looking at the mode line (and can write code that depends on closures etc freely). It does lead to these hacks here, yes, but it's already done, so... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp. Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Aug 2021 15:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: Lars Ingebrigtsen , hi@ypei.me, 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.16299049382025 (code B ref 50195); Wed, 25 Aug 2021 15:23:02 +0000 Received: (at 50195) by debbugs.gnu.org; 25 Aug 2021 15:22:18 +0000 Received: from localhost ([127.0.0.1]:47312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIujJ-0000Wb-Tb for submit@debbugs.gnu.org; Wed, 25 Aug 2021 11:22:18 -0400 Received: from mout.web.de ([212.227.17.12]:60263) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIujH-0000WM-GB for 50195@debbugs.gnu.org; Wed, 25 Aug 2021 11:22:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1629904925; bh=jxBWbSXfhv0o7SOlKa8w96GKQJd2ZgLyZAGMf2dCnt0=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=lhDVAhmxw6ZUNk+4wK225yG6lZPrPaeV+hVAJxEuqdBbdUJHSHtdMYdEAnuCDc4n6 QMM50ICqQneZBCgFoP/FiSv54BAEJBRxu31C/iTjzKtckelzeZy5U3kjdbtTPxAPMt 7QSupiNKOrV/4XW8LlnURhWyRL3mMae7Xwc9D4g0= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([88.66.201.45]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MY5fb-1mXPsG1CM1-00YQL1; Wed, 25 Aug 2021 17:22:05 +0200 From: Michael Heerdegen References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> <875yvtk9ud.fsf@gnus.org> <83fsuxvhih.fsf@gnu.org> Date: Wed, 25 Aug 2021 17:22:04 +0200 In-Reply-To: <83fsuxvhih.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Aug 2021 15:24:54 +0300") Message-ID: <878s0p4kir.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:137UgpzxHCpYXUuBuqLiAjE1d6Tq2nd/6KMh3Cuv6POPEf1iNKS fpb2rGWl2xVrJgu6ZRBv49aoq3LBLYf8/xmckAmySqr7wQCt+3Jfwk1OqfIagwMixNdVYEc I8UviInwVS0SRMyVbfZ2AWKPfcFPOPKGB3kqRFXxJhXD7RgOgbnxYIWyWlwQ2LHg6aEn0uP gbW4GuF9wz4RUL8EU+EGg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:PfIVjHVlD3U=:6dWSUITZeuAoTeYQqXZn+1 bJITqBibxWVG9M6RMfmmhcMb+gKG9Snl1ThLyWVdgyd9kWYsKN6PO1m3PNw7sXh5XdAYhtxdA 4uijO+USqkeIMwKCxQGe5Mz4U8+UX699ue/keLhM2/ALFRVPI6GVTCA2ri2bg4xhyI4J09y/r 1GVBrpKrrqGNcZPiXjpLGnMMyewxWb1RuZUAyKEkNgr5Ol3ifrhOxxR0B8qClzFt0GJcbDu9f aDnyTtkdfc9NeSUCNWPIJmWl40ZxbEVo8MtVzCoJnrnuvS01fIUqg+72u6P7TM8nK+h0xju9N IQFDLmXMVOnzX6a1qGH4g9setMNCS5UBPsPkl2gsvABXyMxFZwA2Vv8Iu7sJq30SoFshwuUMw Ul1NR6h2om5MOlh8MJH9ygZO7NQdc7KxOx6MQ8TS80YNPHzHszJRJ3Tt/Br3a2s56SR9pMEkn 1tuRE47cpCao83SVLSVgcwgv0WmD6CL4PEFYGezpcbMgNM9ebbAoqi6brDBXCvjrJwGP7l0KR 4TTMBZPLJJ1WqAEA7qteJ0M5kWpB5hoHl6wMKruI+2HNjDL8vpmJe4zRDyVlrFG1b2syw6L+7 X7FmcRWAe2o31wBliSVT88nxdIpy4h0soJrdKoF8BRhQcqLzkyLFmeI/uulZNnjKIWEVNA4dV aXGx0JJBI23cvMr7+FjKSPDZy5sbUOmoOAaqJmIWk05c7iUzWpkXOppSSYYduybJJxffSyz8T AH75zRmSbRqwYsrg3oR2wSklpfqp6sk9GB8JUVuaCSPwQraAFmLevcRZilE/8q7e8/OVVVUmL 6HauXy3bz8nPTZ5KB/fr0AX+IZ4kf21GEqrq7PAST59N1q6AqCW3WOMgkZcWUhLytfktGq+bN W6CIM7S5O0U82onSLu/RvUY9LVoElv/PNCg9ELoVuR6TMtEIy+gSrxnDtr4gfJsyv9rT8rkZg AsZoahxA7KCEDP6fEkrZlI2V5C5oX/BR6upkWEezI35dqSIiXi3cQJT0PFJTr3WMEqWoZNQpi ZWdZp6Q8KRIQr1mcyVE/VqkoPwDUXUUHLvcxMG0eTP1YrDjX1O5qaDBvXHQ43AGIbxT/IKJ7m /3bjM0nVd2q2VWRJ9Oj6xREI7DRG5opyTK/QJICE4xy22oiOq41UxiUow== X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > > It's how all these functions in diary-lib are defined after the lexical > > rewrite -- the `eval' depends on those dynamic variables. > > Ugh! Is it worth it? If we cannot convert these functions to use > lexical-binding, maybe we should say lexical-binding: nil in the first > line of the file, and remove all those gross kludges? That would not work, you would still get warnings about free variables. This case is a bit special and not directly related to lexical-binding because these variables are just not declared with `defvar' (and I think we don't want to introduce global variables like `date'). Michael. From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp. Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Aug 2021 15:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: Lars Ingebrigtsen , hi@ypei.me, 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.16299055623079 (code B ref 50195); Wed, 25 Aug 2021 15:33:01 +0000 Received: (at 50195) by debbugs.gnu.org; 25 Aug 2021 15:32:42 +0000 Received: from localhost ([127.0.0.1]:47339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIutO-0000nb-57 for submit@debbugs.gnu.org; Wed, 25 Aug 2021 11:32:42 -0400 Received: from mout.web.de ([217.72.192.78]:55447) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIutL-0000nM-OJ for 50195@debbugs.gnu.org; Wed, 25 Aug 2021 11:32:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1629905548; bh=5Z/4Xspb4Ww7J/XkSQmCrWRSUqK2DVQDscyZ53X+h68=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=p0WfgWFVE2E1C0qqhb2+BEIxjJOHaFrOeZjwgbyvi+eHWnAuoud5a8TJJCHA9t0nn a9SDvxcS1SMN0/V50I057MTf0klqW210ATTYD9T3t03ADifs6YrbUOBHZPCo0BsBYB wzjOqcCHRez/oE14X56xMTvs8zYlvW4Pho2cQB+Q= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([88.66.201.45]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LiUC0-1mtMdL40i4-00ck4X; Wed, 25 Aug 2021 17:32:28 +0200 From: Michael Heerdegen References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> <875yvtk9ud.fsf@gnus.org> <83fsuxvhih.fsf@gnu.org> <878s0p4kir.fsf@web.de> Date: Wed, 25 Aug 2021 17:32:26 +0200 In-Reply-To: <878s0p4kir.fsf@web.de> (Michael Heerdegen's message of "Wed, 25 Aug 2021 17:22:04 +0200") Message-ID: <874kbd4k1h.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:sbooD/BpcjzV1iM9noXwd6QBJ3IQAJ1VD7Ab0yokhLBMkPemyEG ghUNSLhEjAQ+8q7iwuYcsny3UcwWHNJfqf0kMTMQb3V3vah4hONeXv5CVRELzDFVjW8D35s DG3xidvAM3rkqVyuATyfBkeyqALPPKZR1O7VBjM4zJvBI0R/aLpNC016x2A4MLlYA87Llqp Sz5fXvYLKykRy7bxf8IoA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:uC9TyP1f2x8=:egsJ8uNmIkgNOjhJ4Nabku aXLpowmUJZudQht49JNIipcRwlNWtC4IiJ1DPCeghPeUFDIYkp2zrbSh6G2rs4ZmWM08E5rCr 65HGjOltBf+hucbzbhV9GdQZOtcex2EnptWvGlU3x88+xdO0zo6TL6ImmXCv744huxRTz2Cwj GRawnbw8CqQe2kA6hORkBUdGBIo84yaeDCG1Ab6eFfS/FBGo80b/74A9DI/hz+qIeJ+bxFl+k KaL2m/+I0lKRknjhigS0aNwuygCwfZJbFYqix+blzya3LY+54R3L+8Z6vWkN/Zy+ReCDpr5Ig 9KkuoG/eM1ECEY7t7UbuOGbmJtTyKtOW+KvNBz9DY724seO8VCsMgBsZvMU8Ez9Iw+vTeE8gZ JAxfafvHZjjKVkrs164+aIZwgusMdPBPSYnptjALYNLvN8JHaNzjTyzOpWuaDcJe0OKy/wUyJ DbH4wnGn2Sh0e0B3CEl2CMwtg8ACVp1ijzDXsk+v8CprWswkyboLTkhzKMRDUsVB5l/hmYRpM MRbcxHEXG8Q/orEg0xcueby5i09/TJhvVAwP9YrCzNeSEkjLLKHlBlNC+LdzUd9gGPRAsWnk9 Afv/x+TLP3YwJhagjUCdDpUmcrnp8NHTAbT4n3Xx2O1ILJb2sySOFY731URBcF8UsCln6LTMv 5mthTmPDFL5t3E5ML/sQWTdBmUyntpWNFyCAJ4rbtqV6v5G8fIOYTh9xbsZXeeLdY3iAZ1FcW kw13HbPGEuPKWXqQt3yL6hwn61RpmvXyy/iAVTbgdpf3lCw+uzi67vYD30AxYuVAgrFRGFrYn QfN7tWcwnR7DFvqWTf9G5A/mEZ5CSLaqevltro76hFPDBmqjklENPu5QCpDfsSvhBNcOqOnPs Q6xr+Lr01vv2AjdWYV0olpcX8RslTv3r/XMm5Q7IebqzbIQVA4WJXEcT2tBvEj6TspRH99X0K fcPMmoOamuukgVkS0cXy6AS49iOIkmWIP4GrLv4p1Hyi2mOabV8tRytyvfjWPgdr2qzta4bNB 7lwUtt6rtDpF4TAvMbVybVEwpSqdhUzztO9iYpbzU/+gEztqf0cnM9TNCSYkKLqX9n/+BVh3B 2f6AkC9ndavPYw4PJR6gGd6sMx25Lem+XPmI7NrjhKf6l8+tt+qUyJgKg== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Michael Heerdegen writes: > This case is a bit special and not directly related to lexical-binding > because these variables are just not declared with `defvar' (and I think > we don't want to introduce global variables like `date'). (defvar date) could work, but note that the code uses `date' as function argument variable as well, so adding this would introduce "shadowing" warnings for these appearances. Michael. From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Aug 2021 16:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Michael Heerdegen Cc: larsi@gnus.org, hi@ypei.me, 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.162990767915058 (code B ref 50195); Wed, 25 Aug 2021 16:08:01 +0000 Received: (at 50195) by debbugs.gnu.org; 25 Aug 2021 16:07:59 +0000 Received: from localhost ([127.0.0.1]:47420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIvRS-0003uh-IU for submit@debbugs.gnu.org; Wed, 25 Aug 2021 12:07:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIvRN-0003uH-95 for 50195@debbugs.gnu.org; Wed, 25 Aug 2021 12:07:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52338) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIvRH-00081A-M1; Wed, 25 Aug 2021 12:07:43 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3015 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIvRE-0007l4-Dk; Wed, 25 Aug 2021 12:07:43 -0400 Date: Wed, 25 Aug 2021 19:07:39 +0300 Message-Id: <835yvtv778.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <878s0p4kir.fsf@web.de> (message from Michael Heerdegen on Wed, 25 Aug 2021 17:22:04 +0200) References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> <875yvtk9ud.fsf@gnus.org> <83fsuxvhih.fsf@gnu.org> <878s0p4kir.fsf@web.de> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Michael Heerdegen > Cc: Lars Ingebrigtsen , hi@ypei.me, 50195@debbugs.gnu.org > Date: Wed, 25 Aug 2021 17:22:04 +0200 > > > Ugh! Is it worth it? If we cannot convert these functions to use > > lexical-binding, maybe we should say lexical-binding: nil in the first > > line of the file, and remove all those gross kludges? > > That would not work, you would still get warnings about free variables. I don't understand. This code did compile under dynamic-binding, so what warnings did you have in mind? > This case is a bit special and not directly related to lexical-binding > because these variables are just not declared with `defvar' (and I think > we don't want to introduce global variables like `date'). You are saying this always emitted warnings? From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp. Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Aug 2021 16:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: larsi@gnus.org, hi@ypei.me, 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.162990858724911 (code B ref 50195); Wed, 25 Aug 2021 16:24:02 +0000 Received: (at 50195) by debbugs.gnu.org; 25 Aug 2021 16:23:07 +0000 Received: from localhost ([127.0.0.1]:47464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIvg8-0006Tg-17 for submit@debbugs.gnu.org; Wed, 25 Aug 2021 12:23:07 -0400 Received: from mout.web.de ([212.227.15.4]:33929) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIvg2-0006Sc-KC for 50195@debbugs.gnu.org; Wed, 25 Aug 2021 12:23:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1629908568; bh=9A1U2GGqCCkFgjuUpK93aSiuS7OZpgarMpychjhnrW8=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=e6TfEBqCla9HnGNjA1oZfeFrzcgusv17OoWxGbuAM1qeDqintKsBxoOKOX3U9hFVb OYsAnKZGJ10hKRhwg3XdZD1SIyfCc0QRlgzcC9tykBXeeAgWV020zwiPxMudgJdvwX ygaQIgXZ83TzO2JGUYzy65bvzX7bzYTAoeWWA7Kk= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([88.66.201.45]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MA5tp-1mCYxV0DSj-00BLaK; Wed, 25 Aug 2021 18:22:48 +0200 From: Michael Heerdegen References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> <875yvtk9ud.fsf@gnus.org> <83fsuxvhih.fsf@gnu.org> <878s0p4kir.fsf@web.de> <835yvtv778.fsf@gnu.org> Date: Wed, 25 Aug 2021 18:22:46 +0200 In-Reply-To: <835yvtv778.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Aug 2021 19:07:39 +0300") Message-ID: <87v93t3355.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:2zvFub4XOBoZNXPng3gaGae2VV+DHH6M2Xa7TZESVmvy7BS+1sm GsccERWD1a3hironHgD8ln792/7Bay49t9BMljBQdxSdJ7T44bcfIv2jX7Is7433OpaPApB BNrnwyI5NTh/D0dh0hsvl0kCIkUubbQca4sn5JPgE8SgO7mTprwMjhu4SgEbIeEIEk2v6DI zBhH/hFXKA95L4okcX8yQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:sCW0t5uIwwk=:HEDWv8L2q/MNBJS4ncZ0mv lA9zug3O8vEPSLlr1C3o+3QvFKgkCGaX5ryiH2PjRXatOhjxqG1ygBMFCu02bAryFdKYqVkmP DZhQI/UTz+n0+O3zp0hpilvoSvafY+B0vwUw7tfcmk0q0mqccJhpMfaGOnDuLOt5J+4C7bFK+ xloTY15Dngk+PpF/HnfrjXPAV3IuktiaGnZCXAnpsxSKGy+IzmjYOWrNXstFGIgh+r3m+q2by LeiirAtBcPaqDv+9JwxTk1ySl1tmXiT6lcE2X43d1tL22LmLaJ5hKCDCZqJ8o4sLK1XYlZtEE WgVAfRHo19NaM/Gf16CYoJVQxKtPdbYks3K3OOoYXTYG5REYWk3+OUVN7E+pQfnKWEx18MUKV 9m06M/LUprzhGULCfWyEbHel0skHZrlmVMVbBqX8gMzkg2hUArQrOqfmeR7C/cBvkzAM/CnCh 7Mv1xmfo9rd/FOQ+1piPaqn2mmTpZWy22Hi6pTM41miENiNb0CS5s1ikBYQctA5PQMcjRHSfN vf6zfCPW60/jtqCY7NhnvU8ZEXhJmeNb6bdUs8/B/WyrTKJ5dYetpGKQTBsO9RPCnbo53eRJn MFt+HaIl2GMQ9t7pjIt1Qjk0FUGQpFvJ5JaJ2T43JxrSuU3m54vrd0Z/C7v7IdtEbQ6w1tOaS AtTovT1NQSQIBOAOeHca8d704CmZECG4LBlaLfHcqmnP2fBrYwEmKNvi5TqRoGFPe9bn4b0r0 g+sGp+JOmdSudQkXlBL80giwYTzhN4LkYOrmZwB//0MIYvKt+gXQYY4yah0Mn8z4wu1eXWLfk s5ZBie5tW51Zj80fvIS1PTLeoDpz14YLRvRJ5w1dUeYftNI0uU67gbyppYjzplupEBvyN0lXF nObm1pkZY2wZoHLW2rPaH0APtiyqSdGGM414pDi6Bh/c29FscRpzCDKkEgxDSRSH1bitkBOcV +IV/txbwGLQOqyLz+HoWgXYZKZI+75IlSx0oGOM979b9daBMncVXV29Xg44hqfjcaulXPtM49 jOiLr13vOHeeuq/Cc0GZGwjMYLRQr2hR+Bil0T7gAJBwJj4+C8G6YYJ81do1IrCYf+kSSx/5Z bG7P5k0TKfctRtn801kYxwZwNDVXPncCs98Dr5610EoZZA4HeXipPKlpQ== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: > > That would not work, you would still get warnings about free variables. > > I don't understand. This code did compile under dynamic-binding, so > what warnings did you have in mind? You can just try, they look like | In diary-list-entries-1: | diary-lib.el:731:17: Warning: reference to free variable =E2=80=98number= =E2=80=99 | diary-lib.el:734:48: Warning: reference to free variable =E2=80=98list-on= ly=E2=80=99 I just removed lexical-binding from the header and commented the `with-no-warnings' call in `diary-list-entries-1'. > > This case is a bit special and not directly related to lexical-binding > > because these variables are just not declared with `defvar' (and I think > > we don't want to introduce global variables like `date'). > > You are saying this always emitted warnings? AFAIR there have been problems with these variables and warnings about them for a long time, and different measures to handle them. I think (I'm not sure) we had (defvar date) in the file in the past. If you want to have any useful information you must ask Stefan, he was the one that worked on that. Michael. From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset to diary-lib.el Resent-From: Yuchen Pei Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Aug 2021 06:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.16299605872486 (code B ref 50195); Thu, 26 Aug 2021 06:50:02 +0000 Received: (at 50195) by debbugs.gnu.org; 26 Aug 2021 06:49:47 +0000 Received: from localhost ([127.0.0.1]:48223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJ9Cs-0000e2-Lj for submit@debbugs.gnu.org; Thu, 26 Aug 2021 02:49:46 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:33981) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJ9Cp-0000dM-L1 for 50195@debbugs.gnu.org; Thu, 26 Aug 2021 02:49:45 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 63C2D3200924; Thu, 26 Aug 2021 02:49:37 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 26 Aug 2021 02:49:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h= references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm2; bh=mw6rNNhR/+doW7Qmql4uoqiU4y rqm6MPvZOF4Yaupr0=; b=cXcWo2fDwCTBJU34z2YUlvK3Y1SKmfHwHdbsTkYZGj HrtsoI6+tseod2y0egOK9rczBiBWQBirfS1zTlNfw/LmHVwfBEqMO2b88wza02Yv 31HuBJq6BZToZAmdG4O59AyuTAJV4uLZFnCbPrI2RJ9nBqxCv6hz1JZVNzPEKnJX WHC6ugfeuybw8euLMA2iigT4SIDYaDKYvYUvJY0ElmRAOR8xmKAeIF1toKY5EOVa Eh7uQ6yfWu6ixe3Oaglx7Pto0ZnDkmRDkXYu62/fUvQJlKDqX2zE7RZ3HAjrPdG2 14jHmeXlbd9G9U0KPwk7HbQIwnAOGCw/z9QWjDgaGWuA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=mw6rNN hR/+doW7Qmql4uoqiU4yrqm6MPvZOF4Yaupr0=; b=eOB87yq34KKtRrLg7jVmB8 0LSdm48m5hfjmqktMTj27ySgexH3/iURQ3UBXRcmlDBJ4BCOrOOoj5HNUj85vWXL EA7ir9J99xjAiLZxkRfWntF9d8AQ5RVVNjcju+8XqNL+GYjT54qXWe818Dne6Vcn ocpyQX/tKlW8CXEKTF0hL3i1gVfWbkw25swMa52le1EsW4PUFeyfipcjUT0KCImA Qc5bockYXVQeFVExBaIE60HTdClLVFP+yZ1gF/6uSijU0Gnv2TTQMpnGWWHaxIuM 2bn3tTOf+mh7bWYdrEoEG5Je5selcsr3qwmHyQQwN3ituNu7SQi10qxf3g98/0sQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddutddgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvffujgffkfggtgesghdtreertdertdenucfhrhhomhepjghutghh vghnucfrvghiuceohhhiseihphgvihdrmhgvqeenucggtffrrghtthgvrhhnpeektdffhf eliefgheeuveeiueeukedvgfevgeehieduueffvdfgjeelieejveehteenucffohhmrghi nhephihpvghirdhmvgenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehhiheshihpvghirdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Aug 2021 02:49:35 -0400 (EDT) References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> User-agent: mu4e 1.4.13; emacs 27.2 From: Yuchen Pei In-reply-to: <83mtp5vizs.fsf@gnu.org> Date: Thu, 26 Aug 2021 16:49:29 +1000 Message-ID: <87mtp4bszq.fsf@ypei.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; format=flowed Thanks for the comments. Eli Zaretskii writes: >> From: Yuchen Pei >> Date: Wed, 25 Aug 2021 13:46:48 +1000 >> >> See below my first patch to Emacs. The copyright assignment >> has >> already been done BTW. > > Congrats, and welcome aboard. > >> Let me know what you think. > > Some minor comments below. > >> Would you like me to add some tests? > > Adding more tests is always welcome, thanks. All diary sexp tests are in icalendar tests, but diary-offset does not easily translate to icalendar events (exporting to icalendar for this sexp is rather complicated if not impossible as it applies on top of another arbitrary sexp), so I am just adding a simple no-op-like test. > >> Subject: [PATCH] Adding diary-offset, a diary-sexp offsetting >> another >> diary-sexp. > > "git am" uses the Subject for the heading line, and this Subject > is > too long for that. Please consider making it shorter. Done. > >> A bit like diary-remind, as a diary-sexp rather than reminder, >> and >> also support both positive and negative offsets. >> >> This is useful when for example your organization has a >> committee >> meeting two days after every monthly meeting which takes place >> on the >> third Thursday, or if you would like to attend a virtual >> meeting >> scheduled in a different timezone causing a difference in the >> date. > > The commit log message should include a ChangeLog-style > description of > the files and functions where you made the changes. See > CONTRIBUTE > for more details about the format we prefer. > > Also, please in the next version include the bug number as part > of the > log message. Done. > >> --- a/doc/emacs/calendar.texi >> +++ b/doc/emacs/calendar.texi >> @@ -1363,6 +1363,20 @@ Special Diary Entries >> Thursday of January, February, and March. If the month is >> @code{t}, the >> entry applies to all months of the year. >> >> +@findex diary-offset >> +@example >> +%%(diary-offset '(diary-float t 3 4) 2) Monthly post-event >> committee meeting > > That line is too long, and will overflow the page width in the > printed > version of the manual. Please break it in two. Done. I made it shorter :) > >> +@noindent >> +This entry applies to the Saturday after the third Thursday of >> each >> +month. The 2 specifies number of days after when the sexp >> +@samp{'(diary-float t 3 4)} would evaluate to @code{t}. This >> is > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > This should be in @code, not @samp. I'd also wrap it in @w{..}, > so > that it doesn't get broken between two lines. Done. > >> +(defun diary-offset (sexp days) >> + "Offsetted diary entry. > > The first line of a doc string should preferably mention the > arguments, but without becoming too long, so it could still fit > on a > single line. Done. > >> + (with-no-warnings (defvar date) (defvar entry)) > > Why did you need this? The sexp diary-offset itself requires the date supplied by diary-sexp-entry. The sexp passed to diary-offset will ask for both date and entry. Removed (defvar entry) as this is not needed by diary-offset. After the removel I tested it in org mode and org agenda and it works. > >> + (integerp days) > > Isn't it better to use an assertion? Done. Added a user-error statement like in diary-cyclic. > > Thanks. -- Best, Yuchen PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYSc5eQscaGlAeXBlaS5t ZQAKCRAhJn6T74bf0OEmAQDbDOE2DIGmKzZr7hXzCFI9FTlEpcd9KaKDqXJBLFOj IAEA0H/5kD0cIvm+QJFFPU3edNA2Ecb2G8/FJAauOAnupAc= =Xil4 -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp. Resent-From: Yuchen Pei Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Aug 2021 06:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Michael Heerdegen Cc: Eli Zaretskii , larsi@gnus.org, 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.16299607562811 (code B ref 50195); Thu, 26 Aug 2021 06:53:01 +0000 Received: (at 50195) by debbugs.gnu.org; 26 Aug 2021 06:52:36 +0000 Received: from localhost ([127.0.0.1]:48236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJ9Fc-0000jH-3p for submit@debbugs.gnu.org; Thu, 26 Aug 2021 02:52:36 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:58829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJ9Fa-0000j5-IX for 50195@debbugs.gnu.org; Thu, 26 Aug 2021 02:52:35 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id CA9F03200915; Thu, 26 Aug 2021 02:52:28 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 26 Aug 2021 02:52:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h= references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm2; bh=4OmpQ8V8QamgOP6JVdtvsVgv3l TFRJtkjexK/cmEaio=; b=Hazw6VAEBDD1FlOlpgg+n0Q9PriFjpSgx1iHZ/fopx CKNO3TjfTeoLzZhgop4Ud7lxLHBHuZo9yHT6H4jMvKoBztsNCqiFKZyBNQ1alxTa 4n10o7q8cl2/cFnKUHVBdHLHLI8+MUbuQXDCzes8iIMW3cgafGp0Nh5zhfKbCKIM dEWM+p//orfv799jNv5YgnqLAiD8EVSSftBRvwHSd6VNyTPQ/UMPE+BHd0XYthpc 1qZJFjty4V0JhsrTUuU+VTG/MaXmay1RhpWd91AjSTJ4P3DV/QvIszvFrwEEjdAz 84kReo7XGxbMbwP+KB8rRkvK3r8GC/4tCwXdISiXBaGw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=4OmpQ8 V8QamgOP6JVdtvsVgv3lTFRJtkjexK/cmEaio=; b=p3bOnyzJbmoHhgXOsy9t6C uirKGyz6yhG7FWlcv3AkBd/pQOj8309IiXXQvPAZ0/bD0s6TjCSnvckLaQlvE+QN hEyMeohUV3amKhZZHmZKzSF3KdM09C1tHU5NbImlqBPKsT8UqKtnlJ0prgJgTXtI PvRJqpiSx+hF1yRJgUBnJJoVFqgRHQWoOBdJ1DHU9SGoCTgGnspfoDhdRmtXSGVW h8Y8KUG2uJhoWh2M6clwaXZt13q8zkFyiOGTtRnnQEcyke2N2KUCMJH8TBTqhWsL Y1t2/7J7lAoOGOlFA+lmRnwyaS3KTxzxkzLZlk2M2yrq8Ikiill1aHbO3Fpfq2Lg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddutddguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvffujgffkfggtgesghdtreertderjeenucfhrhhomhepjghutghh vghnucfrvghiuceohhhiseihphgvihdrmhgvqeenucggtffrrghtthgvrhhnpefggffhie eiuddtudejffdvkefgudellefhteefleffffejgfelleehvdekteejjeenucffohhmrghi nhephihpvghirdhmvgenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehhiheshihpvghirdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Aug 2021 02:52:25 -0400 (EDT) References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> <875yvtk9ud.fsf@gnus.org> <83fsuxvhih.fsf@gnu.org> <878s0p4kir.fsf@web.de> <835yvtv778.fsf@gnu.org> <87v93t3355.fsf@web.de> User-agent: mu4e 1.4.13; emacs 27.2 From: Yuchen Pei In-reply-to: <87v93t3355.fsf@web.de> Date: Thu, 26 Aug 2021 16:52:23 +1000 Message-ID: <87k0k8bsuw.fsf@ypei.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Michael Heerdegen writes: > Eli Zaretskii writes: > >> > That would not work, you would still get warnings about free=20 >> > variables. >> >> I don't understand. This code did compile under=20 >> dynamic-binding, so >> what warnings did you have in mind? > > You can just try, they look like > > | In diary-list-entries-1: > | diary-lib.el:731:17: Warning: reference to free variable=20 > =E2=80=98number=E2=80=99 > | diary-lib.el:734:48: Warning: reference to free variable=20 > =E2=80=98list-only=E2=80=99 > > I just removed lexical-binding from the header and commented the > `with-no-warnings' call in `diary-list-entries-1'. Which command did you use to compile? I compiled with just `make`=20 and there was no warning. > >> > This case is a bit special and not directly related to=20 >> > lexical-binding >> > because these variables are just not declared with `defvar'=20 >> > (and I think >> > we don't want to introduce global variables like `date'). >> >> You are saying this always emitted warnings? > > AFAIR there have been problems with these variables and warnings=20 > about > them for a long time, and different measures to handle them. I=20 > think > (I'm not sure) we had (defvar date) in the file in the past. If=20 > you > want to have any useful information you must ask Stefan, he was=20 > the one > that worked on that. > > Michael. =2D-=20 Best, Yuchen PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYSc6JwscaGlAeXBlaS5t ZQAKCRAhJn6T74bf0NTCAP9A4sl6nyLSzXDSBcb/b2IfSk0pRMNAon8CMHaBE8bR fQD/RdPNm+Ceenul5WKiNk6JcMRNW1w+kdJpruKV4X9kMwc= =K8k6 -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset to diary-lib.el Resent-From: Yuchen Pei Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Aug 2021 06:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Cc: eliz@gnu.org, 50195@debbugs.gnu.org X-Debbugs-Original-Cc: Eli Zaretskii , bug-gnu-emacs@gnu.org, 50195@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16299608522973 (code B ref -1); Thu, 26 Aug 2021 06:55:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 Aug 2021 06:54:12 +0000 Received: from localhost ([127.0.0.1]:48241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJ9H9-0000ls-Hj for submit@debbugs.gnu.org; Thu, 26 Aug 2021 02:54:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:55296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJ9H8-0000lk-95 for submit@debbugs.gnu.org; Thu, 26 Aug 2021 02:54:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJ9H7-0008Nk-VO for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2021 02:54:09 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:49755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJ9H5-0008L7-RD; Thu, 26 Aug 2021 02:54:09 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id B39BD3200302; Thu, 26 Aug 2021 02:54:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 26 Aug 2021 02:54:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h= references:from:cc:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm2; bh=HqsXuDJqQDzLbSLNnJTAYzDx0P qwtvDdq0WVCHDEwWk=; b=VfJ5F+GJ3GSKBZ2Xs1mvXvO8szJSD6CLyBAKTJCGAA jisUwOxt1FQeiOS0z5Zky/xSQmxLaNvjWztZcZO7fHEe45HzJ9zl2VLIvp4I8Eyr weEfUq0O3rclFWFODhay2Fqg2X6Vu7ZnmF4ERrgHxneKisbs5k6CCyboVmpFxpY3 XDSvTwnc+07/PUUS99qfWRwM+CvuarBrsXmm57daPq12wyZ/JAgGc0iSmOoCqfiz aKGeRNmk38fCYrfx6loElpHUqfixh2SiVADACbPVG6B2wOjHoH/YdJnIwk13xq/q NuaFcbcWSTdvQgpopAjFGPBiw9CKuNleNC4sdrg9hUNg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=HqsXuD JqQDzLbSLNnJTAYzDx0PqwtvDdq0WVCHDEwWk=; b=cQQI+ZW2g9R4JuihBoJpUp FUOtcGt+zfnno3froYWXwL4YK5WRnSyE+pNE+cEtPxmS2AzbPKHPa9/7XZ+PZwFv Byt3GOdEfzm3hfOge1dJ4mj1Ck5xba4gjHTCvZwLBhB64ZG1WouXTZh2iGu4W7bI 0J2cNy1JeRWiOM03OzFKcVweJhdtZdBWU/Ln/et6p7XwNa02WD8gJmv5ANSog2a0 ls5SVpyiqd0/j+PZkqECR8vZcw3NFqti+Wos+qfD9xJ56Iu5WiWfMfxhG42pt442 orhnpVE3dyGXpLE+XxLPS5CfDOIX9ePKuxSwh4lPmhRRcYVYggXLiksGAUNIv3kQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddutddguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enmhhishhsihhnghcuvffquchfihgvlhguucdlfedtmdenucfjughrpehffgfhufgjfffk gggtsehgtderredtredtnecuhfhrohhmpegjuhgthhgvnhcurfgvihcuoehhiheshihpvg hirdhmvgeqnecuggftrfgrthhtvghrnhepieduhfeivedvtdfhfeelgeelteeltddtheev heejtdejgfetgeeuueeuudehveevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhephhhiseihphgvihdrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Aug 2021 02:54:03 -0400 (EDT) References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> <87mtp4bszq.fsf@ypei.me> User-agent: mu4e 1.4.13; emacs 27.2 From: Yuchen Pei In-reply-to: <87mtp4bszq.fsf@ypei.me> Date: Thu, 26 Aug 2021 16:54:00 +1000 Message-ID: <87h7fcbss7.fsf@ypei.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=64.147.123.25; envelope-from=hi@ypei.me; helo=wout2-smtp.messagingengine.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, MISSING_HEADERS=1.021, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.4 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; format=flowed Sorry, forgot the attach the patch. Here it is. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Adding-diary-offset-to-diary-lib.el.patch Content-Transfer-Encoding: quoted-printable From=204df9db3eeb3b048579768050ae7bb413fefe9557 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Wed, 25 Aug 2021 13:37:20 +1000 Subject: [PATCH] Adding diary-offset to diary-lib.el. A new diary sexp that offsets another diary sexp (Bug#50195). * doc/emacs/calendar.texi: Document the change. * lisp/calendar/diary-lib.el (diary-offset): * test/lisp/calendar/icalendar-tests.el: Add a test. =2D-- doc/emacs/calendar.texi | 14 ++++++++++++++ etc/NEWS | 8 ++++++++ lisp/calendar/diary-lib.el | 11 +++++++++++ test/lisp/calendar/icalendar-tests.el | 7 +++++++ 4 files changed, 40 insertions(+) diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index 3750e78e70..18de721e28 100644 =2D-- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -1363,6 +1363,20 @@ Special Diary Entries Thursday of January, February, and March. If the month is @code{t}, the entry applies to all months of the year. =20 +@findex diary-offset +@example +%%(diary-offset '(diary-float t 3 4) 2) Monthly committee meeting +@end example + +@noindent +This entry applies to the Saturday after the third Thursday of each +month. The 2 specifies number of days after when the sexp +@w{@code{'(diary-float t 3 4)}} would evaluate to @code{t}. This is +useful when for example your organization has a committee meeting two +days after every monthly meeting which takes place on the third +Thursday, or if you would like to attend a virtual meeting scheduled +in a different timezone causing a difference in the date. + Each of the standard sexp diary entries takes an optional parameter specifying the name of a face or a single-character string to use when marking the entry in the calendar. Most generally, sexp diary entries diff --git a/etc/NEWS b/etc/NEWS index 07a78216b8..52774b3463 100644 =2D-- a/etc/NEWS +++ b/etc/NEWS @@ -2800,6 +2800,14 @@ never be narrower than 19 characters. 'gomoku-move-sw' and 'gomoku-move-ne' now work correctly, and horizontal movements now stop at the edge of the board. =20 ++++ +*** New diary sexp 'diary-offset'. +It offsets another diary sexp by a number of days. This is useful +when for example your organization has a committee meeting two days +after every monthly meeting which takes place on the third Thursday, +or if you would like to attend a virtual meeting scheduled in a +different timezone causing a difference in the date. + ** xterm-mouse mode =20 --- diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index f57fe26058..f71392b97f 100644 =2D-- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -2014,6 +2014,17 @@ diary-cyclic (and (>=3D diff 0) (zerop (% diff n)) (cons mark (format entry cycle (diary-ordinal-suffix cycle)))))) =20 +;; To be called from diary-sexp-entry, where DATE, ENTRY are bound. +(defun diary-offset (sexp days) + "Offsetted diary entry. Offsets SEXP by DAYS days. +Entry applies if the date is DAYS days after another diary-sexp SEXP." + (with-no-warnings (defvar date)) + (or (integerp days) (user-error "Days must be an integer")) + (let ((date + (calendar-gregorian-from-absolute + (- (calendar-absolute-from-gregorian date) days)))) + (eval sexp))) + (defun diary-day-of-year () "Day of year and number of days remaining in the year of date diary entr= y." (with-no-warnings (defvar date)) diff --git a/test/lisp/calendar/icalendar-tests.el b/test/lisp/calendar/ica= lendar-tests.el index 6973f7e5c9..de2a891758 100644 =2D-- a/test/lisp/calendar/icalendar-tests.el +++ b/test/lisp/calendar/icalendar-tests.el @@ -1442,6 +1442,13 @@ icalendar-real-world SUMMARY:ff birthday (%d years old)") =20 =20 + (icalendar-tests--test-export + nil + nil + "%%(diary-offset '(diary-float t 3 4) 1) asdf" + nil) + + ;; FIXME! =20 ;; export 2004-10-28 monthly, weekly entries =2D-=20 2.33.0 --=-=-= Content-Type: text/plain; format=flowed Yuchen Pei writes: > Thanks for the comments. > Eli Zaretskii writes: > >>> From: Yuchen Pei >>> Date: Wed, 25 Aug 2021 13:46:48 +1000 >>> See below my first patch to Emacs. The copyright assignment >>> has already been done BTW. >> >> Congrats, and welcome aboard. >> >>> Let me know what you think. >> >> Some minor comments below. >> >>> Would you like me to add some tests? >> >> Adding more tests is always welcome, thanks. > > All diary sexp tests are in icalendar tests, but diary-offset > does not > easily translate to icalendar events (exporting to icalendar for > this > sexp is rather complicated if not impossible as it applies on > top of > another arbitrary sexp), so I am just adding a simple no-op-like > test. > >> >>> Subject: [PATCH] Adding diary-offset, a diary-sexp offsetting >>> another >>> diary-sexp. >> >> "git am" uses the Subject for the heading line, and this >> Subject is >> too long for that. Please consider making it shorter. > > Done. > >> >>> A bit like diary-remind, as a diary-sexp rather than reminder, >>> and >>> also support both positive and negative offsets. >>> This is useful when for example your organization has a >>> committee >>> meeting two days after every monthly meeting which takes place >>> on >>> the >>> third Thursday, or if you would like to attend a virtual >>> meeting >>> scheduled in a different timezone causing a difference in the >>> date. >> >> The commit log message should include a ChangeLog-style >> description >> of >> the files and functions where you made the changes. See >> CONTRIBUTE >> for more details about the format we prefer. >> >> Also, please in the next version include the bug number as part >> of >> the >> log message. > > Done. > >> >>> --- a/doc/emacs/calendar.texi >>> +++ b/doc/emacs/calendar.texi >>> @@ -1363,6 +1363,20 @@ Special Diary Entries >>> Thursday of January, February, and March. If the month is >>> @code{t}, the >>> entry applies to all months of the year. >>> +@findex diary-offset >>> +@example >>> +%%(diary-offset '(diary-float t 3 4) 2) Monthly post-event >>> committee meeting >> >> That line is too long, and will overflow the page width in the >> printed >> version of the manual. Please break it in two. > > Done. I made it shorter :) > >> >>> +@noindent >>> +This entry applies to the Saturday after the third Thursday >>> of >>> each >>> +month. The 2 specifies number of days after when the sexp >>> +@samp{'(diary-float t 3 4)} would evaluate to @code{t}. This >>> is >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> This should be in @code, not @samp. I'd also wrap it in >> @w{..}, so >> that it doesn't get broken between two lines. > > Done. > >> >>> +(defun diary-offset (sexp days) >>> + "Offsetted diary entry. >> >> The first line of a doc string should preferably mention the >> arguments, but without becoming too long, so it could still fit >> on a >> single line. > > Done. > >> >>> + (with-no-warnings (defvar date) (defvar entry)) >> >> Why did you need this? > > The sexp diary-offset itself requires the date supplied by > diary-sexp-entry. The sexp passed to diary-offset will ask for > both date and entry. Removed (defvar entry) as this is not > needed by > diary-offset. After the removel I tested it in org mode and org > agenda and it works. > >> >>> + (integerp days) >> >> Isn't it better to use an assertion? > > Done. Added a user-error statement like in diary-cyclic. > >> >> Thanks. -- Best, Yuchen PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYSc6iAscaGlAeXBlaS5t ZQAKCRAhJn6T74bf0NNcAP0YyrXdx/ZCGNdbmVwKXT2z61A75dwJmWYP42xwAVL6 WgD/QcqsPuWlvvfCY0cwdZ6P9Gopi8XMKOB2GLb9U0s+aQE= =JvQg -----END PGP SIGNATURE----- --==-=-=-- From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp. Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Aug 2021 09:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Yuchen Pei Cc: Eli Zaretskii , larsi@gnus.org, 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.162996998326045 (code B ref 50195); Thu, 26 Aug 2021 09:27:02 +0000 Received: (at 50195) by debbugs.gnu.org; 26 Aug 2021 09:26:23 +0000 Received: from localhost ([127.0.0.1]:48395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJBeN-0006lx-Id for submit@debbugs.gnu.org; Thu, 26 Aug 2021 05:26:23 -0400 Received: from mout.web.de ([212.227.15.3]:38975) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJBeI-0006ld-FY for 50195@debbugs.gnu.org; Thu, 26 Aug 2021 05:26:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1629969965; bh=lJoq+raVn0wmKtQ6jGm3zc/GkAeo6uO4WfcJ+Is54Co=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=j/DxRFvFNj/kbhBNTJ4xDcWDWkFNG/xRbR+4akqcIi5FV66B8NURkRALC949Pac21 b83mExXUdcwl2JMe0omR2iCkLttZDLcPVDr++AJLUwJ3NZ3bzi8ssgVXd4J9cH88zP qlfs3LZwb5b9EWC4aqB5kyXKb/OP04Y58XKixKbM= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([88.66.201.155]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lh90R-1mmD4E19RH-00oYOS; Thu, 26 Aug 2021 11:26:05 +0200 From: Michael Heerdegen References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> <875yvtk9ud.fsf@gnus.org> <83fsuxvhih.fsf@gnu.org> <878s0p4kir.fsf@web.de> <835yvtv778.fsf@gnu.org> <87v93t3355.fsf@web.de> <87k0k8bsuw.fsf@ypei.me> Date: Thu, 26 Aug 2021 11:26:03 +0200 In-Reply-To: <87k0k8bsuw.fsf@ypei.me> (Yuchen Pei's message of "Thu, 26 Aug 2021 16:52:23 +1000") Message-ID: <87wno8iml0.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:P07zHTZzPLgSahycXBNjZyyx1PQxbW/KKw2xm3k269X7Boo/WQW 4tdhzxtAOserJcX3LymKOub1iKAZgzrwDWwUlBLiFqho3FWHGnDM0WPfdvC3jARjLazZhxa ovGJyOlevUzFjaO4N9n229C/2Y0E1M/8zNa0xpSIl35QnDJPmuPPutk9rGoTx1ba4wG6Rlb Kf5YwUijtZRm8SBIhuyuA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:utKtpcQBzF8=:ZrYYtcriKDzD0M6osw+y79 6sGIOcXKbxGILqKPabs5XT1acbe2HQq0AK8axiuxg7tFFfn3k+xB6C1znd8r6rD7YD4yAyMcg IhcmOshtQRnhLyavTcTufaoG25EZtgHMlC9xYsWR64xH+oHY5aTw441sFnLpHk4hzyBgO52St NuV4kmrUX8ppZR28jwWAtz4+zAYWi+Bg1C4mMoNBQDwdTcoZnG3F8miKiuRr5ed0x6LdZKLDj 0GyMMhrS/lvzrY/7vzOiLnhCSFh7gmBv+66OuNIY+h+II3h/f1H92AamPA3ZIGHGxOfFTDwI1 gJBmzAmEBkaEBvF4AuyYUp++u81bPONPyEm3C7pHCzCIZwtWiWEyqHCi0DyjZVyPqx2/paeon HTixFiPbeQmd2AyBm5BF3aaTlnZXvqfR27KDx/WfSVaR5OcKc6T+19n8dGZB+dxsZ57ETk82c CzNIWgX8GmDL+ynfVWk4Dx3tBgoD4YIp/3BXmUUe6LEwWs3kyNgU+2Xb9Da+xdQp8zZag51fZ kotroZPmctcEpAinePThHeXlxwjhWZq80DVzeZYPQFdOGxm/dXfvMGrWs9nMNoeLUXJgvl9If 9/SBUUhwrg5Fc9Z8IX+GsmI0+BUzcXH/SUOlDNPisfD6gi5NjqDoyVKQhlZN+YodfVTzXQAkn JUfkZ7x02l2Nd9qgjfIU+u0ddXxpoBsh090hunnlkvtx2MbdheMVn6iy3645C9Ru6t7/MAtoC ZkfaHv6AajRaSwSFMNwBfPpqqXpsecIkwVS9A1zjYSkZlsV/sP05Tkg+xkMeV7Uf2/JYkFioQ PKYZYapgZOYbEyU+CMfGtrgmNBmfHyvMRvbC/KTyJ+tgNTOGDxLSjkiJOvm+vVFhXBGD0sgkL 0cwkMMbeW9/daI2dK1R3/Iay/2XeLPs86SF6h6Fj40mo0Jo9Y81NV06Bs219MTdDmmieRqGEF FrJtZ0AjfZ440Yqip0W97J5za5w3RvewD96feMG6COnk1Z+MBXKOsmDn8f+c9eEs+/Jh7rzlS 9AjNHI/AMMo9+0hCQ2/jfB0Yo8CwW8N8sdqPeFjw6dDlv7+gE0BF1hAOngTeosQYcfArNczPs fLF+g0orHzd/9Nr+MuPivywetvRQ8VE2u321qY6ixKvxHKmZzE3woR5pA== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Yuchen Pei writes: > > I just removed lexical-binding from the header and commented the > > `with-no-warnings' call in `diary-list-entries-1'. > > Which command did you use to compile? I compiled with just `make` and > there was no warning. B from dired. But I get these warnings also with "make", just tried now (using master). To avoid misunderstandings, this is what I tried: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Test-warnings-in-diary-lib.patch Content-Transfer-Encoding: quoted-printable =46rom b1f973c7c5ed6591bb7132b9254ee549f44162d2 Mon Sep 17 00:00:00 2001 From: Michael Heerdegen Date: Thu, 26 Aug 2021 11:21:14 +0200 Subject: [PATCH] Test warnings in diary-lib =2D-- lisp/calendar/diary-lib.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index f57fe26058..8044768476 100644 =2D-- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -1,4 +1,4 @@ -;;; diary-lib.el --- diary functions -*- lexical-binding:t -*- +;;; diary-lib.el --- diary functions ;; Copyright (C) 1989-1990, 1992-1995, 2001-2021 Free Software ;; Foundation, Inc. @@ -726,7 +726,6 @@ diary-list-entries-1 MONTHS is an array of month names. SYMBOL marks diary entries of the typ= e in question. ABSFUNC is a function that converts absolute dates to dates of the appropriate type." - (with-no-warnings (defvar number) (defvar list-only)) (let ((gdate original-date)) (dotimes (_ number) (diary-list-entries-2 =2D- 2.30.2 --=-=-= Content-Type: text/plain Michael. --=-=-=-- From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp. Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Aug 2021 10:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Yuchen Pei Cc: 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.162997362732327 (code B ref 50195); Thu, 26 Aug 2021 10:28:02 +0000 Received: (at 50195) by debbugs.gnu.org; 26 Aug 2021 10:27:07 +0000 Received: from localhost ([127.0.0.1]:48413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJCb9-0008PI-9y for submit@debbugs.gnu.org; Thu, 26 Aug 2021 06:27:07 -0400 Received: from mout.web.de ([212.227.15.4]:55161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJCb3-0008Oj-BB for 50195@debbugs.gnu.org; Thu, 26 Aug 2021 06:27:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1629973607; bh=ecYSg9dhac/2aflRqkdR+M2A2uvbbaCgZ82VyQtDHfo=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=TgAakzkm7MveTN5hVTb7fPV2zRy1ScYpBwcBqwIi6IfnsRfRpUkZsa27QU5yZEKEp b1BAMeecDJ9cFeDX5ssKhcNmVkXtB8nmQJEICgBFvkYozlhe5HS0xev+a6fv9WbTv5 tjcnxkAHnDi5XDF/LejlUa+LR/YFJs++SxafqGGQ= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([88.66.201.155]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MElZP-1mG9ee2aa3-00GLO2; Thu, 26 Aug 2021 12:26:47 +0200 From: Michael Heerdegen References: <87fsuychjr.fsf@ypei.me> Date: Thu, 26 Aug 2021 12:26:46 +0200 In-Reply-To: <87fsuychjr.fsf@ypei.me> (Yuchen Pei's message of "Wed, 25 Aug 2021 13:46:48 +1000") Message-ID: <874kbcijrt.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:61IUJwQwJYMabGG1O3Rjs+BO4yx+YQxaCMhDV0Q6sMeV8/rG5DI iD+J7XFQAGya7yxfchLDEye6c42R+dtTJRAuR0RaglvwW1vAH25y2uo/jo/7z39xLcQD4ji PrxfC+YvGK0frijM0V8QMsT0iiiL0CxWnMn85FbcyCgxOT8D885PeIp8isjPQcwXMXaNNd8 2b2dGKnEyauyUwO2D15cQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:uCbdNdbeMQ4=:zPmCCsWbLicwX/NFETuNrN Sy7seNgO8XBI5SUT3B6Y2xL+sDnGNspyjObP7RSo+mGP0Jna6mhOMUJUyz/FzlOjn71BN1gN/ llx/Miwma+YUjE/6ax4jpvr7MF6ub+o2CVn2H+X6y3M1GJUQMwKTkp2Fjc5wbdzhaC8KZeOQT 1hQ9AoJgYTVZjgGn3LyEICO/zcfa8ZxdXomwv0BvjLKR/Thh7MBi8Bi/p8LBpHRklpBaT6ky4 heK5zxQbwlEUZyGKCIFHZmNwRw+nNuVfMNZZeLnSVLzc5+WUFkTvvtoTj3PHf8925tCrcBQOW bSLkG3o83RRpd90p25dxhkFl9htNWMWIID6NZqPkhDrTdc63JqS2xkqHEd+Ttq7nSS+BARSMv QHm5Uuv4bkN19vqfdUBVWdBAU7ogZIPUzFfKXoJe6bXyZ0wZ9VYAgOEGhldbyba+E5O8RUxxl 3BKGVvoM8XXCHW42nfEsezLOJzAUqwbOtUmTJuu13lq0g8rVFzZpnkI0IDE+gjBv3GW9yktWr 9rgHquuVjcut9ToFjCTzuNUqLU2DAySDgBFC/Bxvpkq+8OCIkEYD1Zpnd8I1o9bugB/ojZRG3 zT5bG+POJACtju8cc1JTHBVC8ES5UIBhgW9DA8DvtZ+RuJ78HQhS5mlUXt9TEebejSSkU1WFX rc73AlLPpwq05QN0Ixrgm+b8QSLtR2n7agGcJe70vgCuKCezbXwxnsfD8eUVmJZP9EO3Fh5Ee fPdpgzjw0SyU+v0fpcf24Aomg12h/7xMZP2mHURPUdAvy/Z84yEop8eWPxgVkK7yndXpwPXri j23k9Aq93q77wM/ktwbd0jShktniPAk8TEzcffJtj9bXd/SX3XQvIcMj4GfYmAJ6fHVxh2yJc a6kS3KHyXlP2tvn6QplV3Mmfrm1wQ14ltbP1b6OjIAXLcVXC+aJNMwgebBG9l3yQyOAZM1pyT xKxMzIHqhNQtbHk3AcFvJGQ7bRe6rTLrot2+zh4xKEhbHbndumGvO+BcQK/ar3MeZLSUrVFt4 gP1T18rXo8r48/pTwNhhrJXmwTs+yJAaeOj6VA+btu4ocejiBb8dP7trfuX+VukPaDWFc9hOk eQDPOYuo0DnlJI7uV4EK0ZLCfDoIRR234hOc8rqppT9eZbmMzYHTmGkIg== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Yuchen Pei writes: > A bit like diary-remind, as a diary-sexp rather than reminder, and > also support both positive and negative offsets. Because we are just talking about it: my personal solution for this kind of problem: I extended the diary language with some date arithmetic functions and a `date-let' macro, that allows you to solve the same task like (date-let ((date+ date 2)) SEXP) An advantage is that this saves one layer of `eval', and it allows the delta of days to be an expression (that might depend on the DATE). I also worked on finer grained solutions for the problems of the kind "every Nth Xday of the month unless it's a day that fulfills some TEST (e.g., it's a holiday), then use an alternative date. Useful for specifying rules for garbage collection (real-life garbage, not Emacs gc). I planned to provide these things as a separate library, and I'm not against what has been supposed here, just wanted to mention an alternative view on the problem. Michael. From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp. Resent-From: Yuchen Pei Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Aug 2021 13:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Michael Heerdegen Cc: 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.163006991230592 (code B ref 50195); Fri, 27 Aug 2021 13:12:02 +0000 Received: (at 50195) by debbugs.gnu.org; 27 Aug 2021 13:11:52 +0000 Received: from localhost ([127.0.0.1]:51434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJbeC-0007xL-EC for submit@debbugs.gnu.org; Fri, 27 Aug 2021 09:11:52 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:39399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJbe9-0007x7-Ff for 50195@debbugs.gnu.org; Fri, 27 Aug 2021 09:11:51 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id BA2F432002E2; Fri, 27 Aug 2021 09:11:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 27 Aug 2021 09:11:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h= references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm2; bh=r1VToOQZVeRevuXSjZZB0n9Y4c OYy+Qo/IC0cFd/Oa0=; b=sqqNOsZvaalH00aQDAh+p9sFnpfYSiRKM8sxaFcs85 sdxj9OE9zewf5rbFEnjPLIdXv4YbsLx4wR5jOEoLvXz4zj7T1qwPaEJmzdHzKxhT Ahc2uHtKoP/PvSAiJ1zvIK/I3ePmYXW5GFyFRNsiEG9JNrvcQSKWwYspru/AW6ZL M6eLiIXLGtmvWbAbhFT/eWyBPNx6RZup79j+cD1nEroEu9As5svp5jQFSlxsyzU1 QesjnZ7f5knSagNQNurbKxFZhfQCYebB4bEVPgADEXmRZ8P/U1XX+ld/DYKnYG3a v3cFIVIt8WpH4Xv04FciaKDHyEsk/nRQtY7CLz9mIc5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=r1VToO QZVeRevuXSjZZB0n9Y4cOYy+Qo/IC0cFd/Oa0=; b=iqn1sXEf35YKD+fze0fU5+ 8WESz+dhazLMxnar3whb/4GG6fac/2bBusPb1WdKdIXuIV03Wp8af+++4v7VxOp/ t/EOCK8ZnyoMteNjMOEq9eOPTKZULK9c2Uu0UFW8owBjGMsQUb0soz5vvQVvJdEQ IcYcYYCNj5httdK+VsdadoG6i1aUOYE9l/eEidjPR6EK51OITKlUGTIsl/4krV/P SysVM/XzVxyox0/SBbblb+lP2J4Ub0fE2l7jVJe5tDjGx+GuwfO6rkttHXFkUImw uWO/ucmYQ6Ad4IZQ81bvAb2f0MjzqqTRahGBSbk3yj0VtTxy+2VRvvcFDIMKYagw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddufedgieduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvufgjfffkgggtsehgtderredtredtnecuhfhrohhmpegjuhgthhgv nhcurfgvihcuoehhiheshihpvghirdhmvgeqnecuggftrfgrthhtvghrnhepkedtfffhle eigfehueevieeuueekvdfgveegheeiudeuffdvgfejleeijeevheetnecuffhomhgrihhn peihphgvihdrmhgvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhephhhiseihphgvihdrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Aug 2021 09:11:41 -0400 (EDT) References: <87fsuychjr.fsf@ypei.me> <874kbcijrt.fsf@web.de> User-agent: mu4e 1.4.13; emacs 27.2 From: Yuchen Pei In-reply-to: <874kbcijrt.fsf@web.de> Date: Fri, 27 Aug 2021 23:11:34 +1000 Message-ID: <87ilzr9gmx.fsf@ypei.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; format=flowed Michael Heerdegen writes: > Yuchen Pei writes: > >> A bit like diary-remind, as a diary-sexp rather than reminder, >> and >> also support both positive and negative offsets. > > Because we are just talking about it: my personal solution for > this kind > of problem: I extended the diary language with some date > arithmetic > functions and a `date-let' macro, that allows you to solve the > same task > like > > (date-let ((date+ date 2)) > SEXP) > > An advantage is that this saves one layer of `eval', and it > allows the > delta of days to be an expression (that might depend on the > DATE). Interesting - I never thought of defining my own let macro. > > I also worked on finer grained solutions for the problems of the > kind > "every Nth Xday of the month unless it's a day that fulfills > some TEST > (e.g., it's a holiday), then use an alternative date. Useful > for > specifying rules for garbage collection (real-life garbage, not > Emacs > gc). > > I planned to provide these things as a separate library, and I'm > not > against what has been supposed here, just wanted to mention an > alternative view on the problem. Thanks, I'll be curious to see your library when it gets published. > > Michael. -- Best, Yuchen PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYSjkhgscaGlAeXBlaS5t ZQAKCRAhJn6T74bf0JzOAQDZUrMeEQRdFYwgebJ9cKxwIikNQutb2J+ejG7iD1SU sQEA0LF2B3eCxiFeoRyKqQ2yuH6nM3nCNewMt1mffzXVtAY= =Pgmd -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset to diary-lib.el Resent-From: Yuchen Pei Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Aug 2021 13:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: eliz@gnu.org, 50195@debbugs.gnu.org X-Debbugs-Original-To: Eli Zaretskii , 50195@debbugs.gnu.org, bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163007018731056 (code B ref -1); Fri, 27 Aug 2021 13:17:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Aug 2021 13:16:27 +0000 Received: from localhost ([127.0.0.1]:51442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJbiZ-00084i-1t for submit@debbugs.gnu.org; Fri, 27 Aug 2021 09:16:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:35314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJbiS-00084R-QM for submit@debbugs.gnu.org; Fri, 27 Aug 2021 09:16:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJbiS-0005KQ-FG for bug-gnu-emacs@gnu.org; Fri, 27 Aug 2021 09:16:16 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:45445) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJbiQ-00052L-3Z; Fri, 27 Aug 2021 09:16:16 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 41CB632007CF; Fri, 27 Aug 2021 09:16:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 27 Aug 2021 09:16:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h= references:from:to:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm2; bh=q/zC+1zY5zndU3PCzSgwLH9Oul qvgB2i5jDQeeGjSFY=; b=UzKKCXczEUhJX47omwjkwlwwyrYHnZmK8LqdxzSaYv TYpFnU6r/OlHoGX1SnNbt/0Jc29sbo7GYhh9tNYdx0FAXHsiPD3RR9NnvdvL6fpa xILUstlTq9MOqw99L/7yEThUGnrpl96e2CvrzTk4pbWJDQhnOPqus5DTLBcWEOOz LggO3C8vbuVFyQMICbBAIS8nh1jMhe5YvVUpQN5FPXLie08OMKo0NPbrAU0idt+N b/tzvzUa6HAqNnt38ZScKza1o5RfmyFyDKTkPrneFQXpRw+MRzFzwL6SLnz2YxX7 oyo5cd4DUcA+3lQHhsqT4eqL5CVdDukAFtE/oUc1awJw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=q/zC+1 zY5zndU3PCzSgwLH9OulqvgB2i5jDQeeGjSFY=; b=MxAtbZkvlJkt4gImXJKY5K FWKtRlQavfYM64uTYetnbgCGdOiBrXoK6Xo7u1X6uwLulB45W59RUmyUkpsmk39N XG//x+Bss46CJF86AVVV+oep35UHmGHl35J+U70BPrqb7vs7EEk9dVwlMrelrK3/ yizUg0Sj+J5v0rq8fJLkkhfsdGA8z66/p4EsP663avNqzMQMSDrgPFQNSWnWS71c NCxKRz7emyBuvBqlGuMRVXdApsqY+Y3XRx00lewwkr+lu+BxVwfCsvuqDR0EJ9ry 6OAYWkWezGKtSBFpXkyaet2aI2rIxuqPXyGxhXMcEW19KBacn5fZlythPzwCQ56w == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddufedgiedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvufgjfffkgggtsehgtderredtredtnecuhfhrohhmpegjuhgthhgv nhcurfgvihcuoehhiheshihpvghirdhmvgeqnecuggftrfgrthhtvghrnhepkedtfffhle eigfehueevieeuueekvdfgveegheeiudeuffdvgfejleeijeevheetnecuffhomhgrihhn peihphgvihdrmhgvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhephhhiseihphgvihdrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Aug 2021 09:16:09 -0400 (EDT) References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> <87mtp4bszq.fsf@ypei.me> <87h7fcbss7.fsf@ypei.me> User-agent: mu4e 1.4.13; emacs 27.2 From: Yuchen Pei In-reply-to: <87h7fcbss7.fsf@ypei.me> Date: Fri, 27 Aug 2021 23:16:06 +1000 Message-ID: <87fsuv9gfd.fsf@ypei.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=64.147.123.21; envelope-from=hi@ypei.me; helo=wout5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain; format=flowed I didn't see this message making its way to the bug-gnu-emacs mailing list and I haven't heard back after the revision, so I'm not sure if the revised patch below has been made available for people to see. Sorry if this is a duplicate. Let me know what you think. Yuchen Pei writes: > Sorry, forgot the attach the patch. Here it is. > > From 4df9db3eeb3b048579768050ae7bb413fefe9557 Mon Sep 17 > 00:00:00 2001 > From: Yuchen Pei > Date: Wed, 25 Aug 2021 13:37:20 +1000 > Subject: [PATCH] Adding diary-offset to diary-lib.el. > > A new diary sexp that offsets another diary sexp (Bug#50195). > > * doc/emacs/calendar.texi: Document the change. > * lisp/calendar/diary-lib.el (diary-offset): > * test/lisp/calendar/icalendar-tests.el: Add a test. > --- > doc/emacs/calendar.texi | 14 ++++++++++++++ > etc/NEWS | 8 ++++++++ > lisp/calendar/diary-lib.el | 11 +++++++++++ > test/lisp/calendar/icalendar-tests.el | 7 +++++++ > 4 files changed, 40 insertions(+) > > diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi > index 3750e78e70..18de721e28 100644 > --- a/doc/emacs/calendar.texi > +++ b/doc/emacs/calendar.texi > @@ -1363,6 +1363,20 @@ Special Diary Entries > Thursday of January, February, and March. If the month is > @code{t}, the > entry applies to all months of the year. > > +@findex diary-offset > +@example > +%%(diary-offset '(diary-float t 3 4) 2) Monthly committee > meeting > +@end example > + > +@noindent > +This entry applies to the Saturday after the third Thursday of > each > +month. The 2 specifies number of days after when the sexp > +@w{@code{'(diary-float t 3 4)}} would evaluate to @code{t}. > This is > +useful when for example your organization has a committee > meeting two > +days after every monthly meeting which takes place on the third > +Thursday, or if you would like to attend a virtual meeting > scheduled > +in a different timezone causing a difference in the date. > + > Each of the standard sexp diary entries takes an optional > parameter > specifying the name of a face or a single-character string to > use when > marking the entry in the calendar. Most generally, sexp diary > entries > diff --git a/etc/NEWS b/etc/NEWS > index 07a78216b8..52774b3463 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -2800,6 +2800,14 @@ never be narrower than 19 characters. > 'gomoku-move-sw' and 'gomoku-move-ne' now work correctly, and > horizontal movements now stop at the edge of the board. > > ++++ > +*** New diary sexp 'diary-offset'. > +It offsets another diary sexp by a number of days. This is > useful > +when for example your organization has a committee meeting two > days > +after every monthly meeting which takes place on the third > Thursday, > +or if you would like to attend a virtual meeting scheduled in a > +different timezone causing a difference in the date. > + > ** xterm-mouse mode > > --- > diff --git a/lisp/calendar/diary-lib.el > b/lisp/calendar/diary-lib.el > index f57fe26058..f71392b97f 100644 > --- a/lisp/calendar/diary-lib.el > +++ b/lisp/calendar/diary-lib.el > @@ -2014,6 +2014,17 @@ diary-cyclic > (and (>= diff 0) (zerop (% diff n)) > (cons mark (format entry cycle (diary-ordinal-suffix > cycle)))))) > > +;; To be called from diary-sexp-entry, where DATE, ENTRY are > bound. > +(defun diary-offset (sexp days) > + "Offsetted diary entry. Offsets SEXP by DAYS days. > +Entry applies if the date is DAYS days after another diary-sexp > SEXP." > + (with-no-warnings (defvar date)) > + (or (integerp days) (user-error "Days must be an integer")) > + (let ((date > + (calendar-gregorian-from-absolute > + (- (calendar-absolute-from-gregorian date) days)))) > + (eval sexp))) > + > (defun diary-day-of-year () > "Day of year and number of days remaining in the year of date > diary entry." > (with-no-warnings (defvar date)) > diff --git a/test/lisp/calendar/icalendar-tests.el > b/test/lisp/calendar/icalendar-tests.el > index 6973f7e5c9..de2a891758 100644 > --- a/test/lisp/calendar/icalendar-tests.el > +++ b/test/lisp/calendar/icalendar-tests.el > @@ -1442,6 +1442,13 @@ icalendar-real-world > SUMMARY:ff birthday (%d years old)") > > > + (icalendar-tests--test-export > + nil > + nil > + "%%(diary-offset '(diary-float t 3 4) 1) asdf" > + nil) > + > + > ;; FIXME! > > ;; export 2004-10-28 monthly, weekly entries > -- > 2.33.0 > > > Yuchen Pei writes: > >> Thanks for the comments. >> Eli Zaretskii writes: >> >>>> From: Yuchen Pei >>>> Date: Wed, 25 Aug 2021 13:46:48 +1000 >>>> See below my first patch to Emacs. The copyright assignment >>>> has >>>> already been done BTW. >>> >>> Congrats, and welcome aboard. >>> >>>> Let me know what you think. >>> >>> Some minor comments below. >>> >>>> Would you like me to add some tests? >>> >>> Adding more tests is always welcome, thanks. >> >> All diary sexp tests are in icalendar tests, but diary-offset >> does >> not >> easily translate to icalendar events (exporting to icalendar >> for >> this >> sexp is rather complicated if not impossible as it applies on >> top of >> another arbitrary sexp), so I am just adding a simple >> no-op-like >> test. >> >>> >>>> Subject: [PATCH] Adding diary-offset, a diary-sexp offsetting >>>> another >>>> diary-sexp. >>> >>> "git am" uses the Subject for the heading line, and this >>> Subject is >>> too long for that. Please consider making it shorter. >> >> Done. >> >>> >>>> A bit like diary-remind, as a diary-sexp rather than >>>> reminder, and >>>> also support both positive and negative offsets. >>>> This is useful when for example your organization has a >>>> committee >>>> meeting two days after every monthly meeting which takes >>>> place on >>>> the >>>> third Thursday, or if you would like to attend a virtual >>>> meeting >>>> scheduled in a different timezone causing a difference in the >>>> date. >>> >>> The commit log message should include a ChangeLog-style >>> description >>> of >>> the files and functions where you made the changes. See >>> CONTRIBUTE >>> for more details about the format we prefer. >>> >>> Also, please in the next version include the bug number as >>> part of >>> the >>> log message. >> >> Done. >> >>> >>>> --- a/doc/emacs/calendar.texi >>>> +++ b/doc/emacs/calendar.texi >>>> @@ -1363,6 +1363,20 @@ Special Diary Entries >>>> Thursday of January, February, and March. If the month is >>>> @code{t}, the >>>> entry applies to all months of the year. >>>> +@findex diary-offset >>>> +@example >>>> +%%(diary-offset '(diary-float t 3 4) 2) Monthly post-event >>>> committee meeting >>> >>> That line is too long, and will overflow the page width in the >>> printed >>> version of the manual. Please break it in two. >> >> Done. I made it shorter :) >> >>> >>>> +@noindent >>>> +This entry applies to the Saturday after the third Thursday >>>> of >>>> each >>>> +month. The 2 specifies number of days after when the sexp >>>> +@samp{'(diary-float t 3 4)} would evaluate to @code{t}. >>>> This is >>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>> This should be in @code, not @samp. I'd also wrap it in >>> @w{..}, so >>> that it doesn't get broken between two lines. >> >> Done. >> >>> >>>> +(defun diary-offset (sexp days) >>>> + "Offsetted diary entry. >>> >>> The first line of a doc string should preferably mention the >>> arguments, but without becoming too long, so it could still >>> fit on >>> a >>> single line. >> >> Done. >> >>> >>>> + (with-no-warnings (defvar date) (defvar entry)) >>> >>> Why did you need this? >> >> The sexp diary-offset itself requires the date supplied by >> diary-sexp-entry. The sexp passed to diary-offset will ask for >> both >> date and entry. Removed (defvar entry) as this is not needed >> by >> diary-offset. After the removel I tested it in org mode and >> org >> agenda and it works. >> >>> >>>> + (integerp days) >>> >>> Isn't it better to use an assertion? >> >> Done. Added a user-error statement like in diary-cyclic. >> >>> >>> Thanks. -- Best, Yuchen PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYSjllgscaGlAeXBlaS5t ZQAKCRAhJn6T74bf0Pv3AP9tyqARflhzswCeqpyqL7s2NmOOdXi2BVZDbVZLlre6 3gEA3ODvM5iFE+/SdPySpiRwoG3YOL9WApm+Zx4fCh951Aw= =yRLQ -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset to diary-lib.el Resent-From: Yuchen Pei Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Sep 2021 22:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 50195@debbugs.gnu.org Cc: eliz@gnu.org X-Debbugs-Original-To: 50195@debbugs.gnu.org, bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163070883511840 (code B ref -1); Fri, 03 Sep 2021 22:41:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Sep 2021 22:40:35 +0000 Received: from localhost ([127.0.0.1]:46042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMHrO-00034r-Ud for submit@debbugs.gnu.org; Fri, 03 Sep 2021 18:40:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:59340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMHrB-00034K-HX for submit@debbugs.gnu.org; Fri, 03 Sep 2021 18:40:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMHrB-0002Fv-6n for bug-gnu-emacs@gnu.org; Fri, 03 Sep 2021 18:40:21 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:52061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMHr8-0000ch-OZ; Fri, 03 Sep 2021 18:40:20 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2529A5C00BE; Fri, 3 Sep 2021 18:40:16 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 03 Sep 2021 18:40:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h= references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm2; bh=fLKJ0/RNrhfCNQki89Urw9I372 b5VX5aAbfKK/Mb0ZU=; b=PtQEfvlBn42qLA2uIBFee4aLRXLyZsp2lgX7AJBzHp ekWm0P+NMRh7456SRAQS5/wlNPJCNuYLbU2DilsFzso65TNjmhijjowI4IwIPw64 aAevT2hzGOciF8EAMshfsOdm+hmOtf2tUYgzefKaycUD964OA9XFTu2kCBdGa9sr ke8sX1VzcE57PckB0Gm6kRXCx6QlN0Nl8ZL72Pb/r2hdBQ8bbhZgH4PYRTG5EB2j I3LOpzRb5hhp+ANFW384Z6RTdSX4m0VXHjHQs/0pu68p2M58c8or7YTX0+3ON/kY gJWp0a0UtTXGJJS7gUhyp8hFje9mZTVYSn4Ioges5Dww== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=fLKJ0/ RNrhfCNQki89Urw9I372b5VX5aAbfKK/Mb0ZU=; b=G7XZpVJq6pjC06twkBjTRS rvlVBAKWtme5EtW2bt2Ak+JN/6KwyCQBWlb5opu5yYMLZfUsPbDS6CnaYKDYIjpo 70nCNF4vpRYTEK6IQM8xhSNSTKqf9ftahbSBuxLsU3AW4AsqNWNRaLiFvWnFk29v jdkXLUreJF9iLK9h4+oNgiLkRzthfOZuE61g9Q0wkWkjYO9RhN6//Z0upxoB4xPD 9SsF9b7WGwQSIlB7TQwYvcqydgYmr46nMzbRUdYN6cHwYSRqZ1ErT4BJXi9Ha9wl fONdnHPUvd70fEHPWojCQJmps9q4hCPfvEZnQkNDbBSXrZ6S2n1+FGMORkdjs0Gw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddvkedgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpehffgfhvffujgffkfggtgesghdtre ertdertdenucfhrhhomhepjghutghhvghnucfrvghiuceohhhiseihphgvihdrmhgvqeen ucggtffrrghtthgvrhhnpeektdffhfeliefgheeuveeiueeukedvgfevgeehieduueffvd fgjeelieejveehteenucffohhmrghinhephihpvghirdhmvgenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhiheshihpvghirdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 3 Sep 2021 18:40:13 -0400 (EDT) References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> <87mtp4bszq.fsf@ypei.me> <87h7fcbss7.fsf@ypei.me> <87fsuv9gfd.fsf@ypei.me> User-agent: mu4e 1.4.13; emacs 27.2 From: Yuchen Pei In-reply-to: <87fsuv9gfd.fsf@ypei.me> Date: Sat, 04 Sep 2021 08:40:07 +1000 Message-ID: <874kb1706w.fsf@ypei.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=66.111.4.26; envelope-from=hi@ypei.me; helo=out2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain; format=flowed Yuchen Pei writes: > I didn't see this message making its way to the bug-gnu-emacs > mailing > list and I haven't heard back after the revision, so I'm not > sure if > the revised patch below has been made available for people to > see. > Sorry if this is a duplicate. Let me know what you think. Any updates? > Yuchen Pei writes: > >> Sorry, forgot the attach the patch. Here it is. >> >> From 4df9db3eeb3b048579768050ae7bb413fefe9557 Mon Sep 17 >> 00:00:00 >> 2001 >> From: Yuchen Pei >> Date: Wed, 25 Aug 2021 13:37:20 +1000 >> Subject: [PATCH] Adding diary-offset to diary-lib.el. >> >> A new diary sexp that offsets another diary sexp (Bug#50195). >> >> * doc/emacs/calendar.texi: Document the change. >> * lisp/calendar/diary-lib.el (diary-offset): >> * test/lisp/calendar/icalendar-tests.el: Add a test. >> --- >> doc/emacs/calendar.texi | 14 ++++++++++++++ >> etc/NEWS | 8 ++++++++ >> lisp/calendar/diary-lib.el | 11 +++++++++++ >> test/lisp/calendar/icalendar-tests.el | 7 +++++++ >> 4 files changed, 40 insertions(+) >> >> diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi >> index 3750e78e70..18de721e28 100644 >> --- a/doc/emacs/calendar.texi >> +++ b/doc/emacs/calendar.texi >> @@ -1363,6 +1363,20 @@ Special Diary Entries >> Thursday of January, February, and March. If the month is >> @code{t}, >> the >> entry applies to all months of the year. >> >> +@findex diary-offset >> +@example >> +%%(diary-offset '(diary-float t 3 4) 2) Monthly committee >> meeting >> +@end example >> + >> +@noindent >> +This entry applies to the Saturday after the third Thursday of >> each >> +month. The 2 specifies number of days after when the sexp >> +@w{@code{'(diary-float t 3 4)}} would evaluate to >> @code{t}. This is >> +useful when for example your organization has a committee >> meeting >> two >> +days after every monthly meeting which takes place on the >> third >> +Thursday, or if you would like to attend a virtual meeting >> scheduled >> +in a different timezone causing a difference in the date. >> + >> Each of the standard sexp diary entries takes an optional >> parameter >> specifying the name of a face or a single-character string to >> use >> when >> marking the entry in the calendar. Most generally, sexp diary >> entries >> diff --git a/etc/NEWS b/etc/NEWS >> index 07a78216b8..52774b3463 100644 >> --- a/etc/NEWS >> +++ b/etc/NEWS >> @@ -2800,6 +2800,14 @@ never be narrower than 19 characters. >> 'gomoku-move-sw' and 'gomoku-move-ne' now work correctly, and >> horizontal movements now stop at the edge of the board. >> >> ++++ >> +*** New diary sexp 'diary-offset'. >> +It offsets another diary sexp by a number of days. This is >> useful >> +when for example your organization has a committee meeting two >> days >> +after every monthly meeting which takes place on the third >> Thursday, >> +or if you would like to attend a virtual meeting scheduled in >> a >> +different timezone causing a difference in the date. >> + >> ** xterm-mouse mode >> >> --- >> diff --git a/lisp/calendar/diary-lib.el >> b/lisp/calendar/diary-lib.el >> index f57fe26058..f71392b97f 100644 >> --- a/lisp/calendar/diary-lib.el >> +++ b/lisp/calendar/diary-lib.el >> @@ -2014,6 +2014,17 @@ diary-cyclic >> (and (>= diff 0) (zerop (% diff n)) >> (cons mark (format entry cycle (diary-ordinal-suffix >> cycle)))))) >> >> +;; To be called from diary-sexp-entry, where DATE, ENTRY are >> bound. >> +(defun diary-offset (sexp days) >> + "Offsetted diary entry. Offsets SEXP by DAYS days. >> +Entry applies if the date is DAYS days after another >> diary-sexp >> SEXP." >> + (with-no-warnings (defvar date)) >> + (or (integerp days) (user-error "Days must be an integer")) >> + (let ((date >> + (calendar-gregorian-from-absolute >> + (- (calendar-absolute-from-gregorian date) days)))) >> + (eval sexp))) >> + >> (defun diary-day-of-year () >> "Day of year and number of days remaining in the year of date >> diary entry." >> (with-no-warnings (defvar date)) >> diff --git a/test/lisp/calendar/icalendar-tests.el >> b/test/lisp/calendar/icalendar-tests.el >> index 6973f7e5c9..de2a891758 100644 >> --- a/test/lisp/calendar/icalendar-tests.el >> +++ b/test/lisp/calendar/icalendar-tests.el >> @@ -1442,6 +1442,13 @@ icalendar-real-world >> SUMMARY:ff birthday (%d years old)") >> >> >> + (icalendar-tests--test-export >> + nil >> + nil >> + "%%(diary-offset '(diary-float t 3 4) 1) asdf" >> + nil) >> + >> + >> ;; FIXME! >> >> ;; export 2004-10-28 monthly, weekly entries >> -- 2.33.0 >> >> >> Yuchen Pei writes: >> >>> Thanks for the comments. >>> Eli Zaretskii writes: >>> >>>>> From: Yuchen Pei >>>>> Date: Wed, 25 Aug 2021 13:46:48 +1000 >>>>> See below my first patch to Emacs. The copyright assignment >>>>> has >>>>> already been done BTW. >>>> >>>> Congrats, and welcome aboard. >>>> >>>>> Let me know what you think. >>>> >>>> Some minor comments below. >>>> >>>>> Would you like me to add some tests? >>>> >>>> Adding more tests is always welcome, thanks. >>> >>> All diary sexp tests are in icalendar tests, but diary-offset >>> does >>> not >>> easily translate to icalendar events (exporting to icalendar >>> for >>> this >>> sexp is rather complicated if not impossible as it applies on >>> top >>> of >>> another arbitrary sexp), so I am just adding a simple >>> no-op-like >>> test. >>> >>>> >>>>> Subject: [PATCH] Adding diary-offset, a diary-sexp >>>>> offsetting >>>>> another >>>>> diary-sexp. >>>> >>>> "git am" uses the Subject for the heading line, and this >>>> Subject >>>> is >>>> too long for that. Please consider making it shorter. >>> >>> Done. >>> >>>> >>>>> A bit like diary-remind, as a diary-sexp rather than >>>>> reminder, >>>>> and >>>>> also support both positive and negative offsets. >>>>> This is useful when for example your organization has a >>>>> committee >>>>> meeting two days after every monthly meeting which takes >>>>> place on >>>>> the >>>>> third Thursday, or if you would like to attend a virtual >>>>> meeting >>>>> scheduled in a different timezone causing a difference in >>>>> the >>>>> date. >>>> >>>> The commit log message should include a ChangeLog-style >>>> description >>>> of >>>> the files and functions where you made the changes. See >>>> CONTRIBUTE >>>> for more details about the format we prefer. >>>> >>>> Also, please in the next version include the bug number as >>>> part of >>>> the >>>> log message. >>> >>> Done. >>> >>>> >>>>> --- a/doc/emacs/calendar.texi >>>>> +++ b/doc/emacs/calendar.texi >>>>> @@ -1363,6 +1363,20 @@ Special Diary Entries >>>>> Thursday of January, February, and March. If the month is >>>>> @code{t}, the >>>>> entry applies to all months of the year. >>>>> +@findex diary-offset >>>>> +@example >>>>> +%%(diary-offset '(diary-float t 3 4) 2) Monthly post-event >>>>> committee meeting >>>> >>>> That line is too long, and will overflow the page width in >>>> the >>>> printed >>>> version of the manual. Please break it in two. >>> >>> Done. I made it shorter :) >>> >>>> >>>>> +@noindent >>>>> +This entry applies to the Saturday after the third Thursday >>>>> of >>>>> each >>>>> +month. The 2 specifies number of days after when the sexp >>>>> +@samp{'(diary-float t 3 4)} would evaluate to >>>>> @code{t}. This is >>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>>> This should be in @code, not @samp. I'd also wrap it in >>>> @w{..}, >>>> so >>>> that it doesn't get broken between two lines. >>> >>> Done. >>> >>>> >>>>> +(defun diary-offset (sexp days) >>>>> + "Offsetted diary entry. >>>> >>>> The first line of a doc string should preferably mention the >>>> arguments, but without becoming too long, so it could still >>>> fit on >>>> a >>>> single line. >>> >>> Done. >>> >>>> >>>>> + (with-no-warnings (defvar date) (defvar entry)) >>>> >>>> Why did you need this? >>> >>> The sexp diary-offset itself requires the date supplied by >>> diary-sexp-entry. The sexp passed to diary-offset will ask >>> for >>> both >>> date and entry. Removed (defvar entry) as this is not needed >>> by >>> diary-offset. After the removel I tested it in org mode and >>> org >>> agenda and it works. >>> >>>> >>>>> + (integerp days) >>>> >>>> Isn't it better to use an assertion? >>> >>> Done. Added a user-error statement like in diary-cyclic. >>> >>>> >>>> Thanks. -- Best, Yuchen PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYTKkSAscaGlAeXBlaS5t ZQAKCRAhJn6T74bf0NIsAP9LySuGzG4C/zaCgi6853g3aU7W70822Y4Ju2lOtxNQ fgEAimgXj1AW+xicaTCJgIwXGy9WCjzhkX/RlsbFmQcj2wQ= =R2Xl -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset to diary-lib.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Sep 2021 06:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Yuchen Pei Cc: 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.16307361279497 (code B ref 50195); Sat, 04 Sep 2021 06:16:02 +0000 Received: (at 50195) by debbugs.gnu.org; 4 Sep 2021 06:15:27 +0000 Received: from localhost ([127.0.0.1]:46235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMOxb-0002T7-9F for submit@debbugs.gnu.org; Sat, 04 Sep 2021 02:15:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMOxZ-0002Sq-Q1 for 50195@debbugs.gnu.org; Sat, 04 Sep 2021 02:15:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51324) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMOxU-0007vm-Cu; Sat, 04 Sep 2021 02:15:20 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3276 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMOxN-0005Io-Ub; Sat, 04 Sep 2021 02:15:19 -0400 Date: Sat, 04 Sep 2021 09:15:14 +0300 Message-Id: <834kb0yih9.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <874kb1706w.fsf@ypei.me> (message from Yuchen Pei on Sat, 04 Sep 2021 08:40:07 +1000) References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> <87mtp4bszq.fsf@ypei.me> <87h7fcbss7.fsf@ypei.me> <87fsuv9gfd.fsf@ypei.me> <874kb1706w.fsf@ypei.me> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Yuchen Pei > Cc: eliz@gnu.org > Date: Sat, 04 Sep 2021 08:40:07 +1000 > > Yuchen Pei writes: > > > I didn't see this message making its way to the bug-gnu-emacs > > mailing list and I haven't heard back after the revision, so I'm > > not sure if the revised patch below has been made available for > > people to see. Sorry if this is a duplicate. Let me know what > > you think. > > Any updates? I have no further comments. From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset to diary-lib.el Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Sep 2021 06:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: Yuchen Pei , 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.163073697811068 (code B ref 50195); Sat, 04 Sep 2021 06:30:02 +0000 Received: (at 50195) by debbugs.gnu.org; 4 Sep 2021 06:29:38 +0000 Received: from localhost ([127.0.0.1]:46252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMPBK-0002sS-Do for submit@debbugs.gnu.org; Sat, 04 Sep 2021 02:29:38 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMPBH-0002s5-T1 for 50195@debbugs.gnu.org; Sat, 04 Sep 2021 02:29:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=lsQpP6Ppb1KtcnQGZcqinuuhAsgm4iAImoKMFc03yfo=; b=Y4GfIWlOHlIDF/zSy8h9dERknB misiDF82AEjOOuwOhXBBFo3ybQSnyvYrP0RtDnXXVGidJ8xI+idciMqmS/V5owH/Qvv+3xiY/Gujh pKHtTMlqRfxpGreVmLb+8Y4Z9UcLa99uiUJWomjK5SfTtSeogB+on5t7nf0iomDVQT9Q=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mMPB8-0006D4-FP; Sat, 04 Sep 2021 08:29:28 +0200 From: Lars Ingebrigtsen References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> <87mtp4bszq.fsf@ypei.me> <87h7fcbss7.fsf@ypei.me> <87fsuv9gfd.fsf@ypei.me> <874kb1706w.fsf@ypei.me> <834kb0yih9.fsf@gnu.org> Date: Sat, 04 Sep 2021 08:29:25 +0200 In-Reply-To: <834kb0yih9.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 Sep 2021 09:15:14 +0300") Message-ID: <87bl58vooq.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> > I didn't see this message making its way to the bug-gnu-emacs >> > mailing list and I haven't heard back after the revision, so I'm >> > not sure if the revised patch below has been made availabl [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> > I didn't see this message making its way to the bug-gnu-emacs >> > mailing list and I haven't heard back after the revision, so I'm >> > not sure if the revised patch below has been made available for >> > people to see. Sorry if this is a duplicate. Let me know what >> > you think. >> >> Any updates? > > I have no further comments. Looks good to me, so I've pushed it to Emacs 28 (with some trivial changes). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 04 02:29:47 2021 Received: (at control) by debbugs.gnu.org; 4 Sep 2021 06:29:47 +0000 Received: from localhost ([127.0.0.1]:46255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMPBT-0002so-LU for submit@debbugs.gnu.org; Sat, 04 Sep 2021 02:29:47 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMPBS-0002sb-38 for control@debbugs.gnu.org; Sat, 04 Sep 2021 02:29:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9UJNBQBUJu6dGB79vdgw6pLfH1r16ufjkjUfTUhScPA=; b=D/ljQaKHEAq5/VCTclcJh99u9W ayO9qurJuPM4eUaR7JIkeBR2QhckzBO1NhzLJUKmsG2cjKcH+b1e4G+Ow+LsiMdWOhnEHzB1ANsUg 8Fd3alkIGnaj74UqLeJhrP+F1kbTx+QFDm8oK6uprwdPI+s6//EP8BwzrMZZAuyrhtLc=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mMPBF-0006DB-4K for control@debbugs.gnu.org; Sat, 04 Sep 2021 08:29:35 +0200 Date: Sat, 04 Sep 2021 08:29:30 +0200 Message-Id: <87a6ksvool.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #50195 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 50195 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 50195 28.1 quit From unknown Sat Aug 16 16:53:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50195: [PATCH] Adding diary-offset to diary-lib.el Resent-From: Yuchen Pei Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Sep 2021 07:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lars Ingebrigtsen Cc: Eli Zaretskii , 50195@debbugs.gnu.org Received: via spool by 50195-submit@debbugs.gnu.org id=B50195.16307400999400 (code B ref 50195); Sat, 04 Sep 2021 07:22:01 +0000 Received: (at 50195) by debbugs.gnu.org; 4 Sep 2021 07:21:39 +0000 Received: from localhost ([127.0.0.1]:46359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMPze-0002RY-T8 for submit@debbugs.gnu.org; Sat, 04 Sep 2021 03:21:39 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:47043) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMPzc-0002RI-Cf for 50195@debbugs.gnu.org; Sat, 04 Sep 2021 03:21:37 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 545E75C00B5; Sat, 4 Sep 2021 03:21:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sat, 04 Sep 2021 03:21:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h= references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm2; bh=9stWp21ZtRWCVPmyTNvWZlo1Pv vsHb8ajH+63AsHNok=; b=Wgl1QnNzQC93bnEfX2vI3y94d+7qs5F8gtLeWK+Mpv QPUCVSpkLR2gu0KC4IHA20X1E6Ar0Dn486oz59naE9KPYlsF84z6DvEJFt+/svpl uCIbUGNKPZoU5XTK9JvoggT7A1DCVVVE83kTwAZk32Qw8uBsyBOPpPjX8V3HWnrm BZe5wu3CvcGmv/FmJszZXGHFmz9WCWCaGXpn5eB8Kav63Dsb+xGwd4l0Ik5iTFXo YeTbu4/GTHuLc93zA9YFfZtRl0TKDygxho2l9UDnhhB0GGrbqCkyD2bqm8n0N2ov IVir5r1if/BUX0VIDPNth5qc0e7GzdUpd4qNlgTCc+Ig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=9stWp2 1ZtRWCVPmyTNvWZlo1PvvsHb8ajH+63AsHNok=; b=JcX/BWuXzDLndVL8lCioEG Zm/bnN7TWnUS4m7eblvvfD0iRWdF2FYJTXVN3255P1nUG+pd70XZHrXfTPKc3CBM MoVtN33Ws2OAHiELfVcBxjpWoRtOKedvCUt/PkFrzrVlW85teAaz5gVsu8J8wkfM U0YmRQp9ExyHcFXPLhnffmWBGZ59SeFvFuDhTNLDIEtAhv7dnqSZk6ABsyyNA1Hd yu6XtYEwIsuUQujt/HszEqaz+FQJtTRhGtCCMCG0zefn+lzcRN7/JEm8QFpF8puv YmHh1s0MXNpMPxAU4cYUGPxUu7YKjIvzgsO81XE7wrUGSboQ/5KZ1J/AiTyGCBRw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddvkedguddujecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvffujgffkfggtgesghdtreertdertdenucfhrhhomhepjghutghh vghnucfrvghiuceohhhiseihphgvihdrmhgvqeenucggtffrrghtthgvrhhnpeektdffhf eliefgheeuveeiueeukedvgfevgeehieduueffvdfgjeelieejveehteenucffohhmrghi nhephihpvghirdhmvgenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehhiheshihpvghirdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 4 Sep 2021 03:21:28 -0400 (EDT) References: <87fsuychjr.fsf@ypei.me> <83mtp5vizs.fsf@gnu.org> <87mtp4bszq.fsf@ypei.me> <87h7fcbss7.fsf@ypei.me> <87fsuv9gfd.fsf@ypei.me> <874kb1706w.fsf@ypei.me> <834kb0yih9.fsf@gnu.org> <87bl58vooq.fsf@gnus.org> User-agent: mu4e 1.4.13; emacs 27.2 From: Yuchen Pei In-reply-to: <87bl58vooq.fsf@gnus.org> Date: Sat, 04 Sep 2021 17:21:22 +1000 Message-ID: <871r647qml.fsf@ypei.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; format=flowed Lars Ingebrigtsen writes: > Eli Zaretskii writes: > >>> > I didn't see this message making its way to the >>> > bug-gnu-emacs >>> > mailing list and I haven't heard back after the revision, so >>> > I'm >>> > not sure if the revised patch below has been made available >>> > for >>> > people to see. Sorry if this is a duplicate. Let me know >>> > what >>> > you think. >>> >>> Any updates? >> >> I have no further comments. > > Looks good to me, so I've pushed it to Emacs 28 (with some > trivial > changes). Cool, thanks! -- Best, Yuchen PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYTMecwscaGlAeXBlaS5t ZQAKCRAhJn6T74bf0B+pAQCbWXUu2BrNtXCXFb2ZnvcOgsjftTUXuWxirkDQa3eR jAD/ZyWGAV45NG8Myz4quPvN/KMRXU4IkLv/tQZi5HmwVwQ= =toc8 -----END PGP SIGNATURE----- --=-=-=--