From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.help Subject: Re: Set-window-vscroll sometimes doesn't work Date: Tue, 27 Oct 2020 14:10:58 -0400 Message-ID: References: <72B62847-3F35-412A-9F74-88442A936B19@gmail.com> <83eelvsivm.fsf@gnu.org> <853C8CD1-B58B-4F22-A889-4AB2AEE3DD80@gmail.com> <83imb7qw46.fsf@gnu.org> <66013ADF-731C-4922-8AF7-EAFDBF43C33C@gmail.com> <83ft6bqv0q.fsf@gnu.org> <4F2C1811-940E-4C58-8EE0-37AA3B666E12@gmail.com> <835z77qr3f.fsf@gnu.org> <834kmrq7gy.fsf@gnu.org> <83blgyp4k2.fsf@gnu.org> <4F794407-585E-4C74-85F3-00A668FB9675@gmail.com> <834kmqp1ts.fsf@gnu.org> <835z74ope5.fsf@gnu.org> <1B858755-4CAE-4E06-B867-098B323EF79E@gmail.com> <83h7qnmtq4.fsf@gnu.org> <8C545387-7A95-4B4E-A71E-05949E8A4641@gmail.com> <183EE2A7-4FF5-4888-A6F5-BDE08BD5F482@gmail.com> <83imb2kzu0.fsf@gnu.org> <83eelqkx1k.fsf@gnu.org> <83a6wdlbns.fsf@gnu.org> <83r1poizhx.fsf@gnu.org> <9F2380D3-D1CC-410E-A91D-531AA0DFE1DB@gmail.com> <838sbwhz3k.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37709"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 27 19:29:37 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXTiz-0009iX-ID for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 27 Oct 2020 19:29:37 +0100 Original-Received: from localhost ([::1]:42000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXTiy-0004sj-HN for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 27 Oct 2020 14:29:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXTR3-0007EG-DE for help-gnu-emacs@gnu.org; Tue, 27 Oct 2020 14:11:05 -0400 Original-Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:33509) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXTR1-0001GE-EL; Tue, 27 Oct 2020 14:11:05 -0400 Original-Received: by mail-qk1-x72e.google.com with SMTP id t128so2110525qke.0; Tue, 27 Oct 2020 11:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=WouQiKyw6k6dQ4JcbvV5DO3eVfoh4cuHwE0BfjRty9E=; b=SN1wVuFlTAY95GRUUf72YKG2FuCYpGCymt6We6Xk5FvTZqpypHetjHWvLOrw4IZ/us Jyfdms4KpDI1S1pjYQEZQCvGrAWlp7A+WB382+6y7lLqoVJ2Rv4Cw8Ea8xdzCgxW5U4P 2GHm5s/AbhgJdVFXTkxbwqQaN59TGS26bLs0IhT09nJvdy+aw6Q/LYAsqpaFTNW0U1R8 6gia6VZgSsNL2nchDwfWWZPxZdlNVx4FjUiaoklQ5TXpAXs1T1r6vF1F0oAcddsA4zzh WoAYhLWBeh6uuEsKHM5uwv5TAku4iMGsujCQY8g7I6lozKFh7Iv5b1Y3rl2r/owggRj8 571w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=WouQiKyw6k6dQ4JcbvV5DO3eVfoh4cuHwE0BfjRty9E=; b=jaYxnuxHYpqK8cKyGkJEv6T7XtCBThUGZDBkPd8pYdf9rHiYVONFvEv6kC1NUdFiER QWq/G2/POYfP77CDH5b2RqhlDWHER/GQz6yKC+jSDOr7lD46I+vbenWt29xW9lXomh9B GQRi+GlesLFmuj93APKxUnBB0XeQ71Wlk0Dw2JwqMYjZOL2rxnaycUd371WuvDl5Zz+w gbFxd0rT3bfJu+XM6fQf8IC5k+GSLOkS3nD1Sqc1iVeCuVb3ZXSEG0Fe7uOId5VgDr4A o/RKDUg/lMzXwHmo8aQBVfLk3teeizNpOWxx+57pTxMF+wmA4SMPFX2C4qrQ7fxSwPKs bRWQ== X-Gm-Message-State: AOAM531wvpwkRj1GhZHKpF3oxOk+q+hVQUl1n/igeZXOA8b83R4SJxM6 DP+wnpZnepsFGHDbuxv9ZCsHkaFgNkUwM61u X-Google-Smtp-Source: ABdhPJztlWXMGZs7AnmQAfW4sb7nYw4oxTdwRZEPCDzO54q5cvaPpbWwLobMcz5hPo21Gcy7GOeQ4g== X-Received: by 2002:a37:b782:: with SMTP id h124mr3482069qkf.169.1603822261250; Tue, 27 Oct 2020 11:11:01 -0700 (PDT) Original-Received: from ?IPv6:2601:98a:4200:9210:edbe:7f67:c177:9f? ([2601:98a:4200:9210:edbe:7f67:c177:9f]) by smtp.gmail.com with ESMTPSA id y125sm1178735qkb.114.2020.10.27.11.11.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Oct 2020 11:11:00 -0700 (PDT) In-Reply-To: <838sbwhz3k.fsf@gnu.org> X-Mailer: Apple Mail (2.3608.120.23.2.4) Received-SPF: pass client-ip=2607:f8b0:4864:20::72e; envelope-from=casouri@gmail.com; helo=mail-qk1-x72e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124741 Archived-At: > On Oct 24, 2020, at 3:17 AM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Fri, 23 Oct 2020 16:30:40 -0400 >> Cc: help-gnu-emacs@gnu.org >>=20 >> 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=E2=80=99t 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 =3D image height - line = height. >=20 > This makes no sense to me, because you want to deliberately deny the > user from showing the entire screen line or its important parts. =20 Only when the line is a tall image, which will break smooth scrolling if = I try to show it completely. Instead, I want to reveal the image a bit = at a time, so there is no surprise when scrolling through them. If the = user wants to see the entire line they can press C-l. > The > bottom of a large image will generally not show anything important, > and most of the screen line with the surrounding text could remain > undisplayed. Why is that a good idea? just because some other editor > behaves like that? >=20 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. Maybe you (and many) scroll by half-screen, but I bet a large chunk of = people using Emacs scrolls by 1 line, and expects a smooth scrolling = behavior. >> So maybe setting both window-start and vscroll should be considered = as a valid thing to do? >=20 > You can still do that as I've shown before, by inserting (sit-for 0) > in the middle, right? But I urge you not to do that because it makes > no sense when text is mixed with images. >=20 Will that make sense if the image is on a line by itself (which is often = the case)? Inserting (sit-for 0) gives me flickers, Emacs will show the = full image for like 0.1 second and scroll to the desired vscroll. > This is a misunderstanding: I have nothing against making image > scrolling more smooth. The disagreement between us is not about the > user-facing feature, it is about low-level details of the > implementation, and how the display engine interprets certain flags. > (Actually, such a discussion should be held on emacs-devel or the > issue tracker, not here, precisely because it might confuse people who > dwell here.) How should I move the discussion to emacs-devel? Should I post a new = thread and explain the disagreement/confusion? 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=E2=80=99t? Yuan