Subject: bug#1503: feature request: multiline header (and mode) lines

From: martin rudalics <[email-masked]>
Date: Thu, 21 Oct 2021 11:06:08 +0200

>>> Can emacs be given the gift of a header-line that word wraps, so that
 >>> the header can be more than one line tall?  I imagine the same could
 >>> go for the mode line, but I don't have a clear need for that right
 >>> now.  I know that the fringes can occupy > 1 column, so it seems like
 >>> an oversight if the header and mode lines are restricted to 1 line.
 >>>
 >>> I've written a minor mode for reading/sorting physics abstracts from
 >>> the physics arXiv.  The mode either lists subdirectories directly
 >>> under the current directory, or recursively lists all subdirectories
 >>> of the pwd.  Either way, the list could potentially be longer than the
 >>> width of the screen, making some directory names unviewable.  A
 >>> multiline header would make it perfect.
 >>>
 >>> I thought of putting that text in the buffer, but that makes it much
 >>> harder to update the text.
 >>
 >> At the moment, we can't do that because the fact that a header-line
 >> occupies exactly one line of text is hardwired into many lower-level
 >> primitives.
 >
 > Could those primitives be changed to support this use-case?
 >
 > I'm not very interested in a multi-line mode-line myself, but I can see
 > many uses for a multi-line header line.

IIUC the OP would be better served with a separate buffer for listing
these subdirectories shown above the window of his buffer.  To glue them
together, the two windows could be put into an atomic window.  Omitting
all decorations for that separate buffer, it would not be discernible
from a header line.

So if you see any use for a multi-line header line, please give me
details where a specification via 'header-line-format' would be
preferable to one that puts that stuff into a separate buffer.

martin