Subject: Re: bug#41147: A modern frame-title-format

From: Stefan Kangas <[email-masked]>
Date: Fri, 11 Sep 2020 13:33:14 -0700

Stefan Kangas <[email-masked]> writes:

> Now sent to emacs-devel:
> https://lists.gnu.org/archive/html/emacs-devel/2020-08/msg00886.html

After a long round of bike-shedding, the result of the discussion was
that 'invocation-name' is not important, whereas a subset of users
argued strongly in favor of 'system-name'.

While I think the latter is superfluous and better added in an Init file
or site file, I think adding the buffer name and replacing
'invocation-name' with "GNU Emacs" is already a step forward.

I therefore suggest to install the attached patch.
From 6743c8d4c113d6231bdfb9c558cf3b2e5180680e Mon Sep 17 00:00:00 2001
From: Stefan Kangas <[email-masked]>
Date: Fri, 11 Sep 2020 22:23:46 +0200
Subject: [PATCH] Improve frame-title-format and icon-title-format

* src/xdisp.c (syms_of_xdisp): Replace 'invocation-name' with the text
"%b - GNU Emacs" and replace "@" with " at ".  (Bug#41147)
* etc/NEWS: Announce the above change.
---
 etc/NEWS    | 10 ++++++++++
 src/xdisp.c |  3 +--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 69dc261a54..5444f9c080 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -121,6 +121,16 @@ the mouse cursor is on the scroll bars, fringes, margins, header line,
 and mode line.  ('mwheel-mode' is enabled by default on most graphical
 displays.)
 
+---
+** The default value of 'frame-title-format' and icon-title-format' has changed.
+This variable is used to display the title bar of visible frames.
+It now shows the name of the current buffer and the text "GNU Emacs"
+instead of the value of 'invocation-name'.  To get the old behavior
+back, add the following to your Init file:
+
+    (setq frame-title-format '(multiple-frames "%b"
+                              ("" invocation-name "@" system-name)))
+
 
 * Editing Changes in Emacs 28.1
 
diff --git a/src/xdisp.c b/src/xdisp.c
index 406b2d70d5..1d18135ee3 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -34830,8 +34830,7 @@ syms_of_xdisp (void)
      Oracle Developer Studio 12.6.  */
   Lisp_Object icon_title_name_format
     = pure_list (empty_unibyte_string,
-		 intern_c_string ("invocation-name"),
-		 build_pure_c_string ("@"),
+		 build_pure_c_string ("%b - GNU Emacs at "),
 		 intern_c_string ("system-name"));
   Vicon_title_format
     = Vframe_title_format
-- 
2.28.0