From: "Santiago Payà i Miralta" <santiagopim@gmail.com>
To: 67444@debbugs.gnu.org
Cc: "Santiago Payà i Miralta" <santiagopim@gmail.com>
Subject: bug#67444: [PATCH] FAQ: Improve explanation of showing file name in titlebar
Date: Sat, 25 Nov 2023 14:29:16 +0100 [thread overview]
Message-ID: <20231125132916.170181-1-santiagopim@gmail.com> (raw)
* 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
next reply other threads:[~2023-11-25 13:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-25 13:29 Santiago Payà i Miralta [this message]
2023-11-26 10:35 ` bug#67444: [PATCH] FAQ: Improve explanation of showing file name in titlebar Eli Zaretskii
2023-12-25 14:36 ` Stefan Kangas
2023-12-25 15:11 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231125132916.170181-1-santiagopim@gmail.com \
--to=santiagopim@gmail.com \
--cc=67444@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).