From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Parital scrolling of image Date: Sun, 23 Jan 2005 20:32:25 +0100 Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1106509857 1255 80.91.229.6 (23 Jan 2005 19:50:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 23 Jan 2005 19:50:57 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 23 20:50:50 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Csnl4-0002YJ-00 for ; Sun, 23 Jan 2005 20:50:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CsnxE-0006cU-Cf for ged-emacs-devel@m.gmane.org; Sun, 23 Jan 2005 15:03:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Csnvq-00060h-28 for emacs-devel@gnu.org; Sun, 23 Jan 2005 15:01:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Csnvg-0005vk-LL for emacs-devel@gnu.org; Sun, 23 Jan 2005 15:01:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Csnvf-0005o9-R2 for emacs-devel@gnu.org; Sun, 23 Jan 2005 15:01:48 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CsnTI-0006pf-5f for emacs-devel@gnu.org; Sun, 23 Jan 2005 14:32:28 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1CsnRb-00008b-KW; Sun, 23 Jan 2005 14:30:44 -0500 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Sun, 23 Jan 2005 01:55:46 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32515 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32515 storm@cua.dk (Kim F. Storm) writes: > David Kastrup writes: > >> storm@cua.dk (Kim F. Storm) writes: >> >>> storm@cua.dk (Kim F. Storm) writes: >>> >>>> A brief message to let you know that I've started to look into >>>> the problem of scrolling through images that are higher/wider >>>> than the current window. >>>> >>>> I've already have a working solution for tall images. >>> >>> I have installed my changes. They modify line-move and >>> scroll-up, scroll-down. >>> >>> If you have problems with this, set auto-window-vscroll to nil. >> >> Cough, cough. If I have a window with the upper half taken up by an >> image, and point is in some normal text below the image, then pressing >> C-n will _not_ move to the next line (which is perfectly on screen and >> quite far from the edge), > > I have checked in some patches to fix this. Please try again. This looks much better. But here are some remarks: a) an "open preview" that starts on a line of its own in preview-latex has an overlay starting at the beginning of the line. This overlay has a before-string consisting of an image (display-property on a single x character IIRC) followed by \n (so that the image will appear on a line of its own). Note that the image as well as the \n are not connected to a character in the buffer, but appear just as before-string. Nevertheless, previous-line in the first _real_ line of the overlay will be sufficiently confused as to not move at all. Never. This effect is probably not related to the very latest changes, though. I just noticed it when playing with the new code. It leads to pretty unintuitive results, though. b) Making a window as small as possible (2 lines or so) means that scroll-down and scroll-up, that are supposed to scroll by a "near full screen", namely `next-screen-context-lines' less than a full screen, scroll, if at all, in the opposite direction than expected. In case that the `next-screen-context-lines' less than a full screen delivers a negative or zero value, 1 should rather be substituted. This should be a general paradigm: all window-based movement/scrolling commands should make _some_ progress, and in the _expected_ direction. c) when pressing next-line, an image will get scrolled in smaller chunks (by the way, maybe one should be able to configure the size of those chunks). That is nice. previous-line shows no such behavior, however: it scrolls an image with one big jump. A bit of symmetry here would probably be nice to have. That being said, the behavior we now have for next-line is much much better than what was available at any previous time. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum