From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Santiago =?UTF-8?Q?Pay=C3=A0?= i Miralta Newsgroups: gmane.emacs.bugs Subject: bug#67444: [PATCH] FAQ: Improve explanation of showing file name in titlebar Date: Sat, 25 Nov 2023 14:29:16 +0100 Message-ID: <20231125132916.170181-1-santiagopim@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4526"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Santiago =?UTF-8?Q?Pay=C3=A0?= i Miralta To: 67444@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 25 14:30:25 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1r6sjo-00012y-Dv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Nov 2023 14:30:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6sjP-0004TW-6D; Sat, 25 Nov 2023 08:29:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6sjO-0004T9-8A for bug-gnu-emacs@gnu.org; Sat, 25 Nov 2023 08:29:58 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r6sjN-0001jv-DR for bug-gnu-emacs@gnu.org; Sat, 25 Nov 2023 08:29:58 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r6sjS-0007pS-4d for bug-gnu-emacs@gnu.org; Sat, 25 Nov 2023 08:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Santiago =?UTF-8?Q?Pay=C3=A0?= i Miralta Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Nov 2023 13:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67444 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170091899330051 (code B ref -1); Sat, 25 Nov 2023 13:30:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Nov 2023 13:29:53 +0000 Original-Received: from localhost ([127.0.0.1]:38122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6sjH-0007oc-VR for submit@debbugs.gnu.org; Sat, 25 Nov 2023 08:29:53 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:56978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6sjE-0007oI-GQ for submit@debbugs.gnu.org; Sat, 25 Nov 2023 08:29:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6sj0-0004RN-Kr for bug-gnu-emacs@gnu.org; Sat, 25 Nov 2023 08:29:34 -0500 Original-Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r6siz-0001iK-6K for bug-gnu-emacs@gnu.org; Sat, 25 Nov 2023 08:29:34 -0500 Original-Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-332f90a375eso43635f8f.3 for ; Sat, 25 Nov 2023 05:29:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700918969; x=1701523769; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=SOIq6UHFmBOaw0bCfB2pnPH2BPrQiPXj4yuOKLBw03w=; b=i5b+iRf6Y3FLh2EShzyAeGDFNOp/V0Y73RRPI/IM4aDG1CuphqY0AQTyySqjryC/A5 ytf9Ymgtys0zeEVYSHn6Kq5PpXbULLRByf0hQVoDSsRG7TZBzuuXYGtv79QQwsiEpi99 yBdpYZ6QmRJIiEnPQhusjBoINUcYAFlbM//LhccDt8Pdl31bDKZHfYSdyE/WYj5PEhgE g8X+IBRgkGT9XRXMprFGXTqjrPPZqnUn+dDdPpFvnSbbvQg/x+2dLO3jY1VacSZqRx4F aORsYyASoRHVbi1YDK7GAeoY4OaCWg+jhYN+NKjivSuIsV4rJNJTpcyI6TbEXp0pG2ZY EVVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700918969; x=1701523769; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SOIq6UHFmBOaw0bCfB2pnPH2BPrQiPXj4yuOKLBw03w=; b=YFm+PG/9IHkntEs2Akd/fU9nZA4QyBetEWqARMxT+f3PIUaNwuG11MN4e8udmvzq0a fK9KPvG86HLepF2eNoyNUAc3oQ5xrk3LRnOQlCoprwe5qJsXyxic/AOT/imV3N3TjDx6 1CzhzmwRWAKUuGofYNmsEMZjHOGLZiU8xZpGU/2e1CwCG7I/sim2RO2RHabhMbKN7VDz jhG0E+GN30p1puZpwwFNKWmLWtsJegWoDEILtGM/GkUffdpVHaVT9oo2MUSt3njqu9fT cZAv6/w/mM/z+rA6Fw0wI87CeLFvNoGsQJtgC3lG5HRFA46SlrGTqszlN2BJSEfkfWxa OPgQ== X-Gm-Message-State: AOJu0YxK8MjbECQBBSf6awNBz+Zq1KEfwPEopJjxGfI1/Oy+6Y8SLep3 cjSngtgNAC876gbj3YsNDfqh89WXV4I= X-Google-Smtp-Source: AGHT+IGBKwA+XkXN3+hps3ukVeh8f+d548WBX4HpyRpxI7JHc6j5TcRHEZDyBVcLvuKMBGp+D9kY/A== X-Received: by 2002:a5d:58d5:0:b0:332:ca81:4f2a with SMTP id o21-20020a5d58d5000000b00332ca814f2amr4594044wrf.51.1700918968795; Sat, 25 Nov 2023 05:29:28 -0800 (PST) Original-Received: from minis.home ([90.167.66.131]) by smtp.gmail.com with ESMTPSA id o12-20020adfe80c000000b003316b8607cesm6680391wrm.1.2023.11.25.05.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 05:29:28 -0800 (PST) X-Mailer: git-send-email 2.39.2 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=santiagopim@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274976 Archived-At: * doc/misc/efaq.texi (Displaying the current file name in the titlebar): Add example code to show the real file name in the titlebar, not just the buffer name, with the additional dired buffer case, and the last default buffer name. --- doc/misc/efaq.texi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 70f434d4b99..92622bd0527 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -1960,6 +1960,17 @@ Displaying the current file name in the titlebar (setq frame-title-format "%b") @end lisp +To show the path to the file when the buffer is visiting some file, or +the directory path when in a dired buffer, or just the name of the +buffer: + +@lisp +(setq frame-title-format + '(buffer-file-name (:eval (abbreviate-file-name buffer-file-name)) + (dired-directory dired-directory + "%b"))) +@end lisp + @node Turning on abbrevs by default @section How do I turn on abbrevs by default just in mode @var{mymode}? @cindex Abbrevs, turning on by default -- 2.39.2