From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18923: Alternative scrolling model Date: Sun, 02 Nov 2014 21:29:32 +0200 Message-ID: <83wq7dwgdf.fsf@gnu.org> References: <87wq7e9zcn.fsf@gmail.com> <83a949y6r1.fsf@gnu.org> <87r3xla7zw.fsf@gmail.com> <8338a1y377.fsf@gnu.org> <87ppd5a46w.fsf@gmail.com> <831tplxy1x.fsf@gnu.org> <87mw89a07z.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1414956626 30051 80.91.229.3 (2 Nov 2014 19:30:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Nov 2014 19:30:26 +0000 (UTC) Cc: 18923@debbugs.gnu.org To: E Sabof Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 02 20:30:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xl0qw-0000Yd-IT for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Nov 2014 20:30:18 +0100 Original-Received: from localhost ([::1]:59013 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xl0qw-0005Jr-6p for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Nov 2014 14:30:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xl0qn-0005Iq-M3 for bug-gnu-emacs@gnu.org; Sun, 02 Nov 2014 14:30:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xl0qh-0002gk-Mz for bug-gnu-emacs@gnu.org; Sun, 02 Nov 2014 14:30:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xl0qh-0002f3-KO for bug-gnu-emacs@gnu.org; Sun, 02 Nov 2014 14:30:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xl0qh-0004NE-3q for bug-gnu-emacs@gnu.org; Sun, 02 Nov 2014 14:30:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Nov 2014 19:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18923 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18923-submit@debbugs.gnu.org id=B18923.141495659416765 (code B ref 18923); Sun, 02 Nov 2014 19:30:02 +0000 Original-Received: (at 18923) by debbugs.gnu.org; 2 Nov 2014 19:29:54 +0000 Original-Received: from localhost ([127.0.0.1]:46392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xl0qX-0004ML-Kp for submit@debbugs.gnu.org; Sun, 02 Nov 2014 14:29:53 -0500 Original-Received: from mtaout27.012.net.il ([80.179.55.183]:53059) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xl0qU-0004M4-Jw for 18923@debbugs.gnu.org; Sun, 02 Nov 2014 14:29:51 -0500 Original-Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NEF00100ET2ZU00@mtaout27.012.net.il> for 18923@debbugs.gnu.org; Sun, 02 Nov 2014 21:24:49 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NEF002CPF9DKJ10@mtaout27.012.net.il>; Sun, 02 Nov 2014 21:24:49 +0200 (IST) In-reply-to: <87mw89a07z.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95398 > From: E Sabof > Cc: 18923@debbugs.gnu.org > Date: Sun, 02 Nov 2014 19:09:20 +0000 > > > Eli Zaretskii writes: > > > Imagine there is a buffer with **AN IMAGE** which occupies 30% of the window (ex. a diagram in an org-mode buffer). It's positioned at (window-start). I (scroll-up 1). I'd end up scrolling a lot more than the usual (= (default-line-height) 20) pixels, which is what I mean by "jump". > > > If the problem is only with scrolling by single lines (or small > > number of lines), then a very similar problem is already solved in > > line-move-partial. Try C-n in the same situation, and see if that's > > what you want. We could then use the same technique. > > I'm not sure that we are talking about the same scenario. I didn't encounter any relevant behavior while using C-n/C-p, when a large image was displayed on the first line (with my default settings or Emacs -Q, both on the latest stable release). Tell me how to reproduce the exact problem you are talking about, and I will see if I understood the situation correctly. > > I meant call window-body-height with PIXELWISE non-nil. Then the > > return value doesn't depend on what is displayed, it just gives you > > the height of the text area in pixels. Subtracting from that the > > pixel coordinates of point returned by pos-visible-in-window-p or > > posn-at-point will give you how many pixels are there to the top and > > bottom of the window. This should eliminate the need to count pixels > > by moving one screen line at a time via vertical-motion, which is less > > efficient, I think. > > I'm not sure how knowing the distance of a point to the bottom of the window would benefit me, but indeed I could bulk-measure several lines in some cases. IMO the most important case is when you need to scroll almost the full window, in which case the pixel size of the window is the main piece of information.