GNU bug report logs - #1503
feature request: multiline header (and mode) lines

Previous Next

Package: emacs;

Reported by: "Peter Mao" <peter.mao <at> gmail.com>

Date: Sat, 6 Dec 2008 06:50:03 UTC

Severity: wishlist

Full log


Message #10 received at 1503 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: 1503 <at> debbugs.gnu.org
Subject: Re: bug#1503: feature request: multiline header (and mode) lines
Date: Sat, 06 Dec 2008 11:49:10 +0100
> 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")




This bug report was last modified 3 years and 235 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.