unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#41147: A modern frame-title-format
@ 2020-05-09  9:48 Lars Ljung
  2020-05-09  9:57 ` Eli Zaretskii
  2020-05-10 16:31 ` Lars Ljung
  0 siblings, 2 replies; 11+ messages in thread
From: Lars Ljung @ 2020-05-09  9:48 UTC (permalink / raw)
  To: 41147

I suggest that frame-title-format is changed to something like this:

(multiple-frames "GNU Emacs - %b"
                  ("GNU Emacs"))

This would give Emacs a slightly more modern look.

The current use of invocation-name might be useful for Emacs developers 
running multiple versions, but it serves no purpose for normal users.

The current use of system-name has no real value when running Emacs 
locally, but perhaps it could be added to remote frames only.

Kind regards,
Lars Ljung





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41147: A modern frame-title-format
  2020-05-09  9:48 bug#41147: A modern frame-title-format Lars Ljung
@ 2020-05-09  9:57 ` Eli Zaretskii
  2020-05-09 10:11   ` Lars Ljung
  2020-05-10 16:31 ` Lars Ljung
  1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2020-05-09  9:57 UTC (permalink / raw)
  To: Lars Ljung; +Cc: 41147

> From: Lars Ljung <lars@matholka.se>
> Date: Sat, 9 May 2020 11:48:31 +0200
> 
> The current use of system-name has no real value when running Emacs 
> locally, but perhaps it could be added to remote frames only.

Frames are never remote, only buffers are.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41147: A modern frame-title-format
  2020-05-09  9:57 ` Eli Zaretskii
@ 2020-05-09 10:11   ` Lars Ljung
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Ljung @ 2020-05-09 10:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 41147

Den 2020-05-09 kl. 11:57, skrev Eli Zaretskii:
>> From: Lars Ljung <lars@matholka.se>
>> Date: Sat, 9 May 2020 11:48:31 +0200
>>
>> The current use of system-name has no real value when running Emacs
>> locally, but perhaps it could be added to remote frames only.
> 
> Frames are never remote, only buffers are.
> 

I was thinking of the use case when DISPLAY is set to show frames on a 
different machine, e.g. when running over SSH with X forwarding. Then it 
could be useful to show system-name.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41147: A modern frame-title-format
  2020-05-09  9:48 bug#41147: A modern frame-title-format Lars Ljung
  2020-05-09  9:57 ` Eli Zaretskii
@ 2020-05-10 16:31 ` Lars Ljung
  2020-08-24  0:57   ` Stefan Kangas
  1 sibling, 1 reply; 11+ messages in thread
From: Lars Ljung @ 2020-05-10 16:31 UTC (permalink / raw)
  To: 41147

I did some research and as I understand it the GNOME guidelines 
recommends just "%b", even when there is only one frame.

Many programs use the style "%b - GNU Emacs". E.g. gvim, Gimp, Firefox, 
and LibreOffice.

Either way it seems popular to place the document name first, which 
makes sense.

GNOME 2: 
https://developer.gnome.org/hig-book/3.12/hig-book.html#primary-window-titles
GNOME 3: https://wiki.gnome.org/Design/HIG/ApplicationName





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41147: A modern frame-title-format
  2020-05-10 16:31 ` Lars Ljung
@ 2020-08-24  0:57   ` Stefan Kangas
  2020-08-24  5:05     ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Kangas @ 2020-08-24  0:57 UTC (permalink / raw)
  To: Lars Ljung; +Cc: 41147

[-- Attachment #1: Type: text/plain, Size: 539 bytes --]

tags 41147 + patch
thanks

Lars Ljung <lars@matholka.se> writes:

> I did some research and as I understand it the GNOME guidelines recommends just
> "%b", even when there is only one frame.
>
> Many programs use the style "%b - GNU Emacs". E.g. gvim, Gimp, Firefox, and
> LibreOffice.

I think it makes sense to just do what other modern software does here.
If people want to do something more fancy, they can easily modify it
themselves.

How about the attached patch?  (NEWS and docs still needs updating.)

Best regards,
Stefan Kangas

[-- Attachment #2: 0001-Simplify-frame-title-format-to-be-more-modern.patch --]
[-- Type: text/x-diff, Size: 1465 bytes --]

From 1f34eceac64b19f6bdbbd103dd36c1114c996c15 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Mon, 24 Aug 2020 02:46:15 +0200
Subject: [PATCH] Simplify frame-title-format to be more modern

* src/xdisp.c (syms_of_xdisp): Change 'Vframe_title_format' and
'Vicon_title_format' to "%b - GNU Emacs".  This is more in line with
what other modern software does.  (Bug#41147)
---
 src/xdisp.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index ed1d248990..78fe9101d2 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -34826,18 +34826,9 @@ syms_of_xdisp (void)
 This variable has the same structure as `mode-line-format' (which see),
 and is used only on frames for which no explicit name has been set
 \(see `modify-frame-parameters').  */);
-  /* Do not nest calls to pure_list.  This works around a bug in
-     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 ("@"),
-		 intern_c_string ("system-name"));
   Vicon_title_format
     = Vframe_title_format
-    = pure_list (intern_c_string ("multiple-frames"),
-		 build_pure_c_string ("%b"),
-		 icon_title_name_format);
+    = build_pure_c_string ("%b - GNU Emacs");
 
   DEFVAR_LISP ("message-log-max", Vmessage_log_max,
     doc: /* Maximum number of lines to keep in the message log buffer.
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#41147: A modern frame-title-format
  2020-08-24  0:57   ` Stefan Kangas
@ 2020-08-24  5:05     ` Eli Zaretskii
  2020-08-24 11:33       ` Stefan Kangas
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2020-08-24  5:05 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 41147, lars

> From: Stefan Kangas <stefan@marxist.se>
> Date: Sun, 23 Aug 2020 20:57:51 -0400
> Cc: 41147@debbugs.gnu.org
> 
> I think it makes sense to just do what other modern software does here.
> If people want to do something more fancy, they can easily modify it
> themselves.

There's no way to customize what "emacs -Q" produces, though, and the
patch changes that as well.

> How about the attached patch?  (NEWS and docs still needs updating.)

I think we need a broader user poll before we make such a change.  An
opinion of a couple of people is not enough.

Thanks.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41147: A modern frame-title-format
  2020-08-24  5:05     ` Eli Zaretskii
@ 2020-08-24 11:33       ` Stefan Kangas
  2020-08-27  9:37         ` Stefan Kangas
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Kangas @ 2020-08-24 11:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 41147, lars

Eli Zaretskii <eliz@gnu.org> writes:

>> I think it makes sense to just do what other modern software does here.
>> If people want to do something more fancy, they can easily modify it
>> themselves.
>
> There's no way to customize what "emacs -Q" produces, though, and the
> patch changes that as well.
>
>> How about the attached patch?  (NEWS and docs still needs updating.)
>
> I think we need a broader user poll before we make such a change.  An
> opinion of a couple of people is not enough.

OK, I'll send this question to emacs-devel when I find some time.

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41147: A modern frame-title-format
  2020-08-24 11:33       ` Stefan Kangas
@ 2020-08-27  9:37         ` Stefan Kangas
  2020-09-11 20:33           ` Stefan Kangas
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Kangas @ 2020-08-27  9:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 41147, lars

Stefan Kangas <stefan@marxist.se> writes:

> OK, I'll send this question to emacs-devel when I find some time.

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





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41147: A modern frame-title-format
  2020-08-27  9:37         ` Stefan Kangas
@ 2020-09-11 20:33           ` Stefan Kangas
  2020-09-12  6:07             ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Kangas @ 2020-09-11 20:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 41147, lars

[-- Attachment #1: Type: text/plain, Size: 569 bytes --]

Stefan Kangas <stefan@marxist.se> 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.

[-- Attachment #2: 0001-Improve-frame-title-format-and-icon-title-format.patch --]
[-- Type: text/x-diff, Size: 1764 bytes --]

From 6743c8d4c113d6231bdfb9c558cf3b2e5180680e Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefan@marxist.se>
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)))
+
 \f
 * 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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#41147: A modern frame-title-format
  2020-09-11 20:33           ` Stefan Kangas
@ 2020-09-12  6:07             ` Eli Zaretskii
  2020-09-13 16:37               ` Stefan Kangas
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2020-09-12  6:07 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 41147, lars

> From: Stefan Kangas <stefan@marxist.se>
> Date: Fri, 11 Sep 2020 13:33:14 -0700
> Cc: lars@matholka.se, 41147@debbugs.gnu.org
> 
> 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.

Thanks, please go ahead.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41147: A modern frame-title-format
  2020-09-12  6:07             ` Eli Zaretskii
@ 2020-09-13 16:37               ` Stefan Kangas
  0 siblings, 0 replies; 11+ messages in thread
From: Stefan Kangas @ 2020-09-13 16:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 41147, lars

close 41147 28.1
thanks

Eli Zaretskii <eliz@gnu.org> writes:

>> I therefore suggest to install the attached patch.
>
> Thanks, please go ahead.

Thanks.  Now pushed to master as commit 817dd54649.





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-09-13 16:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-09  9:48 bug#41147: A modern frame-title-format Lars Ljung
2020-05-09  9:57 ` Eli Zaretskii
2020-05-09 10:11   ` Lars Ljung
2020-05-10 16:31 ` Lars Ljung
2020-08-24  0:57   ` Stefan Kangas
2020-08-24  5:05     ` Eli Zaretskii
2020-08-24 11:33       ` Stefan Kangas
2020-08-27  9:37         ` Stefan Kangas
2020-09-11 20:33           ` Stefan Kangas
2020-09-12  6:07             ` Eli Zaretskii
2020-09-13 16:37               ` Stefan Kangas

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