all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Set-window-vscroll sometimes doesn't work
Date: Tue, 27 Oct 2020 20:32:50 +0200	[thread overview]
Message-ID: <83ft5zecz1.fsf@gnu.org> (raw)
In-Reply-To: <E02DEA0D-9756-4DAB-A67A-E0FD4305CE32@gmail.com> (message from Yuan Fu on Tue, 27 Oct 2020 14:10:58 -0400)

> From: Yuan Fu <casouri@gmail.com>
> Date: Tue, 27 Oct 2020 14:10:58 -0400
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> 
> This is not about other editors, really. The main motivation is that with the current behavior, if I have images and text in the same buffer and I scroll down/up, the display jumps up and down and I get lost: I kind of lost track of where I am in the buffer. The desired behavior is, of course, a stable, smooth, unsurprised scrolling.

And you can have that, just don't use any functions that set the
window's start point.  E.g., scroll by setting vscroll, and when that
is about to scroll past the last portion of the image, move point to
the next/previous line and set vscroll to a suitable value.  More or
less like image-mode.el does.

Scroll commands via scroll-up/down are for different use cases, so
they don't do what you want.

> How should I move the discussion to emacs-devel? Should I post a new thread and explain the disagreement/confusion?

Start new thread, yes.  What to discuss there is up to you.  I still
have no clear idea what are you looking for.  AFAIU, the problem you
are trying to solve doesn't need any change in how window-start and
vscroll are handled, so I don't understand why you insist on changing
that.

> I think it does make sense for window-start and vscroll to work together, and the implementation of redisplay seems to suggest that. Could you explain how is inserting sit-for makes sense but setting both flags at the same time doesn’t?

You don't need sit-for if you just set vscroll, I think.  The need for
sit-for in your original code was because you set window-start,
something you shouldn't do to solve your problem.



  reply	other threads:[~2020-10-27 18:32 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-18  0:35 Set-window-vscroll sometimes doesn't work Yuan Fu
2020-10-18 14:34 ` Eli Zaretskii
2020-10-18 17:24   ` Yuan Fu
2020-10-18 17:31     ` Eli Zaretskii
2020-10-18 17:51       ` Yuan Fu
2020-10-18 17:55         ` Eli Zaretskii
2020-10-18 18:02           ` Yuan Fu
2020-10-18 19:12           ` Yuan Fu
2020-10-18 19:19             ` Eli Zaretskii
2020-10-18 20:06               ` Yuan Fu
2020-10-19  2:23                 ` Eli Zaretskii
     [not found]                   ` <B1D235FE-49B8-4F0A-9C02-78B7E3244C47@gmail.com>
2020-10-19  6:00                     ` Yuan Fu
2020-10-19 16:24                     ` Eli Zaretskii
2020-10-19 16:56                       ` Yuan Fu
2020-10-19 17:23                         ` Eli Zaretskii
2020-10-19 20:39                           ` Yuan Fu
2020-10-20 16:04                             ` Eli Zaretskii
2020-10-20 18:00                               ` Yuan Fu
2020-10-20 18:19                               ` Yuan Fu
2020-10-21 16:25                                 ` Eli Zaretskii
2020-10-21 19:05                                   ` Yuan Fu
2020-10-22  4:16                                     ` Yuan Fu
2020-10-22 16:08                                       ` Eli Zaretskii
2020-10-22 16:50                                         ` Yuan Fu
2020-10-22 17:09                                           ` Eli Zaretskii
2020-10-22 19:33                                             ` Yuan Fu
2020-10-23  6:05                                               ` Eli Zaretskii
2020-10-23 16:48                                                 ` Yuan Fu
2020-10-23 18:11                                                   ` Eli Zaretskii
2020-10-23 20:30                                                     ` Yuan Fu
2020-10-24  7:17                                                       ` Eli Zaretskii
2020-10-26  8:38                                                         ` Jens C. Jensen
2020-10-26 15:18                                                           ` Eli Zaretskii
2020-10-27 18:10                                                         ` Yuan Fu
2020-10-27 18:32                                                           ` Eli Zaretskii [this message]
2020-10-22 16:05                                     ` 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=83ft5zecz1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.