GNU bug report logs - #19661
wrapping before window-width (new wrap-column text property?)

Previous Next

Package: emacs;

Reported by: Ivan Shmakov <ivan <at> siamics.net>

Date: Fri, 23 Jan 2015 13:18:01 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 19661 <at> debbugs.gnu.org
Subject: bug#19661: wrapping before window-width (new wrap-column text property?)
Date: Sun, 25 Jan 2015 11:38:42 +0100
>> Layouts should be handled at the Elisp level.
>
> This is impossible with the current Emacs design, and you know it.
> The design is that Lisp programs _specify_ the layout, by setting up
> text properties, overlays, and local variables.  The actual _handling_
> of the layout is done by the display engine, which is not exposed to
> Lisp.
>
> So if a particular kind of layout is not supported by the display
> engine, you cannot specify it in Lisp.

The windows code does provide the display engine with a clipping
rectangle and two buffer positions where to start displaying text in
that rectangle and where to display the cursor (the latter may be
overridden by the display engine).  Together, these determine the basic
layout of buffer portions on screen and can be used by Lisp programs.

> I agree, but I don't think this can or should be done in Lisp.  Over
> the years, I've seen many features that attempted to produce fancy
> display traits not supported by the engine, and they all look kludgey
> to me.  They also break very easily.

With multiple columns we have to provide an API.  For example, to decide
whether the first character of a buffer's line is also the the first
character of a line in the rectangle displaying that line.  Otherwise,
we cannot provide the navigation facilities Ivan asked for.  If each
column is displayed in a separate rectangle, the first character of a
line is always the first character of the rectangle displaying that line
and you can handle this distinction, and thus provide the API, on the
Lisp level.

> The wheel should be round, then it's a wheel.

And it should spin freely.

martin




This bug report was last modified 10 years and 142 days ago.

Previous Next


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