[Top][All Lists]

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

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

From: Drew Adams
Subject: RE: Modernize frame-title-format: "%b - GNU Emacs"
Date: Mon, 31 Aug 2020 07:53:37 -0700 (PDT)

> > (abbreviate-file-name buffer-file-name)
> The display engine calls the function which produces the frame's title
> very frequently.  You have just made redisplay much slower due to this
> call (abbreviate-file-name is a large and complex function, and you
> call Lisp on top of that), and caused most redisplay cycles prfoduce
> more garbage.  Is it really worth it?

Aside from whether it's worth the performance hit,
what is it worth, in general?

I wouldn't object to someone adding the possibility
of a `%B' behavior, even if I might never use it.

But why would we put that into the default?

I can guess why someone might want to use 
`abbreviate-file-name', to get a file name in the
mode-line or frame title - to get info about the
directory.  But I doubt I ever would.

If there's a need for someone to see the directory
then fine, s?he can add it to the frame title.

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?

reply via email to

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