From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61496: 30.0.50; Default value of icon-title-format Date: Tue, 14 Feb 2023 17:20:44 +0800 Message-ID: <878rh0vc0j.fsf@yahoo.com> References: <87zg9hqflv.fsf@telefonica.net> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18721"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 61496@debbugs.gnu.org To: =?UTF-8?Q?=C3=93scar?= Fuentes Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 14 10:24:31 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRrY6-0004f9-Ky for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Feb 2023 10:24:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRrXf-0007Hq-TV; Tue, 14 Feb 2023 04:24:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRrXe-0007Fe-Ol for bug-gnu-emacs@gnu.org; Tue, 14 Feb 2023 04:24:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRrXe-0007Fe-El for bug-gnu-emacs@gnu.org; Tue, 14 Feb 2023 04:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pRrXd-00086e-MW for bug-gnu-emacs@gnu.org; Tue, 14 Feb 2023 04:24:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Feb 2023 09:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61496 X-GNU-PR-Package: emacs Original-Received: via spool by 61496-submit@debbugs.gnu.org id=B61496.167636659131087 (code B ref 61496); Tue, 14 Feb 2023 09:24:01 +0000 Original-Received: (at 61496) by debbugs.gnu.org; 14 Feb 2023 09:23:11 +0000 Original-Received: from localhost ([127.0.0.1]:52555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRrWp-00085L-7A for submit@debbugs.gnu.org; Tue, 14 Feb 2023 04:23:11 -0500 Original-Received: from sonic307-35.consmr.mail.ne1.yahoo.com ([66.163.190.58]:38972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRrWn-000852-0s for 61496@debbugs.gnu.org; Tue, 14 Feb 2023 04:23:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1676366582; bh=Hia6aA7oIC/zwTSRIRsSK3ufRhJpduX0T/PFsF8/yN4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=ItV1EkaVHML3qObgpkvDGg/1ywIquhZD3ZA0Z7Yu3ylKyHxi/ooYmvuAFnqMpTSfCt+TITbWRb/2Gpm1hmkVH7S52hAdwjKDgPCmL2JD9n77wsb7PZI5XhRtTmZGuaArc+k3h066FD6ll7z5RE1839CIjwkO1alJEtZa7z40pIvMG8CyXu25iGExLGsz506FnO6ScBKDX7HDdsJVBaS+IJ/kNCaE0Im1p8mU2+fFoD8y7HvqNxP2a16G0/Zol3vqObOB09j3f037LRNEtS1Uiw0vbnMzBdR0lFrkUnlHOHkYcSCWCYgeYzIdvhPurzdtXu2t0XwQWbWH0ir56CSU9Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1676366582; bh=XuZY6keNY6naP0iyEfHeXfQut4cOFgMLqsAl/xfAEaZ=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=VX6J2SoMaeVVpWDQKZATKCYyzECElyrOpapBJxtqxtDZTMQYr1JTo2p4wATTYpKtVdlapjIGgfH54mcxTXy5VEBYx5VCFSieSnKtssY+raCOsxoicRx+GhmLLjkWDuSKTCheuaUCj/ikEBRlRIQ5py6lQzJRemozLjz0sFOlDRV1ANivTwv7GTCvn6paBic5UzM+rK6ok5FecUBdGvenkcmB61DJg+ehpugkoTnLdeBiBjBa09IO8P/K6j8cmbjLx4A9ZAfJR0dlgvSp1xdFvGKBY1rNqwOVgJbX94uW+QomkHQZI08nlQ+R4XXwQjVEaMJt5zNIficnf8oTw0jTIg== X-YMail-OSG: UKm5Qh0VM1kUFULOxHFDF7GBxi7OTz5wXG2QEJtDNNXRcpeLtcAJ1di.9ARlgUL RFqOZT4.5p0izrLZFUGXXWb8KEISUoI0p4Q7eazl8RYtfZPCr8M7ymh3JCTkwga6hYn6RvzUH8b7 8A8rlDULsMnxFK6GBy07jxl6iOTzMoV38QtyPrlHNnfy3MLJ3Vo42omtEEhOb8O75VS.32bal7qC ohhjj263ABunnRfcNJAurlKaZDdTfjy6j_w7j8LSiGOBQy.VvhpWVF.gCcsH3AlwXWcVSFjZOfD3 P_7z4vkbX8t1HkVO8LZ3Y0qesIATdCD2Ob5PKSa4Qd_bLsi1kfTECEqtZWOsRvekE56NdVvAeO34 WK1G7z76HfGF7GTgdjzFekGoCvs_BWEHYCoYntGV73l.cDsmSjVC8dGN_diw4EZgyZYEJcj8RxcC htbMsi8BvnGxb3m4KdbBlRgFpGs_duhHb3XQ9lLYL7aDhHn9I8enRdgz5Dxgw4BG0xd7ZfEUE04S f1WqtANCcy47qJ_85ByW922OvIu_UX6TqhwJWNstCM.rgvscJqFZx4OZAtS5cOyPDMFpqPr2apWO nUI7VYSgot2_alMDBnvvKIpjQRtZs3.6bEZrGbJrrQRuXjRByAc5gfZY91hoEKAU_oBY9SNEqgnh Ur2NfhfcbvAzuUXVzyTlg.KrfmIb6C685ul6OkF23Q.aLJFYqSCY4kJGeKwQm_bjyaHVzXvWYNf. nF9LH.Z7NHy2Ho.C_5BvycvAnHEYS5UOtxm_YlnU8T8WKdxeQVER.QZ3EmoUQsBqs4JWOIqPGPkY 52QcN2eGFGQ05o8j9BoebPpXclNiQ6R__eFH2L5bOA X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Tue, 14 Feb 2023 09:23:02 +0000 Original-Received: by hermes--production-sg3-9fc5746c8-8hlql (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 3935ae879a92d1190a6f0dfc94ca2979; Tue, 14 Feb 2023 09:20:59 +0000 (UTC) In-Reply-To: <87zg9hqflv.fsf@telefonica.net> ("=?UTF-8?Q?=C3=93scar?= Fuentes"'s message of "Tue, 14 Feb 2023 01:02:04 +0100") X-Mailer: WebService/1.1.21183 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255560 Archived-At: =C3=93scar Fuentes 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) >=20=20 > Fselect_window (f->selected_window, Qt); > set_buffer_internal_1 (XBUFFER (XWINDOW (f->selected_window)->cont= ents)); > - fmt =3D FRAME_ICONIFIED_P (f) ? Vicon_title_format : Vframe_title_= format; > + fmt =3D FRAME_ICONIFIED_P (f) && !NILP (Vicon_title_format) ? > + Vicon_title_format : Vframe_title_format; >=20=20 > mode_line_target =3D MODE_LINE_TITLE; > title_start =3D 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 =3D (FRAME_ICONIFIED_P && !NILP (Vicon_title_format) ? Vicon_title_format : Vframe_title_format); instead. Thanks.