all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
Cc: emacs-devel@gnu.org
Subject: Re: scroll-down with pixel transition
Date: Tue, 11 Apr 2017 10:44:08 +0300	[thread overview]
Message-ID: <8360ibl77b.fsf@gnu.org> (raw)
In-Reply-To: <20170411.072417.159896512.tkk@misasa.okayama-u.ac.jp> (message from Tak Kunihiro on Tue, 11 Apr 2017 07:24:17 +0900 (JST))

> Date: Tue, 11 Apr 2017 07:24:17 +0900 (JST)
> Cc: emacs-devel@gnu.org, tkk@misasa.okayama-u.ac.jp
> From: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
> 
> >> It works.
> >> Is there a way to visually hide the overshoot on (scroll-down 1)?
> > 
> > I don't understand the question.  The display is only refreshed when
> > you call sit-for, so you have complete control of that already, and
> > AFAICS the code does what you told it to do.  Am I missing something?
> 
> In Emacs around me (25.1 on Mac, 25.1 on Windows), the following lines
> give me overshoot for each scroll-down.  Is not the case for you?
> 
> (dotimes (ii 10)
>   (scroll-down 1)
>   (set-window-vscroll nil (1- (frame-char-height)) t) (sit-for 0.05)
>   (dolist (vs (reverse (number-sequence 0 (- (frame-char-height) 2))))
>     (set-window-vscroll nil vs t) (sit-for 0.05)))

I'm still not sure what you mean by "overshoot", but if that's the
extra full-line scroll for each of the 10 iterations, then you see the
same in the snippet you shown that scrolls in the other direction, if
you look carefully.

The current display code doesn't like starting a window with a
partially visible line, so it zeroes out the vscroll if that produces
a fully-visible line at the window start.  E.g., try this:

  (progn
    (vertical-motion 1)
    (dolist (vs (number-sequence 1 (- (frame-char-height) 6)))
      (set-window-vscroll nil vs t) (sit-for 0.001)))

This ends up with the first window line partially visible, but as soon
as you move the cursor (triggering a redisplay cycle, just like
sit-for does), Emacs zeroes the window's vscroll to make that line
fully visible.  Changing that (probably as some special optional mode)
will require changes in the display engine on the C level and in
probably also in the line-moving commands in simple.el.  Patches
welcome.



  reply	other threads:[~2017-04-11  7:44 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-09 23:49 scroll-down with pixel transition Tak Kunihiro
2017-04-10  5:58 ` Eli Zaretskii
2017-04-10  7:06   ` Tak Kunihiro
2017-04-10  7:42     ` Eli Zaretskii
2017-04-10 22:24       ` Tak Kunihiro
2017-04-11  7:44         ` Eli Zaretskii [this message]
2017-04-12 12:13           ` Tak Kunihiro
2017-04-12 12:43             ` Eli Zaretskii
2017-04-13  7:02               ` Tak Kunihiro
2017-04-13  7:21                 ` Eli Zaretskii
2017-04-13  8:12                   ` Tak Kunihiro
2017-04-13  8:20                     ` Eli Zaretskii
2017-04-13  8:40                       ` Tak Kunihiro
2017-04-13  9:04                         ` Eli Zaretskii
2017-04-13  9:22                           ` Tak Kunihiro
2017-04-13 10:24                             ` Eli Zaretskii
2017-04-14  2:40                               ` Tak Kunihiro
2017-04-14  7:37                                 ` Eli Zaretskii
2017-04-14 22:32                                   ` Tak Kunihiro
2017-04-15 10:13                                     ` Eli Zaretskii
2017-04-16  8:35                                       ` Tak Kunihiro
2017-04-16 10:26                                         ` Eli Zaretskii
2017-04-16 12:17                                           ` Tak Kunihiro
2017-04-16 16:51                                             ` Eli Zaretskii
2017-04-16 18:00                                               ` Eli Zaretskii
2017-04-16 23:06                                                 ` Tak Kunihiro
2017-04-17  8:54                                                   ` Eli Zaretskii
2017-04-17 23:15                                                     ` Tak Kunihiro
2017-04-19 12:21                                                       ` Tak Kunihiro
2017-04-19 12:38                                                         ` Kaushal Modi
2017-04-19 12:42                                                           ` Kaushal Modi
2017-04-19 14:44                                                           ` Eli Zaretskii
2017-04-19 15:02                                                             ` Stefan Monnier
2017-04-19 15:07                                                             ` Kaushal Modi
2017-04-19 15:37                                                               ` Eli Zaretskii
2017-04-19 15:49                                                                 ` Kaushal Modi
2017-04-19 16:10                                                                   ` Eli Zaretskii
     [not found]                                                                   ` <<83zifcbcoc.fsf@gnu.org>
2017-04-19 17:33                                                                     ` Drew Adams
2017-04-19 18:21                                                                       ` Lars Brinkhoff
2017-04-21  2:05                                                                   ` Richard Stallman
2017-04-21  6:26                                                                     ` Eli Zaretskii
2017-04-21  8:52                                                                       ` Tak Kunihiro
2017-04-30 12:13                                                                         ` Tak Kunihiro
2017-05-13 17:27                                                                           ` Eli Zaretskii
2017-04-21 13:21                                                                       ` Perry E. Metzger
2017-04-21 13:36                                                                         ` Eli Zaretskii
2017-04-21 14:24                                                                           ` Option name conventions (was Re: scroll-down with pixel transition) Perry E. Metzger
2017-04-21 13:29                                                                       ` scroll-down with pixel transition Stefan Monnier
2017-04-21 15:47                                                                         ` Drew Adams
2017-04-22  2:31                                                                       ` Richard Stallman
2017-04-22  7:54                                                                         ` Eli Zaretskii
2017-04-23  0:03                                                                           ` Richard Stallman
2017-04-23 12:32                                                                             ` Stefan Monnier
2017-04-25 19:40                                                                               ` Richard Stallman
2017-04-25 20:06                                                                                 ` Dmitry Gutov
2017-04-25 20:38                                                                                   ` Stefan Monnier
2017-04-26 17:16                                                                                     ` Richard Stallman
2017-04-26 17:15                                                                                   ` Richard Stallman
2017-04-15 14:31                                     ` Clément Pit-Claudel
2017-04-15 14:57                                       ` Eli Zaretskii
2017-04-15 15:33                                         ` Clément Pit-Claudel
2017-04-13  8:35                   ` Yuri Khan
2017-04-13  8:57                     ` Eli Zaretskii

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=8360ibl77b.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=tkk@misasa.okayama-u.ac.jp \
    /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.