unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Set-window-vscroll sometimes doesn't work
Date: Fri, 23 Oct 2020 16:30:40 -0400	[thread overview]
Message-ID: <9F2380D3-D1CC-410E-A91D-531AA0DFE1DB@gmail.com> (raw)
In-Reply-To: <83r1poizhx.fsf@gnu.org>



> On Oct 23, 2020, at 2:11 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Fri, 23 Oct 2020 12:48:54 -0400
>> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
>> 
>>> FTR, in my testing, I just visited an image file, enlarged it to be
>>> larger than the window, and then invoked C-n with a numeric argument.
>>> Your buffer has more stuff, which might make a difference.
>>> 
>> 
>> In image-mode, C-n is bound to image-next-line, not next-line.
> 
> OK, but how does this change anything in the context of the discussion
> we are having?
> 

I was just mentioning that current implementation of next-line and friends only handle a limited use case (ARG=1) and what they do doesn’t provide enough inspiration to solve my problem. They never set window-start and vscroll in the same time because they don’t need to.

Technically my problem isn’t a real problem, since it works, but of course I want to do the right thing. Again, judging by my reading of the code in xdisp.c, setting window-start and vscroll doesn’t seem to harm too much.

I really need to set them in the same time because when I scroll down, and stopped at a tall image (or tall line), I don’t want to scroll to the top of that image immediately. Instead, I want to scroll just enough to show the bottom of it. This requires setting window-start to that image and set vscroll = image height - line height.

So maybe setting both window-start and vscroll should be considered as a valid thing to do?

Yuan


  reply	other threads:[~2020-10-23 20:30 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 [this message]
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
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=9F2380D3-D1CC-410E-A91D-531AA0DFE1DB@gmail.com \
    --to=casouri@gmail.com \
    --cc=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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).