emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Modernize frame-title-format: "%b - GNU Emacs"


From: Gregory Heytings
Subject: RE: Modernize frame-title-format: "%b - GNU Emacs"
Date: Mon, 31 Aug 2020 20:00:36 +0000
User-agent: Alpine 2.22 (NEB 394 2020-01-19)



But the NONdirectory part of `buffer-file-name' is the most specific part. And that part is used for the buffer name, which we have with `%b'. The nondir part should come before (to the left of) the dir part, at least for the default.

If there's ever a need to see some directory info, then it would be better to use a uniquified buffer name than `abbreviate-file-name'. That is, use a `uniquify-buffer-name-style' other than `forward'. And `buffer-name' already gives us this behavior.

To be clear, what's the motivation for adding a `%B' behavior? (But a priori I have no objection.)

More importantly, what's the motivation for using it for the default behavior?


FWIW, I do not agree that the non-directory part of a file name is the most specific part. This is only partly true. Where a file is located is most often as important as (and sometimes more important than) the file name to identify a file, at least of you are a programmer.

In Visual Studio and XCode, the path of the file is displayed just above the "buffer". In Eclipse, it is displayed in the title bar. And that information is displayed in its "natural" order, with the current filename on the right.

(Likewise, it is almost standard to display the current working directory in full in shell prompts.)

It seems to me that using `(abbreviate-file-name buffer-file-name)' or `buffer-file-truename' in Emacs's title bar makes perfect sense.

(An additional option that would also make sense (I think) is to have an option so that `abbreviate-file-name' keeps only the initial N letters of the directories, for example: "/u/i/stdio.h" or "~/gn/em/sr/dired.c", which is shorter, and often clear enough.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]