[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61496: 30.0.50; Default value of icon-title-format
From: |
Eli Zaretskii |
Subject: |
bug#61496: 30.0.50; Default value of icon-title-format |
Date: |
Tue, 14 Feb 2023 14:18:36 +0200 |
> From: Óscar Fuentes <ofv@wanadoo.es>
> Date: Tue, 14 Feb 2023 01:02:04 +0100
>
>
> AFAIK icon-title-format was broken since long time ago (possibly for
> several major releases) and it was fixed recently.
>
> I propose that its default value should be nil, and interpret that value
> as "same as frame-title-format". That's why:
>
> 1. The case of having an specific frame title when it is iconified seems
> to me as way less frequent than expecting that the frame keeps the
> same title.
>
> 2. After upgrading to Emacs 29, users that set frame-title-format will
> see how frames change their title when iconified.
>
> 3. There are mechanisms for applying settings or performing actions
> depending on the title of a frame (KDE Window Rules and scripts based
> on xdotool, for instance.) For keeping those mechanisms on a working
> state with Emacs 29, the user must ensure that either it keeps
> icon-title-format synced with frame-title-format and/or his scripts
> must be adapted. Without that, any config that depends on the
> content's of the frame title will be broken (unless the user already
> set icon-title-format, but it would be surprising if he did, as that
> setting had no effect until now.)
>
> Having a working icon-title-format, in practice, is a new feature, so
> defining a new default for it shouldn't have any impact. Certainly, it
> will not have a visible effect compared to recent Emacs releases.
> However, keeping its current default value may cause confusion and
> breakage for any user that sets frame-title-format on his config.
>
> The required change in code is simple enough:
>
> src/xdisp.c | 3 ++-
>
> modified src/xdisp.c
> @@ -13424,7 +13424,8 @@ gui_consider_frame_title (Lisp_Object frame)
>
> Fselect_window (f->selected_window, Qt);
> set_buffer_internal_1 (XBUFFER (XWINDOW
> (f->selected_window)->contents));
> - fmt = FRAME_ICONIFIED_P (f) ? Vicon_title_format : Vframe_title_format;
> + fmt = FRAME_ICONIFIED_P (f) && !NILP (Vicon_title_format) ?
> + Vicon_title_format : Vframe_title_format;
>
> mode_line_target = MODE_LINE_TITLE;
> title_start = MODE_LINE_NOPROP_LEN (0);
>
> ... plus a trivial doc change on its DEFVAR_LISP and initialization.
>
> If this proposal is acceptable, it should be applied to Emacs 29, to
> avoid putting ourselves on a similar scenario when Emacs 30 is released.
I agree with adding a feature that will allow to keep
icon-title-format and frame-title-format identical. However:
. I don't want to make that the default: it's too late for such
changes on the emacs-29 branch.
. I suggest that the "special" value which means "use
frame-title-format" will be t, not nil, so that users who want it
set it explicitly, not by some omission. (Code-wise, this is not
important, since the code treats both nil and t the same: it
produces nothing. So using t or nil is backward-compatible, in
the sense that older Emacsen will not crash.)
I understand that you think the more radical change you propose is for
the better, and "no one can possibly suffer of be against it", but I
think you are not very objective, being a victim of the problem, and
it is quite possible that someone out there does want/expect the
default value to be a string. Thus, I think we should leave the
change of the default value for some future release.
So: okay for changing xdisp.c, just using EQ (Qt, ...), not NILP, but
please don't change the default value of icon-title-format.
Also, this change needs a suitable NEWS entry and appropriate changes
for the doc string and the ELisp manual.
Thanks.
- bug#61496: 30.0.50; Default value of icon-title-format, Óscar Fuentes, 2023/02/13
- bug#61496: 30.0.50; Default value of icon-title-format, Po Lu, 2023/02/14
- bug#61496: 30.0.50; Default value of icon-title-format,
Eli Zaretskii <=
- bug#61496: 30.0.50; Default value of icon-title-format, Óscar Fuentes, 2023/02/14
- bug#61496: 30.0.50; Default value of icon-title-format, Eli Zaretskii, 2023/02/14
- bug#61496: 30.0.50; Default value of icon-title-format, Po Lu, 2023/02/14
- bug#61496: 30.0.50; Default value of icon-title-format, Eli Zaretskii, 2023/02/14
- bug#61496: 30.0.50; Default value of icon-title-format, Óscar Fuentes, 2023/02/14
- bug#61496: 30.0.50; Default value of icon-title-format, Eli Zaretskii, 2023/02/14
- Message not available
- bug#61496: 30.0.50; Default value of icon-title-format, Eli Zaretskii, 2023/02/16
- Message not available
- bug#61496: 30.0.50; Default value of icon-title-format, Eli Zaretskii, 2023/02/16
- bug#61496: 30.0.50; Default value of icon-title-format, Óscar Fuentes, 2023/02/16
- bug#61496: 30.0.50; Default value of icon-title-format, Po Lu, 2023/02/16