unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: 1503@emacsbugs.donarmstrong.com
Subject: bug#1503: feature request: multiline header (and mode) lines
Date: Sat, 06 Dec 2008 11:49:10 +0100	[thread overview]
Message-ID: <493A58A6.6090508@gmx.at> (raw)
In-Reply-To: <6da7452a0812052243h34c713b9qf0ee659251d71764@mail.gmail.com>

 > 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.  In principle, what you want could be accomplished by the
routines below, but this will certainly have wrinkles (Emacs is not
really good at handling zero-length overlays).

martin


(defvar my-overlay (make-overlay (point-min) (point-min)))

(defun my-move (window start)
   (move-overlay my-overlay start start))

(add-hook 'window-scroll-functions 'my-move nil t)

(defun my-text (text)
   (overlay-put
    my-overlay 'before-string (propertize text 'face 'header-line)))

(my-text "a first line\nand another one\nand a third one\n")






  reply	other threads:[~2008-12-06 10:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-06  6:43 bug#1503: feature request: multiline header (and mode) lines Peter Mao
2008-12-06 10:49 ` martin rudalics [this message]
2021-10-20 15:53   ` Stefan Kangas
2021-10-20 16:46     ` Eli Zaretskii
2021-10-21  9:06     ` martin rudalics
2021-10-21 16:34       ` Stefan Kangas
2021-10-21 17:18         ` martin rudalics

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=493A58A6.6090508@gmx.at \
    --to=rudalics@gmx.at \
    --cc=1503@emacsbugs.donarmstrong.com \
    /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).