From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Modernize frame-title-format: "%b - GNU Emacs" Date: Mon, 31 Aug 2020 17:19:33 +0300 Message-ID: <83y2lux5hm.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10337"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 31 16:20:21 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kCkfU-0002Xu-Sx for ged-emacs-devel@m.gmane-mx.org; Mon, 31 Aug 2020 16:20:20 +0200 Original-Received: from localhost ([::1]:36378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCkfT-0001kQ-VF for ged-emacs-devel@m.gmane-mx.org; Mon, 31 Aug 2020 10:20:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCkey-0001Kj-Et for emacs-devel@gnu.org; Mon, 31 Aug 2020 10:19:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56869) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCkex-0007Or-Ne; Mon, 31 Aug 2020 10:19:47 -0400 Original-Received: from [176.228.60.248] (port=2925 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kCkew-0004Jf-T3; Mon, 31 Aug 2020 10:19:47 -0400 In-Reply-To: (message from Stefan Kangas on Sun, 30 Aug 2020 16:59:39 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:254442 Archived-At: > From: Stefan Kangas > Date: Sun, 30 Aug 2020 16:59:39 -0700 > > I therefore suggest: > > (setq frame-title-format > '(multiple-frames "%B" > ("" "%B - GNU Emacs at " system-name)) > > The main new feature is that we will show the current buffer or file > name in the frame title, even when there is only one frame. > > The new "%B" specifier, added by me here, is equivalent to: > > (if buffer-file-name > (abbreviate-file-name buffer-file-name) > buffer-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?