From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Set-window-vscroll sometimes doesn't work Date: Sat, 24 Oct 2020 10:17:35 +0300 Message-ID: <838sbwhz3k.fsf@gnu.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12734"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 24 09:18:26 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 1kWDon-0003Em-Bs for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 24 Oct 2020 09:18:25 +0200 Original-Received: from localhost ([::1]:50076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWDom-00044Q-Bi for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 24 Oct 2020 03:18:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWDoC-00044A-Dc for help-gnu-emacs@gnu.org; Sat, 24 Oct 2020 03:17:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43463) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWDoC-00022y-48 for help-gnu-emacs@gnu.org; Sat, 24 Oct 2020 03:17:48 -0400 Original-Received: from [176.228.60.248] (port=2015 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kWDoB-0002iP-9R for help-gnu-emacs@gnu.org; Sat, 24 Oct 2020 03:17:48 -0400 In-Reply-To: <9F2380D3-D1CC-410E-A91D-531AA0DFE1DB@gmail.com> (message from Yuan Fu on Fri, 23 Oct 2020 16:30:40 -0400) 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:124680 Archived-At: > From: Yuan Fu > Date: Fri, 23 Oct 2020 16:30:40 -0400 > Cc: help-gnu-emacs@gnu.org > > 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. This makes no sense to me, because you want to deliberately deny the user from showing the entire screen line or its important parts. 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? > So maybe setting both window-start and vscroll should be considered as a valid thing to do? 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.