[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Several suggestions for image support

From: David Kastrup
Subject: Re: Several suggestions for image support
Date: 17 Apr 2004 20:03:13 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Richard Stallman <address@hidden> writes:

> Emacs should have a way to scroll through an image,
> so that C-v each time can advance one window-height
> through the image.
> It would be inelegant to handle this by treating the tall
> image as several lines--but perhaps that might actually
> work more easily than some other methods.

I don't think that splitting the image into lines by Emacs itself is
feasible: the cursor positions on the image would need to correspond
to actual cursor positions in the buffer, or things get inconsistent
(Emacs moves out of cursor positions in the image automatically).
While it would be a real boost of usability for my main application
(preview-latex) if I could walk the cursor across lines or other areas
of an image, the correlation between buffer positions and
corresponding location of the cursor display would need to get
explicitly established by the application: it would imply "stopping
points" when Emacs is trying to move the cursor out of visually
inaccessible areas.  And then Emacs would have to draw a cursor box or
other indicator according to the location in there.  Substructuring an
image like that would be a very nice feature.  But I don't see that
it is possible to make the decision of where to split an image

Of course, scrolling through large images should be possible, anyway,
and quite independent from that fanciful features.  Emacs already has
set-window-vscroll in its display engine in order to deal perfectly
well with that.

However, the only location where it is currently used is at the end of
the buffer.  Apart from C-v, scrollbars and mouse wheel currently
assume a constant line height, which leads to confusing results where
images or other tall lines are concerned.

Functions that work in terms of fractions of the window height should
try rounding the movement distance down to the next point-addressable
line and if that causes the distance to be quite less than asked for,
revert to using set-window-vscroll for moving to a partial line.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]