From unknown Fri Jun 20 07:14:28 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#78205 <78205@debbugs.gnu.org> To: bug#78205 <78205@debbugs.gnu.org> Subject: Status: [PATCH] Recenter for the calendar Reply-To: bug#78205 <78205@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:14:28 +0000 retitle 78205 [PATCH] Recenter for the calendar reassign 78205 emacs submitter 78205 Manuel Giraud severity 78205 normal tag 78205 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri May 02 03:50:32 2025 Received: (at submit) by debbugs.gnu.org; 2 May 2025 07:50:33 +0000 Received: from localhost ([127.0.0.1]:56112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uAlAG-0006x7-9o for submit@debbugs.gnu.org; Fri, 02 May 2025 03:50:32 -0400 Received: from lists.gnu.org ([2001:470:142::17]:44402) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uAlAC-0006wi-7E for submit@debbugs.gnu.org; Fri, 02 May 2025 03:50:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uAlA2-0004eL-Uw for bug-gnu-emacs@gnu.org; Fri, 02 May 2025 03:50:19 -0400 Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uAl9x-0003Yw-MY for bug-gnu-emacs@gnu.org; Fri, 02 May 2025 03:50:17 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=O3tBrPDp lJN1RtoHN9p+M/PWCrT1PXj+cvGMRHwxMWc=; h=date:subject:to:from; d=ledu-giraud.fr; b=D/dx41TcVSqRUezkL9g8xxz7w6HN7mLt8RVJ3BcZcf0j8Rz/bp lm6ssfPh6EpPtpWZMV8WTo1TPiea8YetNRBw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=O3tBrPDplJN1RtoH N9p+M/PWCrT1PXj+cvGMRHwxMWc=; h=date:subject:to:from; d=ledu-giraud.fr; b=0JVIacxoyvY7i47tvnJ8oyPyNkLABiCOAvnLzDqhm5GGcyaO4H 7Gachwq+GdKkVGW7FKJOAp65KYE9BGp1ed50xnWEe/4zHwyYOuvKQ8kNAsRnGWXL/pVRAf EnWuJ5Tv0rKSwQ2PfzWyY2FvYqvAR7urDr0QDrFYR6lOSG8dmhH+FEEK2vZpUxFxud84Py m3fGNUVZpkj61SNYfRcGTbiLzEAL+NaXSQA5nsewFP8GVUQkKka4xnkNNMMqZOLVeE+jyr yvt1r1Vdx42rElDjSVV0TI1H2eotX43I/7VY/G+gbEiTYA+YlakR25pBOolv5qed3f7X8L Ys/7+s+Ao+eQ== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 4db9a4d7 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 2 May 2025 09:50:08 +0200 (CEST) From: Manuel Giraud To: bug-gnu-emacs@gnu.org Subject: [PATCH] Recenter for the calendar X-Debbugs-Cc: Date: Fri, 02 May 2025 09:50:07 +0200 Message-ID: <874iy3jvtc.fsf@ledu-giraud.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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.9 (/) X-Debbugs-Envelope-To: submit 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: -0.1 (/) --=-=-= Content-Type: text/plain Tags: patch Hi, This patch adds a "recenter month at point" functionality to the calendar. It also mimics what 'recenter-top-bottom' is doing for regular buffers. In GNU Emacs 31.0.50 (build 1, x86_64-unknown-openbsd7.7, X toolkit) of 2025-05-02 built on computer Repository revision: b9319616ed63dfb2291f6515828ae450aedfe6fa Repository branch: mgi/cal-recenter Windowing system distributor 'The X.Org Foundation', version 11.0.12101016 System Description: OpenBSD computer 7.7 GENERIC.MP#626 amd64 Configured using: 'configure CC=egcc CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib MAKEINFO=gmakeinfo --prefix=/home/manuel/emacs --bindir=/home/manuel/bin --with-x-toolkit=lucid --with-toolkit-scroll-bars=no --without-cairo --without-compress-install' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Recenter-for-the-calendar.patch >From 594823776de1231dc0cc9e7053493f56d110b6e3 Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Thu, 1 May 2025 17:06:07 +0200 Subject: [PATCH] Recenter for the calendar * lisp/calendar/cal-move.el (calendar-recenter-last-op): New variable to track last recenter operation. (calendar-recenter-first-last): New command to recenter the calendar. * lisp/calendar/calendar.el (calendar-mode-map): Keybinding for this command. * doc/emacs/calendar.texi (Scroll Calendar): Document this command. * etc/NEWS: Announce this command. --- doc/emacs/calendar.texi | 10 ++++++++++ etc/NEWS | 6 ++++++ lisp/calendar/cal-move.el | 33 +++++++++++++++++++++++++++++++++ lisp/calendar/calendar.el | 1 + 4 files changed, 50 insertions(+) diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index 55798eae16e..836c3f8fd62 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -258,6 +258,8 @@ Scroll Calendar @itemx @key{PageUp} @itemx @key{prior} Scroll backward by three months (@code{calendar-scroll-right-three-months}). +@item C-l +Recenter the date at point. @end table @kindex > @r{(Calendar mode)} @@ -293,6 +295,14 @@ Scroll Calendar (or @key{prior}) are equivalent to @kbd{C-v} and @kbd{M-v}, just as they are in other modes. +@kindex C-l @r{(Calendar mode)} +@findex calendar-recenter-first-last + The command @kbd{C-l} (@code{calendar-recenter-first-last}) scrolls +the calendar so that the month of the date at point is centered. With a +second invocation, this command puts this same month as the first month +in the calendar view and a third invocation puts it in last position. +This is in analogy with @code{recenter-top-bottom}. + @node Counting Days @section Counting Days diff --git a/etc/NEWS b/etc/NEWS index a5936b1c6cf..dd7d6d9015e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1990,6 +1990,12 @@ DISABLE-URI non-nil. When starting these debuggers (e.g., 'M-x pdb') while visiting a file, pressing 'M-n' in the command prompt suggests a command line including the file name, using the minibuffer's "future history". +** Calendar + ++++ +*** New command 'calendar-recenter-first-last'. +This command recenters the month of the date at point. By default, it +is bound to 'C-l' in the calendar buffer. * New Modes and Packages in Emacs 31.1 diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el index b0a8917209f..59f418b9b9c 100644 --- a/lisp/calendar/cal-move.el +++ b/lisp/calendar/cal-move.el @@ -217,6 +217,39 @@ calendar-scroll-right-three-months last-nonmenu-event)) (calendar-scroll-left (* -3 arg) event)) +(defvar calendar-recenter-last-op nil + "Last calendar recenter operation performed.") + +;;;###cal-autoload +(defun calendar-recenter-first-last () + "Scroll the calendar so that the month of the date at point is centered. +The second invocation puts this month in the first place, a third +invocation puts this month in the last place, and then the order is +reused in a cyclical manner." + (interactive) + (let ((positions '(center first last)) + (cursor-month (calendar-extract-month + (calendar-cursor-to-nearest-date)))) + ;; Update global last position upon repeat. + (setq calendar-recenter-last-op + (if (eq this-command last-command) + (car (or (cdr (member calendar-recenter-last-op positions)) + positions)) + (car positions))) + ;; XXX like most functions in calendar, a span of three displayed + ;; months is implied here. + (cond ((eq calendar-recenter-last-op 'center) + (cond ((= cursor-month (1- displayed-month)) + (calendar-scroll-right)) + ((= cursor-month (1+ displayed-month)) + (calendar-scroll-left)))) + ;; Other sub-cases should not happen as we should be centered + ;; from here. + ((eq calendar-recenter-last-op 'first) + (calendar-scroll-left)) + ((eq calendar-recenter-last-op 'last) + (calendar-scroll-right 2))))) + ;;;###cal-autoload (defun calendar-forward-day (arg) "Move the cursor forward ARG days. diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 058982647fe..2eebc47db28 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1593,6 +1593,7 @@ calendar-mode-map (define-key map "\C-x>" 'calendar-scroll-left) (define-key map [next] 'calendar-scroll-left-three-months) (define-key map "\C-v" 'calendar-scroll-left-three-months) + (define-key map "\C-l" 'calendar-recenter-first-last) (define-key map "\C-b" 'calendar-backward-day) (define-key map "\C-p" 'calendar-backward-week) (define-key map "\e{" 'calendar-backward-month) -- 2.49.0 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat May 03 05:52:29 2025 Received: (at 78205) by debbugs.gnu.org; 3 May 2025 09:52:29 +0000 Received: from localhost ([127.0.0.1]:38367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uB9Xp-00011B-CU for submit@debbugs.gnu.org; Sat, 03 May 2025 05:52:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57440) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uB9Xl-00010W-LD for 78205@debbugs.gnu.org; Sat, 03 May 2025 05:52:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uB9Xg-00016J-6S; Sat, 03 May 2025 05:52:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8evOiRsyPxqMb18GbzAZ1/uqG+7dF7Meyyto/UEj90g=; b=JpaPWoasIkin UaBVpU9Z65Z1M/isA96bZ2kG1UqmDOUNyJfZCzbVdVmLMuTszpCaywEs49947u2fiiULD3MrHfizb 4ZJijnaWmbE2myy39JfHBBmXiou5gfafibrHhRu+0Lidyq4MO7SxwX/ve/jq4SYMElYldLvZYOOCL t1m2tr5gzEfc1Jt8RoN393jT5glKsY3FGSNuBP+8TgoaZYK6MIZZiguL2kEMxzxLQ6JmlWce3CEUw 2lRAPTyIUUC4BQjGlhfjDajS8XsiQG5b8gK0qjYfNBe3WIrCITtbSqwZ4aZT4SQYZbo+4eMf0P0KM 7wQua+SRTZA2eDrIByn0XQ==; Date: Sat, 03 May 2025 12:52:17 +0300 Message-Id: <86frhmja26.fsf@gnu.org> From: Eli Zaretskii To: Manuel Giraud In-Reply-To: <874iy3jvtc.fsf@ledu-giraud.fr> (message from Manuel Giraud on Fri, 02 May 2025 09:50:07 +0200) Subject: Re: bug#78205: [PATCH] Recenter for the calendar References: <874iy3jvtc.fsf@ledu-giraud.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78205 Cc: 78205@debbugs.gnu.org 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: Manuel Giraud > Date: Fri, 02 May 2025 09:50:07 +0200 > > This patch adds a "recenter month at point" functionality to the > calendar. It also mimics what 'recenter-top-bottom' is doing for > regular buffers. Thanks. The documentation parts should explain more what it means to "center" a date, and also the meaning of "first place", "last place", etc. These are not self-evident when describing this kind of "centering". From debbugs-submit-bounces@debbugs.gnu.org Sat May 03 08:00:00 2025 Received: (at 78205) by debbugs.gnu.org; 3 May 2025 12:00:00 +0000 Received: from localhost ([127.0.0.1]:38999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBBXC-00022j-QA for submit@debbugs.gnu.org; Sat, 03 May 2025 08:00:00 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:17441) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBBX8-00022V-55 for 78205@debbugs.gnu.org; Sat, 03 May 2025 07:59:56 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=q0igOCqW zsmWwK2XG0hviM/7x5SlX1o22gBLZt2zBso=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=ogBiV5ri3B7voOUhNbEpsdcpk72ihU aRhCbltW3kxtdqM5/SFxqI5usmFnIfk3tUsq5wA3W+bR17XphJb7TODw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=q0igOCqWzsmWwK2X G0hviM/7x5SlX1o22gBLZt2zBso=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=mqkpv216DctloebNYVDIbccuC05SnU5t0H20GA SGE0Hy2+uUcvqdEYMNT7YJWVX+PJnsk1tgyMUTGwkIn4J74IgwLZ3ac3vQBSTjYOQbR7Lu DWTvtFyfZ9DnMkwpASEymcqeKFkf1cWOAkeDjqXiRAxYELhBmyRtq+6vi9MK4Fenfb0u5O U7wI5rBEG71DcXyLPCXUvrxwIZYry9gJwNxRDJIm5ZBCmYRldvzh/+mEKKGQtcwl096aI1 li6G9pS5T91vCgoq/F0aBnHuYVGWTlnB6b3ntlQtXiapwj4Pu8LcBEG1MVdmoeRUL+Hcod P6820o8rUO30NlddMZiUks4Q== Received: from computer (2630.fr [82.65.148.221]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 2a5a0302 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 3 May 2025 13:59:50 +0200 (CEST) From: Manuel Giraud To: Eli Zaretskii Subject: Re: bug#78205: [PATCH] Recenter for the calendar In-Reply-To: <86frhmja26.fsf@gnu.org> References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> Date: Sat, 03 May 2025 13:59:49 +0200 Message-ID: <8734dlx5u2.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78205 Cc: 78205@debbugs.gnu.org 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 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Manuel Giraud >> Date: Fri, 02 May 2025 09:50:07 +0200 >> >> This patch adds a "recenter month at point" functionality to the >> calendar. It also mimics what 'recenter-top-bottom' is doing for >> regular buffers. > > Thanks. > > The documentation parts should explain more what it means to "center" > a date, and also the meaning of "first place", "last place", etc. > These are not self-evident when describing this kind of "centering". Thanks for the review. What do you think of this? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Recenter-for-the-calendar-bug-78205.patch >From fd6c6b66e181160d5b37dc1378f7beedf21a1120 Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Thu, 1 May 2025 17:06:07 +0200 Subject: [PATCH] Recenter for the calendar (bug#78205) * lisp/calendar/cal-move.el (calendar-recenter-last-op): New variable to track last recenter operation. (calendar-recenter-first-last): New command to recenter the calendar. * lisp/calendar/calendar.el (calendar-mode-map): Keybinding for this command. * doc/emacs/calendar.texi (Scroll Calendar): Document this command. * etc/NEWS: Announce this command. --- doc/emacs/calendar.texi | 11 +++++++++++ etc/NEWS | 6 ++++++ lisp/calendar/cal-move.el | 33 +++++++++++++++++++++++++++++++++ lisp/calendar/calendar.el | 1 + 4 files changed, 51 insertions(+) diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index 55798eae16e..d172680db5d 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -258,6 +258,8 @@ Scroll Calendar @itemx @key{PageUp} @itemx @key{prior} Scroll backward by three months (@code{calendar-scroll-right-three-months}). +@item C-l +Recenter the date at point. @end table @kindex > @r{(Calendar mode)} @@ -293,6 +295,15 @@ Scroll Calendar (or @key{prior}) are equivalent to @kbd{C-v} and @kbd{M-v}, just as they are in other modes. +@kindex C-l @r{(Calendar mode)} +@findex calendar-recenter-first-last + The command @kbd{C-l} (@code{calendar-recenter-first-last}) scrolls +the calendar so that the month of the date at point is centered (i.e., +it is placed in second position of the three displayed months). With a +second invocation, this command puts this same month on the left hand +side in the calendar view and a third invocation puts it on the right +hand side. This is in analogy with @code{recenter-top-bottom}. + @node Counting Days @section Counting Days diff --git a/etc/NEWS b/etc/NEWS index a5936b1c6cf..dd7d6d9015e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1990,6 +1990,12 @@ DISABLE-URI non-nil. When starting these debuggers (e.g., 'M-x pdb') while visiting a file, pressing 'M-n' in the command prompt suggests a command line including the file name, using the minibuffer's "future history". +** Calendar + ++++ +*** New command 'calendar-recenter-first-last'. +This command recenters the month of the date at point. By default, it +is bound to 'C-l' in the calendar buffer. * New Modes and Packages in Emacs 31.1 diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el index b0a8917209f..4c05af3d841 100644 --- a/lisp/calendar/cal-move.el +++ b/lisp/calendar/cal-move.el @@ -217,6 +217,39 @@ calendar-scroll-right-three-months last-nonmenu-event)) (calendar-scroll-left (* -3 arg) event)) +(defvar calendar-recenter-last-op nil + "Last calendar recenter operation performed.") + +;;;###cal-autoload +(defun calendar-recenter-first-last () + "Scroll the calendar so that the month of the date at point is centered. +The second invocation puts this month on the left hand side, a third +invocation puts this month on the right hand side, and then the order is +reused in a cyclical manner." + (interactive) + (let ((positions '(center first last)) + (cursor-month (calendar-extract-month + (calendar-cursor-to-nearest-date)))) + ;; Update global last position upon repeat. + (setq calendar-recenter-last-op + (if (eq this-command last-command) + (car (or (cdr (member calendar-recenter-last-op positions)) + positions)) + (car positions))) + ;; XXX like most functions in calendar, a span of three displayed + ;; months is implied here. + (cond ((eq calendar-recenter-last-op 'center) + (cond ((= cursor-month (1- displayed-month)) + (calendar-scroll-right)) + ((= cursor-month (1+ displayed-month)) + (calendar-scroll-left)))) + ;; Other sub-cases should not happen as we should be centered + ;; from here. + ((eq calendar-recenter-last-op 'first) + (calendar-scroll-left)) + ((eq calendar-recenter-last-op 'last) + (calendar-scroll-right 2))))) + ;;;###cal-autoload (defun calendar-forward-day (arg) "Move the cursor forward ARG days. diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 058982647fe..2eebc47db28 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1593,6 +1593,7 @@ calendar-mode-map (define-key map "\C-x>" 'calendar-scroll-left) (define-key map [next] 'calendar-scroll-left-three-months) (define-key map "\C-v" 'calendar-scroll-left-three-months) + (define-key map "\C-l" 'calendar-recenter-first-last) (define-key map "\C-b" 'calendar-backward-day) (define-key map "\C-p" 'calendar-backward-week) (define-key map "\e{" 'calendar-backward-month) -- 2.49.0 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat May 03 08:53:40 2025 Received: (at 78205) by debbugs.gnu.org; 3 May 2025 12:53:40 +0000 Received: from localhost ([127.0.0.1]:39187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBCNA-0004qM-F7 for submit@debbugs.gnu.org; Sat, 03 May 2025 08:53:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44968) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBCN7-0004q6-OE for 78205@debbugs.gnu.org; Sat, 03 May 2025 08:53:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uBCN2-0000Gi-6v; Sat, 03 May 2025 08:53:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8Am9yL/vtAMn6A/22I7TRp+f1QYfEO2XEHit6PXFsjA=; b=Pw5P+GfAZd+q mbKy5ept/xA+zo2cvSnrM12yCAzsI3EUKOa1OeO7/AZGz5A9qy1bTJa10AJXy0pNuZxPEB48pG+fL 5tTEt+FGu6ij8ZASKAjTmjvV8hx1fFcQx0AbJ3zOMVHgJZZBtRjdPyuZHIa681/EZ6kD5VA0LD5Ei wMGxXujvZXjHVmmVvQGwkZ1grJHJiqTDAqp+PJphTrlqTNyjsz5ceZjvrnbejg90gnEGZHJgjxiVJ Fg9wPksR58mfIsorQQ/N8JJEraMgYYnZVTBlhW8FxGMc4eYEOz+3EbzSHkC8hlh5Kv1P5upuGHt6u BUO2Wt+pwauAuFuuEIfZdA==; Date: Sat, 03 May 2025 15:53:29 +0300 Message-Id: <86zfftj1o6.fsf@gnu.org> From: Eli Zaretskii To: Manuel Giraud In-Reply-To: <8734dlx5u2.fsf@ledu-giraud.fr> (message from Manuel Giraud on Sat, 03 May 2025 13:59:49 +0200) Subject: Re: bug#78205: [PATCH] Recenter for the calendar References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> <8734dlx5u2.fsf@ledu-giraud.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78205 Cc: 78205@debbugs.gnu.org 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: Manuel Giraud > Cc: 78205@debbugs.gnu.org > Date: Sat, 03 May 2025 13:59:49 +0200 > > +@kindex C-l @r{(Calendar mode)} > +@findex calendar-recenter-first-last > + The command @kbd{C-l} (@code{calendar-recenter-first-last}) scrolls > +the calendar so that the month of the date at point is centered (i.e., > +it is placed in second position of the three displayed months). With a > +second invocation, this command puts this same month on the left hand > +side in the calendar view and a third invocation puts it on the right > +hand side. This is in analogy with @code{recenter-top-bottom}. I'd suggest to simplify: The command @kbd{C-l} (@code{calendar-recenter-first-last}) scrolls the calendar on display so that the month of the date at point is centered horizontally. Next invocation of this command puts that month on the leftmost position, and another invocation puts it on the rightmost position. Subsequent invocations reuse the same order in a cyclical manner. From debbugs-submit-bounces@debbugs.gnu.org Sat May 03 10:58:41 2025 Received: (at 78205) by debbugs.gnu.org; 3 May 2025 14:58:41 +0000 Received: from localhost ([127.0.0.1]:42304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBEK9-0003uC-1g for submit@debbugs.gnu.org; Sat, 03 May 2025 10:58:41 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:5067) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBEK6-0003u3-Aa for 78205@debbugs.gnu.org; Sat, 03 May 2025 10:58:39 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=u8bnRi/q JGcI8u4xcLAYMcycm+auDwbRsOHOK7VaCpg=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=h8zXg24iNlCdgFkKcjS1aitvGqdnky Amwn+x2g/77FkGhzw7cxpUUEVjl3fxgs/QQK7/iEnHDGiPjqEhQBTgDw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=u8bnRi/qJGcI8u4x cLAYMcycm+auDwbRsOHOK7VaCpg=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=b0y+B/lhFaTFkyJvTUM4vUJLwkqA2TSsJsD89d Cbx/oQrWwo50SxZtVB5PjtWozbkX+g/t06BzVemAJ4zWdWTyv8MGq+9R82Yd3lDusICcZv g/Sjw2Li+wgnD2b9TN8n9JdXceYRHtQ52iqXBUnPdqJUM3haEK5U+oCAl+4g+ZUP8mwP1Z cKyf5C8WAUDdKEd9yd6c8Dsu2hnp7/Hiek7mdZHWO7ABc5qjTMFCU3aZHVJUdCILEwTFC2 JMoEI1J8K6LbPxGgQ/kfcGzAQrtnRm2KwRSJtvhO8HO1NlcQNf95anJRKcocyy2OHUkNVK M0KntHGlfaJJYrsGyjX9/mfg== Received: from computer (2630.fr [82.65.148.221]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 294df119 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 3 May 2025 16:58:31 +0200 (CEST) From: Manuel Giraud To: Eli Zaretskii Subject: Re: bug#78205: [PATCH] Recenter for the calendar In-Reply-To: <86zfftj1o6.fsf@gnu.org> References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> <8734dlx5u2.fsf@ledu-giraud.fr> <86zfftj1o6.fsf@gnu.org> Date: Sat, 03 May 2025 16:58:29 +0200 Message-ID: <87plgpvizu.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78205 Cc: 78205@debbugs.gnu.org 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: >> From: Manuel Giraud >> Cc: 78205@debbugs.gnu.org >> Date: Sat, 03 May 2025 13:59:49 +0200 >> >> +@kindex C-l @r{(Calendar mode)} >> +@findex calendar-recenter-first-last >> + The command @kbd{C-l} (@code{calendar-recenter-first-last}) scrolls >> +the calendar so that the month of the date at point is centered (i.e., >> +it is placed in second position of the three displayed months). With a >> +second invocation, this command puts this same month on the left hand >> +side in the calendar view and a third invocation puts it on the right >> +hand side. This is in analogy with @code{recenter-top-bottom}. > > I'd suggest to simplify: > > The command @kbd{C-l} (@code{calendar-recenter-first-last}) scrolls > the calendar on display so that the month of the date at point is > centered horizontally. Next invocation of this command puts that > month on the leftmost position, and another invocation puts it on > the rightmost position. Subsequent invocations reuse the same order > in a cyclical manner. Neat. Your english is better than mine ;-) But before I do this modification, do you think that the command name is still appropriate? -- Manuel Giraud From debbugs-submit-bounces@debbugs.gnu.org Sat May 03 11:48:22 2025 Received: (at 78205) by debbugs.gnu.org; 3 May 2025 15:48:22 +0000 Received: from localhost ([127.0.0.1]:42552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBF6D-0006cf-Tb for submit@debbugs.gnu.org; Sat, 03 May 2025 11:48:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58578) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBF6A-0006cI-Jr for 78205@debbugs.gnu.org; Sat, 03 May 2025 11:48:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uBF65-0003sP-2J; Sat, 03 May 2025 11:48:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mS+NNvRIyFTT//kf4Ed35epzAAZjNMlk69DviwcB6v4=; b=rzQZD9EiU4HX qImnXI8HHWP0ryW+Ddv0SZz5n1h06gobJqwgkAT5NOx7M0T+1ETMVii4lK7AEUrQFpvSKeOZgp3A6 Z+MS/5+QBaiESzy3oVMJrSs1ohFRpXw1K8Qx363omkgj8Bkz4Zdfm9XcM1IPTId6Koidk9nZEqPcj tphO9h/+bvI79nE3y2eYB8GXZlZRXq+W1P/SuQcVrkwOlLh/n7wbeYJofcg5Db2e15KQ9CT6Yggzd nvohgj+cJmmIQ/qyECDgqz5QzPl4Ence+wM5K50p2XOlr5a3VliX7HcE/naAZlHznFZ83P8sIJuO1 Kdd3MkhbLKZVrnnbtwNEsQ==; Date: Sat, 03 May 2025 18:47:31 +0300 Message-Id: <86msbtitm4.fsf@gnu.org> From: Eli Zaretskii To: Manuel Giraud In-Reply-To: <87plgpvizu.fsf@ledu-giraud.fr> (message from Manuel Giraud on Sat, 03 May 2025 16:58:29 +0200) Subject: Re: bug#78205: [PATCH] Recenter for the calendar References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> <8734dlx5u2.fsf@ledu-giraud.fr> <86zfftj1o6.fsf@gnu.org> <87plgpvizu.fsf@ledu-giraud.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78205 Cc: 78205@debbugs.gnu.org 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: Manuel Giraud > Cc: 78205@debbugs.gnu.org > Date: Sat, 03 May 2025 16:58:29 +0200 > > Eli Zaretskii writes: > > > I'd suggest to simplify: > > > > The command @kbd{C-l} (@code{calendar-recenter-first-last}) scrolls > > the calendar on display so that the month of the date at point is > > centered horizontally. Next invocation of this command puts that > > month on the leftmost position, and another invocation puts it on > > the rightmost position. Subsequent invocations reuse the same order > > in a cyclical manner. > > Neat. Your english is better than mine ;-) Years of practice ;-) > But before I do this modification, do you think that the command > name is still appropriate? I think calendar-recenter is good enough. (The reason for the "-top-bottom" part of recenter-top-bottom is historical, because we already had a primitive called "recenter".) From debbugs-submit-bounces@debbugs.gnu.org Sat May 03 22:45:53 2025 Received: (at 78205) by debbugs.gnu.org; 4 May 2025 02:45:53 +0000 Received: from localhost ([127.0.0.1]:46842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBPMX-0000mc-2p for submit@debbugs.gnu.org; Sat, 03 May 2025 22:45:53 -0400 Received: from mout.web.de ([212.227.15.14]:42553) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBPMQ-0000kh-Mx for 78205@debbugs.gnu.org; Sat, 03 May 2025 22:45:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1746326739; x=1746931539; i=michael_heerdegen@web.de; bh=gyFSKle6FmWCwsUgWbFEUZq4Y8G5n3NyNCvBv7yusdk=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=tH6yAmAvRKHTx8Ok0AQ7v1QObhCKIdOqZdtxAIPS1Bunqjlaw4UWpI3Wl0rC98YK VHE2ZwXUUBopFeepOwBwi0yTRH0M6RHExBvs1hRLddliZauCzcoMmc4stO+R5fS5u JNtKvkkJvO6hE8NMbq0UdD1gEIYT7WQLvrYvtsxtF2G3qPSIHfi03YLFvxNDAtV5/ NFn6RJtN9beK/IJhYIzmOb5zz16KLVvAGw3Haq+i3lvcvx+R/Rtnm76ca9nh1+Hmp XcS2hkx7Cw/iRW6/6VZcGBGawSoxLC9HK+Ya1mxVpvgYM3wKFV3pBWcQ1u7omfBHa tOplcfetiWd1czGdqA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([88.66.201.164]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MGQC9-1uHCn80NrB-007Pi1; Sun, 04 May 2025 04:45:39 +0200 From: Michael Heerdegen To: Manuel Giraud Subject: Re: bug#78205: [PATCH] Recenter for the calendar In-Reply-To: <8734dlx5u2.fsf@ledu-giraud.fr> References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> <8734dlx5u2.fsf@ledu-giraud.fr> Date: Sun, 04 May 2025 04:47:18 +0200 Message-ID: <87o6w9jdmx.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:qiTpAccpBPKS6bxMdAf8Rb4svgNAI0RDzdaNV5O9+4JrOnVGdHM EI5TBIbMtQ7GWni5oji6ivd08tNPb+S47NNpxcAg9njAUnCzNrREfjMqZBDXnBuQ/PWmXnY 8ZPc4ua/6YSfQoEw4k58O5A+Tty/WxcR9p7Qoh+9TC8b0UUkIxbsz/LZ/AGsrOR+Buy/Mrr pvcDczlkuVgV+N+0bi6OA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:+MLAmcB2RFc=;EyIyXT3X6NAYSWbLd6Ba03DWv1/ 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 9WE+B8Bt2YXaF2+Tcct9Pu5E3QWl+ig= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78205 Cc: Eli Zaretskii , 78205@debbugs.gnu.org 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 (-) Hello Manuel, your patch works nicely. > + (car (or (cdr (member calendar-recenter-last-op positions)) This `member' could be `memq' I think. > + positions)) > + (car positions))) > + ;; XXX like most functions in calendar, a span of three displayed > + ;; months is implied here. What does "XXX" mean? Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun May 04 06:00:03 2025 Received: (at 78205) by debbugs.gnu.org; 4 May 2025 10:00:03 +0000 Received: from localhost ([127.0.0.1]:52098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBW8h-00009M-EC for submit@debbugs.gnu.org; Sun, 04 May 2025 06:00:03 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:4350) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBW8b-000081-Fl for 78205@debbugs.gnu.org; Sun, 04 May 2025 06:00:00 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=4cj8huBQ Jv1vas7Fga/cNvoI3cb/thgaYh1tkOBMQNg=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=Z8AkQ8Xc9BmbxU3s8V3veGMRPuR2xs vvhPmt4figRUh9cVLF6gwPK5KSLNStsjCQDlaRg+BejVscH5gJp22qDA== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=4cj8huBQJv1vas7F ga/cNvoI3cb/thgaYh1tkOBMQNg=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=b+Zzx2dBq6ST67xVySXM2ublx8VprnRM77Baaq DpvlWQ1vDSAHhfidllyL77qv7wb6zeTe8VSzPhFDCwb5MRx7oo/36QXaMUvK4s3tpsNDaR RM1iTjoR9yLG8V20O9LH3RYBLr//5JW5sZIcOmR/pNIaZgESCRKJu21QDXP8nB3P6KMySr lLagOb0NannQRJS3VBIUC5uBygKbvAprYD+ai0sonrYPIBg6QJYSwThrm/N2V3JwcAh4iO evUYqemtUsrK6O9XgpIgvOfNooK/i+TBbUQQ4EppBNAt4pZVQp6S7oPGtK8X3taE/rGu71 WnyQojGfAGG8IYD7SHRmV1Hw== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 8d97cb06 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 4 May 2025 11:59:54 +0200 (CEST) From: Manuel Giraud To: Michael Heerdegen Subject: Re: bug#78205: [PATCH] Recenter for the calendar In-Reply-To: <87o6w9jdmx.fsf@web.de> References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> <8734dlx5u2.fsf@ledu-giraud.fr> <87o6w9jdmx.fsf@web.de> Date: Sun, 04 May 2025 11:59:53 +0200 Message-ID: <87a57sr90m.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78205 Cc: Eli Zaretskii , 78205@debbugs.gnu.org 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 (-) Michael Heerdegen writes: > Hello Manuel, > > your patch works nicely. > > >> + (car (or (cdr (member calendar-recenter-last-op positions)) > > This `member' could be `memq' I think. Thanks. I have copy this part from 'recenter-top-bottom'. I'll try with memq. >> + positions)) >> + (car positions))) >> + ;; XXX like most functions in calendar, a span of three displayed >> + ;; months is implied here. > > What does "XXX" mean? It is kind of a warning/watchout for future readers. I've seen it use in other places in the Emacs sources. -- Manuel Giraud From debbugs-submit-bounces@debbugs.gnu.org Sun May 04 10:06:10 2025 Received: (at 78205) by debbugs.gnu.org; 4 May 2025 14:06:10 +0000 Received: from localhost ([127.0.0.1]:55282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBZyr-00080I-70 for submit@debbugs.gnu.org; Sun, 04 May 2025 10:06:10 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:40294) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBZye-0007z8-01 for 78205@debbugs.gnu.org; Sun, 04 May 2025 10:06:04 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=7tFXrSb4 Yw2S5idpUC+xoLHLHzECF4m2FaBMpzyMC2U=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=6qr+LtbcOM0ECFoPbYrZUbUJAOI+A9 ORs+bBE06YsDWEBw8hNPOaQN57/m/rReOT9vk9XSgy1bjX1U/Mxfd/AA== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=7tFXrSb4Yw2S5idp UC+xoLHLHzECF4m2FaBMpzyMC2U=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=LItpIuItrjm3pWnWmrRlO7T/bbCN8F54zHdf+E COu/JO47zvLEQaS/0kFC7SOWC/r4EstpKgmAFEGghor0zdpx51mQeAR5KF59XW+rTOT4ma WUYKqXt1aUQIDKIiSYiQh/sQJjgwO8x5bGzGY3EZUJWG8UCAbPV5dLCSODJeDqyf+HDRM5 9BN/mPnnUMt40MhM9eWWiPiPZcdyBPws0aMjnJjwD1e1dQVTDNzjoksoTAghdvIdSESpug 2wm5GTPisun3p1vUk2QrzqHqkfQrBtWL5fgv5Gr8goFw0vEqA1MHdHhbzPzPqLcX5Ypr3l 8AVJ7QxBovWI18PWYuNLC32A== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id fd6d6274 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 4 May 2025 16:05:53 +0200 (CEST) From: Manuel Giraud To: Michael Heerdegen Subject: Re: bug#78205: [PATCH] Recenter for the calendar In-Reply-To: <87a57sr90m.fsf@ledu-giraud.fr> References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> <8734dlx5u2.fsf@ledu-giraud.fr> <87o6w9jdmx.fsf@web.de> <87a57sr90m.fsf@ledu-giraud.fr> Date: Sun, 04 May 2025 16:05:51 +0200 Message-ID: <87y0vccvy8.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78205 Cc: Eli Zaretskii , 78205@debbugs.gnu.org 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 (-) --=-=-= Content-Type: text/plain Hi, Here is a new version of the patch that includes all your improvements. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Recenter-for-the-calendar-bug-78205.patch >From cdac82cef98ed3997f7a9b872295f42eff78ae5a Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Thu, 1 May 2025 17:06:07 +0200 Subject: [PATCH] Recenter for the calendar (bug#78205) * lisp/calendar/cal-move.el (calendar-recenter-last-op): New variable to track last recenter operation. (calendar-recenter): New command to recenter the calendar. * lisp/calendar/calendar.el (calendar-mode-map): Keybinding for this command. * doc/emacs/calendar.texi (Scroll Calendar): Document this command. * etc/NEWS: Announce this command. --- doc/emacs/calendar.texi | 11 +++++++++++ etc/NEWS | 6 ++++++ lisp/calendar/cal-move.el | 33 +++++++++++++++++++++++++++++++++ lisp/calendar/calendar.el | 1 + 4 files changed, 51 insertions(+) diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index 55798eae16e..56f297db5d0 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -258,6 +258,8 @@ Scroll Calendar @itemx @key{PageUp} @itemx @key{prior} Scroll backward by three months (@code{calendar-scroll-right-three-months}). +@item C-l +Recenter the date at point. @end table @kindex > @r{(Calendar mode)} @@ -293,6 +295,15 @@ Scroll Calendar (or @key{prior}) are equivalent to @kbd{C-v} and @kbd{M-v}, just as they are in other modes. +@kindex C-l @r{(Calendar mode)} +@findex calendar-recenter + The command @kbd{C-l} (@code{calendar-recenter}) scrolls the calendar +on display so that the month of the date at point is centered +horizontally. Next invocation of this command puts that month on the +leftmost position, and another invocation puts it on the rightmost +position. Subsequent invocations reuse the same order in a cyclical +manner. + @node Counting Days @section Counting Days diff --git a/etc/NEWS b/etc/NEWS index a5936b1c6cf..f3711d4e6e4 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1990,6 +1990,12 @@ DISABLE-URI non-nil. When starting these debuggers (e.g., 'M-x pdb') while visiting a file, pressing 'M-n' in the command prompt suggests a command line including the file name, using the minibuffer's "future history". +** Calendar + ++++ +*** New command 'calendar-recenter'. +This command recenters the month of the date at point. By default, it +is bound to 'C-l' in the calendar buffer. * New Modes and Packages in Emacs 31.1 diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el index b0a8917209f..70d2c27d96f 100644 --- a/lisp/calendar/cal-move.el +++ b/lisp/calendar/cal-move.el @@ -217,6 +217,39 @@ calendar-scroll-right-three-months last-nonmenu-event)) (calendar-scroll-left (* -3 arg) event)) +(defvar calendar-recenter-last-op nil + "Last calendar recenter operation performed.") + +;;;###cal-autoload +(defun calendar-recenter () + "Scroll the calendar so that the month of the date at point is centered. +Next invocation puts this month on the leftmost position, and another +invocation puts this month on the rightmost position. Subsequent +invocations reuse the same order in a cyclical manner." + (interactive) + (let ((positions '(center first last)) + (cursor-month (calendar-extract-month + (calendar-cursor-to-nearest-date)))) + ;; Update global last position upon repeat. + (setq calendar-recenter-last-op + (if (eq this-command last-command) + (car (or (cdr (memq calendar-recenter-last-op positions)) + positions)) + (car positions))) + ;; XXX: like most functions in calendar, a span of three displayed + ;; months is implied here. + (cond ((eq calendar-recenter-last-op 'center) + (cond ((= cursor-month (1- displayed-month)) + (calendar-scroll-right)) + ((= cursor-month (1+ displayed-month)) + (calendar-scroll-left)))) + ;; Other sub-cases should not happen as we should be centered + ;; from here. + ((eq calendar-recenter-last-op 'first) + (calendar-scroll-left)) + ((eq calendar-recenter-last-op 'last) + (calendar-scroll-right 2))))) + ;;;###cal-autoload (defun calendar-forward-day (arg) "Move the cursor forward ARG days. diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 058982647fe..b0f6a9152d5 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1593,6 +1593,7 @@ calendar-mode-map (define-key map "\C-x>" 'calendar-scroll-left) (define-key map [next] 'calendar-scroll-left-three-months) (define-key map "\C-v" 'calendar-scroll-left-three-months) + (define-key map "\C-l" 'calendar-recenter) (define-key map "\C-b" 'calendar-backward-day) (define-key map "\C-p" 'calendar-backward-week) (define-key map "\e{" 'calendar-backward-month) -- 2.49.0 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 04 12:41:36 2025 Received: (at 78205) by debbugs.gnu.org; 4 May 2025 16:41:36 +0000 Received: from localhost ([127.0.0.1]:58351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBcPH-0003fZ-R4 for submit@debbugs.gnu.org; Sun, 04 May 2025 12:41:36 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:42801) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBcPF-0003ek-Br for 78205@debbugs.gnu.org; Sun, 04 May 2025 12:41:33 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 7B506438D4; Sun, 4 May 2025 16:41:24 +0000 (UTC) From: Juri Linkov To: Manuel Giraud Subject: Re: bug#78205: [PATCH] Recenter for the calendar In-Reply-To: <87a57sr90m.fsf@ledu-giraud.fr> Organization: LINKOV.NET References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> <8734dlx5u2.fsf@ledu-giraud.fr> <87o6w9jdmx.fsf@web.de> <87a57sr90m.fsf@ledu-giraud.fr> Date: Sun, 04 May 2025 19:39:28 +0300 Message-ID: <87cycopby7.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeekjedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohepgedprhgtphhtthhopeejkedvtdehseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtohepmhhitghhrggvlhgphhgvvghruggvghgvnhesfigvsgdruggvpdhrtghpthhtohepmhgrnhhuvghlsehlvgguuhdqghhirhgruhgurdhfrh X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78205 Cc: Michael Heerdegen , Eli Zaretskii , 78205@debbugs.gnu.org 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 (-) >>> + (car (or (cdr (member calendar-recenter-last-op positions)) >> >> This `member' could be `memq' I think. > > Thanks. I have copy this part from 'recenter-top-bottom'. Because the value of 'recenter-top-bottom' can be a float number: (member 0.2 '(0.1 0.2)) => (0.2) (memq 0.2 '(0.1 0.2)) => nil Though now it could use 'memql' introduced in Emacs 22.1: (memql 0.2 '(0.1 0.2)) => (0.2) From debbugs-submit-bounces@debbugs.gnu.org Sun May 04 13:19:59 2025 Received: (at 78205) by debbugs.gnu.org; 4 May 2025 17:19:59 +0000 Received: from localhost ([127.0.0.1]:58853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBd0R-0000OR-Cr for submit@debbugs.gnu.org; Sun, 04 May 2025 13:19:59 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:14330) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBd0O-0000OI-JG for 78205@debbugs.gnu.org; Sun, 04 May 2025 13:19:57 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=uXf7kAnt 1x1cOD6imTCPf5hHaimHK+DOdF2yUWukO5o=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=79jCRCC2bT5pefgtEaaFJS8ZxplZh/ LyuLsPNfXILqbJUXx8lOMHR5fmkwmYMWhUHTRfVcRFKzST0qsp3ATxBA== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=uXf7kAnt1x1cOD6i mTCPf5hHaimHK+DOdF2yUWukO5o=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=cVIHdQQJglpYTWBwJV9v+ZxY+N0BGnY9DdzK53 mT6O7sv7050o/KIkitUSGIE4nybAdoMJnFcctBxVZxXoI6EHwYvRgXlGVx3E/xHCZ79gUo 91Vszi/VEpzSQV6oKLG57/c+TxINx65HvF+xJUNV1CjwoLP1iGo4oewWC275tdAGBR+VPD yQi9Q1M95xbrvupwRnkqUBTZ1/j8r7Yv5iMVr1KeR5Wa35WP0JPqLbNIAFDyKSeZLcMFA6 iHPMD2tI3L1Vho/UUKNyHAuxoR4+Lf3+ZKXdJjEIoUZMC8JQWK79NzLnUAFRyjQyZU0zMd Duqhnh/F5amdmSXd5YaekSPA== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 10128126 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 4 May 2025 19:19:55 +0200 (CEST) From: Manuel Giraud To: Juri Linkov Subject: Re: bug#78205: [PATCH] Recenter for the calendar In-Reply-To: <87cycopby7.fsf@mail.linkov.net> References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> <8734dlx5u2.fsf@ledu-giraud.fr> <87o6w9jdmx.fsf@web.de> <87a57sr90m.fsf@ledu-giraud.fr> <87cycopby7.fsf@mail.linkov.net> Date: Sun, 04 May 2025 19:19:54 +0200 Message-ID: <87bjs88f9h.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78205 Cc: Michael Heerdegen , Eli Zaretskii , 78205@debbugs.gnu.org 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 (-) Juri Linkov writes: >>>> + (car (or (cdr (member calendar-recenter-last-op positions)) >>> >>> This `member' could be `memq' I think. >> >> Thanks. I have copy this part from 'recenter-top-bottom'. > > Because the value of 'recenter-top-bottom' can be a float number: > > (member 0.2 '(0.1 0.2)) > => (0.2) > > (memq 0.2 '(0.1 0.2)) > => nil Thanks Juri, I'll try to remember this next time. FWIW, I have used memq here as suggested by Michael. -- Manuel Giraud From debbugs-submit-bounces@debbugs.gnu.org Sun May 04 20:56:32 2025 Received: (at 78205) by debbugs.gnu.org; 5 May 2025 00:56:32 +0000 Received: from localhost ([127.0.0.1]:35408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBk8F-0004mn-Ua for submit@debbugs.gnu.org; Sun, 04 May 2025 20:56:32 -0400 Received: from mout.web.de ([212.227.17.11]:59543) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBk8C-0004mU-L3 for 78205@debbugs.gnu.org; Sun, 04 May 2025 20:56:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1746406582; x=1747011382; i=michael_heerdegen@web.de; bh=mtnEzHx84Sfg/Q2v+SPrUvUbgrJuK3E0m6gtZ/0EBbA=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=PwyoDlWjf/FHJzHOjFefp5X0hwQMRjZtLKY9DCYXXvdHRmI8wOXnpai+tpBv06eg GbMJfm9F0VwBmvZBRlNBI7OuF9Bni0LxPl6m/LRdOPYVj+Nc5riZ2U/zadx6G7/pf zmweUIt5fbMrqFuI5YvcPk87U6vnkcURTkmqXH8e8Gx0UCJ4/cUBVyVE9udofUST8 /4JPCk56NLQTpUKRb2i8NyGqELrS1WnTE+iusYVnKnP0yneDRoCxPXU1DUopDLEPE 2o8oqN5iCR6jiLi0Y8LPGQXcK6PX0h+EqxUJTTjPD8JxkNJTpSpKXOZBxbCmIW3T/ jwHA9UVWWcz6B50skA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([88.66.201.164]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N4eGT-1vDVFh1ofv-017iEV; Mon, 05 May 2025 02:56:22 +0200 From: Michael Heerdegen To: Manuel Giraud Subject: Re: bug#78205: [PATCH] Recenter for the calendar In-Reply-To: <87a57sr90m.fsf@ledu-giraud.fr> References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> <8734dlx5u2.fsf@ledu-giraud.fr> <87o6w9jdmx.fsf@web.de> <87a57sr90m.fsf@ledu-giraud.fr> Date: Mon, 05 May 2025 02:58:02 +0200 Message-ID: <875xif3mcl.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:nGOUeJ8jWX7VY3HxTENANN2PJkqb6llBbgTvmwHOD9hkVpJQhiO a/ZTWUc0u6FApfCZzaiGcDyIl7UhlLjIyPwZiT0/x7LLnLORF46AmkckpoN5R3O29vhfpxy Z9a+K4WoJ6qNxAo9I0ChZkh2GQhtBP6q79epZtMKrkU6O24PI8rC+Bl0J0pKDZTcNdMgces cuzxJA2/vz9IHxmV1tFtg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:3URQt73dayA=;8E4DWp4kilMBIK50zZ+bhyrhoRl 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 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78205 Cc: Eli Zaretskii , 78205@debbugs.gnu.org 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 (-) Manuel Giraud writes: > Thanks. I have copy this part from 'recenter-top-bottom'. I'll try > with memq. Thanks. > > What does "XXX" mean? > > It is kind of a warning/watchout for future readers. I've seen it use > in other places in the Emacs sources. So if it only says "Look! A comment!", and given that we remove any unimportant comments, and also that everybody can see that there is a comment, I don't think I see a use for this kind of marker. The comment you marked that way doesn't look like it would need this kind of eye catching. It is good to have that comment, but the comment is not that exceptionally important compared to other comments. Something else: I wonder (I hope this would not be too radical, but): have you thought about making the mouse wheel scroll the months as well? Scrolling with the wheel is not useful in the calendar buffer window anyway (*1), and it would fit nicely with your C-l patch. (*1) I sometimes use the mouse wheel because I got confused by the different line numbers the generated calendar has, depending on the number of weeks a month covers/touches. But it doesn't seem to be the case that scrolling every reveals something that was not visible before. And that would be a bug anyway. Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon May 05 02:39:47 2025 Received: (at 78205) by debbugs.gnu.org; 5 May 2025 06:39:47 +0000 Received: from localhost ([127.0.0.1]:37886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBpUR-0004Cb-Gw for submit@debbugs.gnu.org; Mon, 05 May 2025 02:39:47 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:43279) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBpUP-0004CJ-U8 for 78205@debbugs.gnu.org; Mon, 05 May 2025 02:39:46 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id BC149439BC; Mon, 5 May 2025 06:39:38 +0000 (UTC) From: Juri Linkov To: Michael Heerdegen Subject: Re: bug#78205: [PATCH] Recenter for the calendar In-Reply-To: <875xif3mcl.fsf@web.de> Organization: LINKOV.NET References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> <8734dlx5u2.fsf@ledu-giraud.fr> <87o6w9jdmx.fsf@web.de> <87a57sr90m.fsf@ledu-giraud.fr> <875xif3mcl.fsf@web.de> Date: Mon, 05 May 2025 09:22:58 +0300 Message-ID: <87plgn7fh1.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvkedtgedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohepgedprhgtphhtthhopeejkedvtdehseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtohepmhgrnhhuvghlsehlvgguuhdqghhirhgruhgurdhfrhdprhgtphhtthhopehmihgthhgrvghlpghhvggvrhguvghgvghnseifvggsrdguvg X-GND-Sasl: juri@linkov.net X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 78205 Cc: Eli Zaretskii , Manuel Giraud , 78205@debbugs.gnu.org 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.7 (--) > Something else: I wonder (I hope this would not be too radical, but): > have you thought about making the mouse wheel scroll the months as well? > Scrolling with the wheel is not useful in the calendar buffer window > anyway (*1), and it would fit nicely with your C-l patch. Scrolling the months with the mouse wheel would be very much appreciated. In a normal buffer scroll vertically, and S- horizontally. In the calendar the vertical scrolling could move by 3 months, and horizontal by 1 month. Or something like this. Also M- could support different increments. From debbugs-submit-bounces@debbugs.gnu.org Mon May 05 14:00:21 2025 Received: (at 78205) by debbugs.gnu.org; 5 May 2025 18:00:21 +0000 Received: from localhost ([127.0.0.1]:42682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uC073-0008Qm-5D for submit@debbugs.gnu.org; Mon, 05 May 2025 14:00:21 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:28989) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uC06z-0008QW-ML for 78205@debbugs.gnu.org; Mon, 05 May 2025 14:00:19 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=BYbSsfN8 qRCM3MwyVWBR1W+FkRz8UyWsnwOckFEj2PE=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=nL1CsCe8CofRrotlqvw5fXwteOdW4Z mtJiIZLuiTFEgjXGOM5Ve6BDwz88979qUkuL71+ewgnn6V2mnk0xYWBw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=BYbSsfN8qRCM3Mwy VWBR1W+FkRz8UyWsnwOckFEj2PE=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=BydbdcgRVATYpaWOm6rxa/s1z6vhpZrWUO+EJp FCok0xkBqV0WthMeF1g1KJV/NHaMmerraKqn09fQmDCR9cfkfr5WCFTV65kOcdb+mKyxhd 4iRLRPSOR9o4at1ZBl0UpP40Htl5HHI8OgEm+WJWQgsf2iqR7u4tq2nijGFhBNO5r1w3C0 bRgUm4lHRjbPbMyhXPPP3fKhhoEN2S/ntPk/MbWLXSjxKpZq7OReQBGqIxfGKRF3lnvfzr 1mNt6SzxZbG9OobSOj9O2VuW7pOs9fGCew1Mjdw94ErqCTea4GAZmVc8G7HbEHB9kTpBJd W3F7As8/1sz1usSzo6Ty4kVw== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 02219882 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 5 May 2025 20:00:15 +0200 (CEST) From: Manuel Giraud To: Michael Heerdegen Subject: Re: bug#78205: [PATCH] Recenter for the calendar In-Reply-To: <875xif3mcl.fsf@web.de> References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> <8734dlx5u2.fsf@ledu-giraud.fr> <87o6w9jdmx.fsf@web.de> <87a57sr90m.fsf@ledu-giraud.fr> <875xif3mcl.fsf@web.de> Date: Mon, 05 May 2025 20:00:14 +0200 Message-ID: <87ldrbey4x.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78205 Cc: Eli Zaretskii , 78205@debbugs.gnu.org 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 (-) Michael Heerdegen writes: > Manuel Giraud writes: > >> Thanks. I have copy this part from 'recenter-top-bottom'. I'll try >> with memq. > > Thanks. > >> > What does "XXX" mean? >> >> It is kind of a warning/watchout for future readers. I've seen it use >> in other places in the Emacs sources. > > So if it only says "Look! A comment!", and given that we remove any > unimportant comments, and also that everybody can see that there is a > comment, I don't think I see a use for this kind of marker. The comment > you marked that way doesn't look like it would need this kind of eye > catching. It is good to have that comment, but the comment is not that > exceptionally important compared to other comments. Yes, you're right I'll remove this. > Something else: I wonder (I hope this would not be too radical, but): > have you thought about making the mouse wheel scroll the months as well? > Scrolling with the wheel is not useful in the calendar buffer window > anyway (*1), and it would fit nicely with your C-l patch. Good idea! I don't usually use the mouse wheel but the calendar behaviour is far from ideal. This would the subject of another patch. -- Manuel Giraud From debbugs-submit-bounces@debbugs.gnu.org Mon May 05 14:07:18 2025 Received: (at 78205) by debbugs.gnu.org; 5 May 2025 18:07:18 +0000 Received: from localhost ([127.0.0.1]:42765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uC0Dl-0000Mc-R9 for submit@debbugs.gnu.org; Mon, 05 May 2025 14:07:18 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:8483) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uC0Di-0000MH-A5 for 78205@debbugs.gnu.org; Mon, 05 May 2025 14:07:15 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=nrIZhDs6 PWBNe3jmKAEpVA8zKhgD+GoJrWi9db5qkes=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=q1rtL63fEAiHN+lvlGJOxSerSX+o06 FUeuLwsudMR7GQbFpBqol5MGQQF25O+LK6Js0l4rqS+3zrc1+vqIcyCQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=nrIZhDs6PWBNe3jm KAEpVA8zKhgD+GoJrWi9db5qkes=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=1Nz71FJsFQCBMpcJGyH6AMsT5SbJS9bI16177Q aeJI3OabcmcUYzFxqdrMqd541fZbhpGin8KNzyRoYYhrjlA5AawiYnYiXUpZCtjqxOZtwi 8uQ1+WaljHkkFvLjy1cV0n1hjMAN0CEqnHH/uMUkyF6uFMUIAXeBX+h5EbGl4iIAko7bid nyX9te/3uTlCruiODw21TxM5+0Ifw6S1LnXaXNS5XVnbhJd6UIiFpI7V5t27nPUhtYeEE6 PznXktFQ3SBaApnT9mW9/CrIWvJnL7uLOtWHL6oZQrHvC2w4nHE8P+wWHk0aSXvdUVHSnO mkrTSe4ahFNCj7sVXO1IqwVg== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 7885e118 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 5 May 2025 20:07:12 +0200 (CEST) From: Manuel Giraud To: Juri Linkov Subject: Re: bug#78205: [PATCH] Recenter for the calendar In-Reply-To: <87plgn7fh1.fsf@mail.linkov.net> References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> <8734dlx5u2.fsf@ledu-giraud.fr> <87o6w9jdmx.fsf@web.de> <87a57sr90m.fsf@ledu-giraud.fr> <875xif3mcl.fsf@web.de> <87plgn7fh1.fsf@mail.linkov.net> Date: Mon, 05 May 2025 20:07:11 +0200 Message-ID: <87h61zextc.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78205 Cc: Michael Heerdegen , Eli Zaretskii , 78205@debbugs.gnu.org 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 (-) Juri Linkov writes: >> Something else: I wonder (I hope this would not be too radical, but): >> have you thought about making the mouse wheel scroll the months as well? >> Scrolling with the wheel is not useful in the calendar buffer window >> anyway (*1), and it would fit nicely with your C-l patch. > > Scrolling the months with the mouse wheel would be very much appreciated. > > In a normal buffer scroll vertically, and S- > horizontally. In the calendar the vertical scrolling could move by 3 months, > and horizontal by 1 month. As I said, I'm not a heavy mouse wheel user but I think it would be better to scroll by one month with a simple ans by three month with S-, no? > Or something like this. Also M- could support > different increments. It seems that this binding is already used for zooming. -- Manuel Giraud From debbugs-submit-bounces@debbugs.gnu.org Mon May 05 15:01:36 2025 Received: (at 78205) by debbugs.gnu.org; 5 May 2025 19:01:36 +0000 Received: from localhost ([127.0.0.1]:43056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uC14K-0003Hl-5Q for submit@debbugs.gnu.org; Mon, 05 May 2025 15:01:36 -0400 Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]:52601) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uC14H-0003HQ-K7 for 78205@debbugs.gnu.org; Mon, 05 May 2025 15:01:34 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 9061B440CD; Mon, 5 May 2025 19:01:25 +0000 (UTC) From: Juri Linkov To: Manuel Giraud Subject: Re: bug#78205: [PATCH] Recenter for the calendar In-Reply-To: <87h61zextc.fsf@ledu-giraud.fr> Organization: LINKOV.NET References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> <8734dlx5u2.fsf@ledu-giraud.fr> <87o6w9jdmx.fsf@web.de> <87a57sr90m.fsf@ledu-giraud.fr> <875xif3mcl.fsf@web.de> <87plgn7fh1.fsf@mail.linkov.net> <87h61zextc.fsf@ledu-giraud.fr> Date: Mon, 05 May 2025 21:58:42 +0300 Message-ID: <87zffq28bh.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvkedukeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohepgedprhgtphhtthhopeejkedvtdehseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtohepmhhitghhrggvlhgphhgvvghruggvghgvnhesfigvsgdruggvpdhrtghpthhtohepmhgrnhhuvghlsehlvgguuhdqghhirhgruhgurdhfrh X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78205 Cc: Michael Heerdegen , Eli Zaretskii , 78205@debbugs.gnu.org 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 (-) >>> Something else: I wonder (I hope this would not be too radical, but): >>> have you thought about making the mouse wheel scroll the months as well? >>> Scrolling with the wheel is not useful in the calendar buffer window >>> anyway (*1), and it would fit nicely with your C-l patch. >> >> Scrolling the months with the mouse wheel would be very much appreciated. >> >> In a normal buffer scroll vertically, and S- >> horizontally. In the calendar the vertical scrolling could move by 3 months, >> and horizontal by 1 month. > > As I said, I'm not a heavy mouse wheel user but I think it would be > better to scroll by one month with a simple ans by three > month with S-, no? Since months are grouped by quarters in a year: January, February, March April, May, June July, August, September October, November, and December scrolling vertically could move to the previous/next group of 3 months. But this could be made customizable later. >> Or something like this. Also M- could support >> different increments. > > It seems that this binding is already used for zooming. Zooming is with C-. From debbugs-submit-bounces@debbugs.gnu.org Tue May 06 14:01:38 2025 Received: (at 78205) by debbugs.gnu.org; 6 May 2025 18:01:38 +0000 Received: from localhost ([127.0.0.1]:32837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uCMbp-00082G-FA for submit@debbugs.gnu.org; Tue, 06 May 2025 14:01:37 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:14894) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uCMbm-000827-Sp for 78205@debbugs.gnu.org; Tue, 06 May 2025 14:01:35 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=+urZeTNC pBqBCqthd55WicaTkpdvWxYx6J07/kCjI1k=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=ly8de8nY/inDrjOPQ54l+DpJSxDUnX 6AQiLjFk/P15hv/exZMy4K98kt461Wmget2TcdmlMJ8ffPGzE1nCMkBQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=+urZeTNCpBqBCqth d55WicaTkpdvWxYx6J07/kCjI1k=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=dPhHhbaUyMOmJYusVVI1pI2nHsMb/z+IlCNA5O qS1hCV1R5Iq4n6MVnIdtlTMDWAKjM1qKo+gBXea5j294lw1ULPbffRXRTrm6C/VQ5fShti cdyLxJ6rQDt22k1wuc3aAIupH4M5kDIcRAqYAdXAFwOiN2V9MPrH/akUAc65GkLSBjYgCG JoH084rjpNr8pYBL7Egbw3nizNYCeS1Fjax2qYLdkbIwAcH362XWitDIK99yRdSbaoaylz OTke10v1qbE8nWsxSmYh3VjVYPnPsSFgvB5Dn4+KG5cMopcIex8ubV1BEuci1Jy1n5CD5y 9z5V3xl6gTl6rASVtiyLiYjA== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 75f1216e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 6 May 2025 20:01:33 +0200 (CEST) From: Manuel Giraud To: Michael Heerdegen Subject: Re: bug#78205: [PATCH] Recenter for the calendar In-Reply-To: <87ldrbey4x.fsf@ledu-giraud.fr> References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> <8734dlx5u2.fsf@ledu-giraud.fr> <87o6w9jdmx.fsf@web.de> <87a57sr90m.fsf@ledu-giraud.fr> <875xif3mcl.fsf@web.de> <87ldrbey4x.fsf@ledu-giraud.fr> Date: Tue, 06 May 2025 20:01:30 +0200 Message-ID: <87wmatehz9.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78205 Cc: Eli Zaretskii , 78205@debbugs.gnu.org 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 (-) --=-=-= Content-Type: text/plain Hi, Here is a (maybe final) version of this patch. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Recenter-for-the-calendar-bug-78205.patch >From 7454dd23ba55afd6d584265e5694face68e18ba7 Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Thu, 1 May 2025 17:06:07 +0200 Subject: [PATCH] Recenter for the calendar (bug#78205) * lisp/calendar/cal-move.el (calendar-recenter-last-op): New variable to track last recenter operation. (calendar-recenter): New command to recenter the calendar. * lisp/calendar/calendar.el (calendar-mode-map): Keybinding for this command. * doc/emacs/calendar.texi (Scroll Calendar): Document this command. * etc/NEWS: Announce this command. --- doc/emacs/calendar.texi | 11 +++++++++++ etc/NEWS | 6 ++++++ lisp/calendar/cal-move.el | 33 +++++++++++++++++++++++++++++++++ lisp/calendar/calendar.el | 1 + 4 files changed, 51 insertions(+) diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index 55798eae16e..56f297db5d0 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -258,6 +258,8 @@ Scroll Calendar @itemx @key{PageUp} @itemx @key{prior} Scroll backward by three months (@code{calendar-scroll-right-three-months}). +@item C-l +Recenter the date at point. @end table @kindex > @r{(Calendar mode)} @@ -293,6 +295,15 @@ Scroll Calendar (or @key{prior}) are equivalent to @kbd{C-v} and @kbd{M-v}, just as they are in other modes. +@kindex C-l @r{(Calendar mode)} +@findex calendar-recenter + The command @kbd{C-l} (@code{calendar-recenter}) scrolls the calendar +on display so that the month of the date at point is centered +horizontally. Next invocation of this command puts that month on the +leftmost position, and another invocation puts it on the rightmost +position. Subsequent invocations reuse the same order in a cyclical +manner. + @node Counting Days @section Counting Days diff --git a/etc/NEWS b/etc/NEWS index a5936b1c6cf..f3711d4e6e4 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1990,6 +1990,12 @@ DISABLE-URI non-nil. When starting these debuggers (e.g., 'M-x pdb') while visiting a file, pressing 'M-n' in the command prompt suggests a command line including the file name, using the minibuffer's "future history". +** Calendar + ++++ +*** New command 'calendar-recenter'. +This command recenters the month of the date at point. By default, it +is bound to 'C-l' in the calendar buffer. * New Modes and Packages in Emacs 31.1 diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el index b0a8917209f..aad05f572d6 100644 --- a/lisp/calendar/cal-move.el +++ b/lisp/calendar/cal-move.el @@ -217,6 +217,39 @@ calendar-scroll-right-three-months last-nonmenu-event)) (calendar-scroll-left (* -3 arg) event)) +(defvar calendar-recenter-last-op nil + "Last calendar recenter operation performed.") + +;;;###cal-autoload +(defun calendar-recenter () + "Scroll the calendar so that the month of the date at point is centered. +Next invocation puts this month on the leftmost position, and another +invocation puts this month on the rightmost position. Subsequent +invocations reuse the same order in a cyclical manner." + (interactive) + (let ((positions '(center first last)) + (cursor-month (calendar-extract-month + (calendar-cursor-to-nearest-date)))) + ;; Update global last position upon repeat. + (setq calendar-recenter-last-op + (if (eq this-command last-command) + (car (or (cdr (memq calendar-recenter-last-op positions)) + positions)) + (car positions))) + ;; Like most functions in calendar, a span of three displayed months + ;; is implied here. + (cond ((eq calendar-recenter-last-op 'center) + (cond ((= cursor-month (1- displayed-month)) + (calendar-scroll-right)) + ((= cursor-month (1+ displayed-month)) + (calendar-scroll-left)))) + ;; Other sub-cases should not happen as we should be centered + ;; from here. + ((eq calendar-recenter-last-op 'first) + (calendar-scroll-left)) + ((eq calendar-recenter-last-op 'last) + (calendar-scroll-right 2))))) + ;;;###cal-autoload (defun calendar-forward-day (arg) "Move the cursor forward ARG days. diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 058982647fe..b0f6a9152d5 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1593,6 +1593,7 @@ calendar-mode-map (define-key map "\C-x>" 'calendar-scroll-left) (define-key map [next] 'calendar-scroll-left-three-months) (define-key map "\C-v" 'calendar-scroll-left-three-months) + (define-key map "\C-l" 'calendar-recenter) (define-key map "\C-b" 'calendar-backward-day) (define-key map "\C-p" 'calendar-backward-week) (define-key map "\e{" 'calendar-backward-month) -- 2.49.0 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 08 05:48:48 2025 Received: (at 78205-done) by debbugs.gnu.org; 8 May 2025 09:48:49 +0000 Received: from localhost ([127.0.0.1]:54323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uCxs0-0004Fw-Mr for submit@debbugs.gnu.org; Thu, 08 May 2025 05:48:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41156) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uCxry-0004Fi-Tq for 78205-done@debbugs.gnu.org; Thu, 08 May 2025 05:48:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uCxrt-0000Xb-7F; Thu, 08 May 2025 05:48:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qN2Z04sfJgwVaH2Otoor0C2yh8QFs770BEeJm3RribU=; b=Q/8JKZwPz6Dz uXVOW4S7dFYim42iOI8gr0nW8TvHSWcqOQxsRZnLFdN5W0UYKXFzxwigxKnso1q/JnKa2oLF07jLJ B95LYEEq42OL54QoTt2lJiHQAZBDvjZnnmM9yMBE2b2T4/6qizaA8PzsfIz18nWLxB/Kvx1B2fPGA OkH1ZksU46GBIcgHkeTK+XugM65Otb6W4uw6dLPNCZ/76cXc30kQpT0zHkaVagIVyY8l1pTuylzrZ WpxdtitCStCwjqXeolZKGkJe5ZiM8cYvQC1r6HMLHQ9vao1Ttm9Vl2ZkyrKTg7JRLvkKY47y9OxCs +Xda83czfH0ERw/yrGNYLQ==; Date: Thu, 08 May 2025 12:48:38 +0300 Message-Id: <86ikmbe8ll.fsf@gnu.org> From: Eli Zaretskii To: Manuel Giraud In-Reply-To: <87wmatehz9.fsf@ledu-giraud.fr> (message from Manuel Giraud on Tue, 06 May 2025 20:01:30 +0200) Subject: Re: bug#78205: [PATCH] Recenter for the calendar References: <874iy3jvtc.fsf@ledu-giraud.fr> <86frhmja26.fsf@gnu.org> <8734dlx5u2.fsf@ledu-giraud.fr> <87o6w9jdmx.fsf@web.de> <87a57sr90m.fsf@ledu-giraud.fr> <875xif3mcl.fsf@web.de> <87ldrbey4x.fsf@ledu-giraud.fr> <87wmatehz9.fsf@ledu-giraud.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78205-done Cc: michael_heerdegen@web.de, 78205-done@debbugs.gnu.org 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: Manuel Giraud > Cc: Eli Zaretskii , 78205@debbugs.gnu.org > Date: Tue, 06 May 2025 20:01:30 +0200 > > Here is a (maybe final) version of this patch. Thanks, installed on the master branch, and closing the bug. From unknown Fri Jun 20 07:14:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 05 Jun 2025 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator