GNU bug report logs -
#80069
[PATCH] Fix the date on the calendar mode line
Previous Next
To reply to this bug, email your comments to 80069 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80069; Package
emacs.
(Wed, 24 Dec 2025 09:58:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Liu Hui <liuhui1610 <at> gmail.com>:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org.
(Wed, 24 Dec 2025 09:58:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tags: patch
When 'date' is used in calendar-mode-line-format, the mode line is
expected to show the date closest to cursor position. But it may show
the wrong date with commands calendar-redraw and calendar-other-month:
1. emacs -Q
2. eval the code:
(require 'calendar)
(setq calendar-mode-line-format (list '(calendar-date-string date)))
(add-hook 'calendar-move-hook 'calendar-update-mode-line)
3. M-x calendar
4. press C-f
=> the cursor and the mode line shows the same day
5. press C-c C-l
=> the cursor remains but the date on the mode line is changed
6. press >
=> the cursor and the mode line is consistent
7. press o RET RET
=> inconsistent dates
[0001-Fix-the-date-on-the-calendar-mode-line.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80069; Package
emacs.
(Wed, 24 Dec 2025 11:04:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 80069 <at> debbugs.gnu.org (full text, mbox):
Liu Hui <liuhui1610 <at> gmail.com> writes:
> Tags: patch
>
>
> When 'date' is used in calendar-mode-line-format, the mode line is
> expected to show the date closest to cursor position. But it may show
> the wrong date with commands calendar-redraw and calendar-other-month:
>
> 1. emacs -Q
> 2. eval the code:
>
> (require 'calendar)
> (setq calendar-mode-line-format (list '(calendar-date-string date)))
> (add-hook 'calendar-move-hook 'calendar-update-mode-line)
>
> 3. M-x calendar
> 4. press C-f
> => the cursor and the mode line shows the same day
> 5. press C-c C-l
> => the cursor remains but the date on the mode line is changed
> 6. press >
> => the cursor and the mode line is consistent
> 7. press o RET RET
> => inconsistent dates
Hi Liu,
I can confirm this misbehavior and your patch fixes it. Thanks.
--
Manuel Giraud
This bug report was last modified 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.