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: Fri, 23 Oct 2020 16:30:40 -0400 Message-ID: <9F2380D3-D1CC-410E-A91D-531AA0DFE1DB@gmail.com> 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> 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="23051"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 23 22:31: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 1kW3ir-0005sq-Hw for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 23 Oct 2020 22:31:37 +0200 Original-Received: from localhost ([::1]:45682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kW3iq-0007YW-EM for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 23 Oct 2020 16:31:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kW3i1-0007YM-Ic for help-gnu-emacs@gnu.org; Fri, 23 Oct 2020 16:30:45 -0400 Original-Received: from mail-qv1-xf2c.google.com ([2607:f8b0:4864:20::f2c]:34731) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kW3hz-0006Pw-Tz; Fri, 23 Oct 2020 16:30:45 -0400 Original-Received: by mail-qv1-xf2c.google.com with SMTP id g13so1419488qvu.1; Fri, 23 Oct 2020 13:30:42 -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=zXk3Z37lLx8Blrw2YUxE1NkFdZG1kukS4ndJ7n5u0e4=; b=UgN5GUPwiXlOmLYsdiSqZATIyU57V/8lKp7UoYg+YR6O3FEYzi1tDTeLeOuYeOR3Qt cqGMuyjnJluB6iAa8YjsNq/nHaAGYgbGnTn3ErtSpNBJkoAx8DSY0pW1GkgLH6yKxJ36 StIdckr/Etp3tkd9fydVzEOp5msZ4eYxlyHR7EDXJofLTb9U5WKeYlj/V4AxQUSDod8n MzGiLS0rFalR/AAihfota24yW2qSSSV6f4AvMVjOL4jnuQCXTMmw5Ygtflvj0ZfflKmJ 7D2+hGQsjELp6DIxGNEq3btM3rwDCBfA1XOdXhhKpQT5Dd/sGr2DUpZc4pUlhVN7xFA3 k0hA== 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=zXk3Z37lLx8Blrw2YUxE1NkFdZG1kukS4ndJ7n5u0e4=; b=stI9bkMGfnoLclgU6+31GwFCBEubvwMRKQBK+3RiGyQEW9J+dsDxD64H/TzDPB9EOE Q5n/HTv6HfpBHwT0ib79whbUofLk2kFYWnsF4c9h3xNFO4UF3ymsxP1bAeamArFhrGK7 sFGbJoJbCsfPOZaEn/2aOEfl7FmnuAMtH+cDk8HkZPJvcSW02pBiPyc2382JWG1FLKC0 xvsT5Lant3LC5wSL6Wnh6pS4IqvkoTdqNA5+Ep/Wj4sAr+aBwRkUTiBYTYoYrJJT2/DP KLcadh+6czlS38aAmI+SsqgRmj1HQiLnrgJnzIVpJOBP2rKJtPIU/fIw+IRlYHcPyxvP 3DDA== X-Gm-Message-State: AOAM531eY3YDLwAviJQ8IFMHRg6Wnq72HSzxyAQRI+i5vrZOutC76hMi iJcfTom93JU+bwgZBhEIzFJhlgBBHFQyhMIr X-Google-Smtp-Source: ABdhPJw6aQwPQXheEjHe3eiXTWQd8XJ2OWB5tGoQ5CXG79UnyQ1HD41ZRAlIBi1UDouNQBIuh/pYOw== X-Received: by 2002:a0c:ee8a:: with SMTP id u10mr684392qvr.31.1603485041897; Fri, 23 Oct 2020 13:30:41 -0700 (PDT) Original-Received: from [192.168.1.10] (c-174-60-229-153.hsd1.pa.comcast.net. [174.60.229.153]) by smtp.gmail.com with ESMTPSA id l125sm1581005qke.23.2020.10.23.13.30.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Oct 2020 13:30:41 -0700 (PDT) In-Reply-To: <83r1poizhx.fsf@gnu.org> X-Mailer: Apple Mail (2.3608.120.23.2.4) Received-SPF: pass client-ip=2607:f8b0:4864:20::f2c; envelope-from=casouri@gmail.com; helo=mail-qv1-xf2c.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:124665 Archived-At: > On Oct 23, 2020, at 2:11 PM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Fri, 23 Oct 2020 12:48:54 -0400 >> Cc: help-gnu-emacs >>=20 >>> 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. >>>=20 >>=20 >> In image-mode, C-n is bound to image-next-line, not next-line. >=20 > OK, but how does this change anything in the context of the discussion > we are having? >=20 I was just mentioning that current implementation of next-line and = friends only handle a limited use case (ARG=3D1) and what they do = doesn=E2=80=99t provide enough inspiration to solve my problem. They = never set window-start and vscroll in the same time because they don=E2=80= =99t need to. Technically my problem isn=E2=80=99t 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=E2=80=99t = 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=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. So maybe setting both window-start and vscroll should be considered as a = valid thing to do? Yuan=