all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: E Sabof <esabof@gmail.com>
Cc: 18923@debbugs.gnu.org
Subject: bug#18923: Alternative scrolling model
Date: Sun, 02 Nov 2014 21:29:32 +0200	[thread overview]
Message-ID: <83wq7dwgdf.fsf@gnu.org> (raw)
In-Reply-To: <87mw89a07z.fsf@gmail.com>

> From: E Sabof <esabof@gmail.com>
> Cc: 18923@debbugs.gnu.org
> Date: Sun, 02 Nov 2014 19:09:20 +0000
> 
> 
> Eli Zaretskii <eliz@gnu.org> 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.





  reply	other threads:[~2014-11-02 19:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-02  1:15 bug#18923: Alternative scrolling model E Sabof
     [not found] ` <jwv61ey5qfb.fsf-monnier+emacsbugs@gnu.org>
     [not found]   ` <87vbmy9wdx.fsf@gmail.com>
2014-11-02  2:31     ` E Sabof
2014-11-02 15:16       ` Eli Zaretskii
2014-11-02 18:25         ` E Sabof
2014-11-02 18:36           ` Eli Zaretskii
     [not found]     ` <jwvioiy416g.fsf-monnier+emacsbugs@gnu.org>
     [not found]       ` <87sii1ahy9.fsf@gmail.com>
     [not found]         ` <jwvppd538tu.fsf-monnier+emacsbugs@gnu.org>
2014-11-02 23:10           ` E Sabof
2014-11-03  2:35             ` Stefan Monnier
2014-11-03 16:03               ` Eli Zaretskii
2014-11-03 19:02                 ` E Sabof
2014-11-02 15:14 ` Eli Zaretskii
2014-11-02 15:56   ` Stefan Monnier
2014-11-02 16:06     ` Eli Zaretskii
2014-11-02 16:21   ` E Sabof
2014-11-02 16:31     ` Eli Zaretskii
2014-11-02 17:43       ` E Sabof
2014-11-02 18:22         ` Eli Zaretskii
2014-11-02 19:09           ` E Sabof
2014-11-02 19:29             ` Eli Zaretskii [this message]
2014-11-03  3:45               ` Eli Zaretskii
2019-11-04  9:14 ` Stefan Kangas
2022-04-22 12:16 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83wq7dwgdf.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=18923@debbugs.gnu.org \
    --cc=esabof@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.