unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: 61496@debbugs.gnu.org
Subject: bug#61496: 30.0.50; Default value of icon-title-format
Date: Tue, 14 Feb 2023 17:20:44 +0800	[thread overview]
Message-ID: <878rh0vc0j.fsf@yahoo.com> (raw)
In-Reply-To: <87zg9hqflv.fsf@telefonica.net> ("Óscar Fuentes"'s message of "Tue, 14 Feb 2023 01:02:04 +0100")

Óscar Fuentes <ofv@wanadoo.es> writes:

> 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 this change, but please note that our coding style means
you should write:

  fmt = (FRAME_ICONIFIED_P && !NILP (Vicon_title_format)
         ? Vicon_title_format : Vframe_title_format);

instead.

Thanks.





  reply	other threads:[~2023-02-14  9:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14  0:02 bug#61496: 30.0.50; Default value of icon-title-format Óscar Fuentes
2023-02-14  9:20 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-02-14 12:18 ` Eli Zaretskii
2023-02-14 13:35   ` Óscar Fuentes
2023-02-14 14:13     ` Eli Zaretskii
2023-02-14 14:32       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-14 14:42         ` Eli Zaretskii
2023-02-14 14:57           ` Óscar Fuentes
2023-02-14 17:29             ` Eli Zaretskii
     [not found]               ` <87o7pto9zb.fsf@bernoul.li>
2023-02-16 16:44                 ` Eli Zaretskii
2023-02-16 17:09                 ` Eli Zaretskii
2023-02-17  1:10                   ` Óscar Fuentes
2023-02-17  2:47                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-17  7:46                       ` Eli Zaretskii
2023-02-14 14:50       ` Óscar Fuentes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rh0vc0j.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=61496@debbugs.gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).