GNU bug report logs - #78957
31.0.50; Wrong mode-line in fancy diary

Previous Next

Package: emacs;

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

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: martin rudalics <rudalics <at> gmx.at>, stephen.berman <at> gmx.net, 78957 <at> debbugs.gnu.org
Subject: bug#78957: 31.0.50; Wrong mode-line in fancy diary
Date: Thu, 10 Jul 2025 17:10:56 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Manuel Giraud <manuel <at> ledu-giraud.fr>
>> Cc: 78957 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
>> Date: Thu, 10 Jul 2025 14:24:00 +0200
>> 
>> Hi Eli,
>> 
>> Do you think this patch could go in?  Maybe in the emacs-30 branch since
>> it is a bug fix?
>
> Is this a regression in a recent Emacs version?  If yes, which
> version?

Hard to tell but it seems it already has been an issue before:

--8<---------------cut here---------------start------------->8---
commit 4cbd0713000c5f0a184e16df3556e8408ea3b894
Author: Mark Oteiza <mvoteiza <at> udel.edu>
Date:   Sat Oct 10 22:23:59 2015 -0400

    * lisp/calendar/calendar.el: Display buffer before executing body.
    
    In each use of this macro, the modeline is derived from a window width
    calculation, which will be wrong if (display-buffer) splits the window
    horizontally.
--8<---------------cut here---------------end--------------->8---

But at the same time, `calendar-set-mode-line' has not been modified
since 2012.

So maybe, once upon a time, `display-buffer' meant "make this buffer the
selected window" and this is not the case anymore.

> If this isn't a regression, then please make the patch 110% safe if
> you want it to go to the release branch.  E.g., what if
> get-buffer-window returns nil?
>
> Martin, any comments to the patch, with emphasis on its safety?

I'll try and report about Martin's proposal.

Thanks.
-- 
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.