0

I want the full path to be displayed in the header-line, but if the window is too narrow, it won't span multiple lines.

ok, but since Dired is able to span multiple lines, why can't header-line do it, as well?

5
  • The header-line works like the mode-line, which is also limited to one screen line and doesn't wrap if the text exceeds the width of the window. In Dired, the first line of a buffer shows the full path and will wrap (as long as truncate-lines is nil), but that's not using the header-line. It's just the first line in the Dired buffer. Commented Jun 14 at 21:13
  • Ok, can I have something like that for my buffer, so that I can display the whole path? Does Dired use any general function in Emacs? Commented Jun 14 at 21:16
  • Dired simply inserts that text as the first line of the buffer. You could do the same thing, but that would change the contents of your buffer. And unlike the header-line, it will disappear when you scroll downward. Commented Jun 14 at 21:24
  • So, there's no way I can have something at the top of every buffer that simply displays the full path, spanning several lines? Commented Jun 15 at 0:06
  • It's Emacs. Of course there's a way. The way might be that you would develop it yourself, but it can be done. Commented Jun 15 at 1:35

1 Answer 1

0

A simple compromise could be breadcrumb-mode; when the buffer is too narrow it abbreviates the file name, for example:

my-project/src/domain/value-object/my-cool-object becomes my-project/s/d/v/my-cool-object

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.