GNU bug report logs -
#78957
31.0.50; Wrong mode-line in fancy diary
Previous Next
Reported by: Manuel Giraud <manuel <at> ledu-giraud.fr>
Date: Fri, 4 Jul 2025 19:16:02 UTC
Severity: normal
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Stephen Berman <stephen.berman <at> gmx.net> writes:
[...]
> I hope you haven't spent time on that yet, because it occurred to me
> that the following patch might suffice:
:-D I did not spend to much time but, in the mean time, came up with
this one:
[0001-Fix-mode-line-string-width-in-diary-view.patch (text/x-patch, inline)]
From 5b1b04936e5d31197ea5129fb7e56e28f0aa24ad Mon Sep 17 00:00:00 2001
From: Stephen Berman <stephen.berman <at> gmx.net>
Date: Sat, 5 Jul 2025 10:56:00 +0200
Subject: [PATCH] Fix mode-line string width in diary view
* lisp/calendar/calendar.el (calendar-in-read-only-buffer):
Select the buffer window because, for example,
`calendar-set-mode-line' needs it.
---
lisp/calendar/calendar.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 917624c489e..8b7aa71db93 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1168,8 +1168,9 @@ calendar-in-read-only-buffer
buffer-undo-list t)
(erase-buffer)
(display-buffer ,buffer)
- ,@body
- (goto-char (point-min))
+ (with-selected-window (get-buffer-window ,buffer)
+ ,@body
+ (goto-char (point-min)))
(set-buffer-modified-p nil)
(setq buffer-read-only t)))
--
2.49.0
[Message part 3 (text/plain, inline)]
But, I prefer yours. Do you mind if I complete your patch with my log
entry?
--
Manuel Giraud
This bug report was last modified 13 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.