From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Pixel scrolling support Date: Fri, 26 Nov 2021 17:29:25 +0800 Message-ID: <87k0gvfeoa.fsf@yahoo.com> References: <87a6hrzrcv.fsf.ref@yahoo.com> <87a6hrzrcv.fsf@yahoo.com> <87v90fhayx.fsf@yahoo.com> <835ysf4dyr.fsf@gnu.org> <871r33h0th.fsf@yahoo.com> <8335nj4d53.fsf@gnu.org> <87sfvjfli2.fsf@yahoo.com> <83y25b2u2x.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22751"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 26 10:31:07 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mqXZT-0005fr-6x for ged-emacs-devel@m.gmane-mx.org; Fri, 26 Nov 2021 10:31:07 +0100 Original-Received: from localhost ([::1]:37540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqXZR-0005F5-Nz for ged-emacs-devel@m.gmane-mx.org; Fri, 26 Nov 2021 04:31:05 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqXY4-0004Nk-LR for emacs-devel@gnu.org; Fri, 26 Nov 2021 04:29:40 -0500 Original-Received: from sonic309-20.consmr.mail.ne1.yahoo.com ([66.163.184.146]:46649) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mqXY2-00058B-LB for emacs-devel@gnu.org; Fri, 26 Nov 2021 04:29:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1637918976; bh=UmXOQB35xHQHla7mvfoIcUounqFGRHN9opysSmKh2w4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=Hiwi1CZKonx+bTbaf1VbNLNRS+ZykIUPXxzP0EH8Z/kvuSPhNHwcQ9TXWC5wazBsrfd0QNZnQQZZDrPPpiM/WuZqChKVYuCvEWJMcTVgoraF94aryrAx00Z79TQPMCho/8Yel0Tzy3E1JNIE8kl0feVg0lcBt+WQvjGDaG5swP3PU6+0T+zrLZC91H5NcL8yKimpuj/TGdwJvKjSPk35cW/8Qmk89RSap/DGGV+mClIA0MUhbJwzESBIibllkNEw0zPEkrWnDkQE8ZKOnXDw/7XjS9gOSVIUlm0GRoS0qop2je/V0SV8QPlx0jzP0l++GXLDk3GKDvF4RR9bz6ODUQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1637918976; bh=bm/EPwY33pm8z6xG+1LXw2gnXdjhnaRUumk6t+md/6f=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=E5tAt29Tr2b2QrUG24O8r9Ot7KSHA2BG+1VN4R8xmrfGfPTPceFA6TOYroIS3pcdOy5M8PEHGel2mbI8jOHVZRjveEEiDgi1oL1BzS2xpC9Cnl88mor5JB6h7qnHGm6V9Km0mQq8cHDr5y3UFtroZmeU4KNSGgU59mocBtuyzaJTyBo1oFyrqDvhLBsulV+S8xMr0tj7J7fjwL2OVUlrCYb1moS5K0ZfVwicYtPPvDQETt34o+sdY42mW6sn8B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0000 Original-Received: by kubenode519.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID a123d27c9670656b7a57636823d1b272; Fri, 26 Nov 2021 09:29:30 +0000 (UTC) In-Reply-To: <83y25b2u2x.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 26 Nov 2021 10:35:02 +0200") X-Mailer: WebService/1.1.19306 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.184.146; envelope-from=luangruo@yahoo.com; helo=sonic309-20.consmr.mail.ne1.yahoo.com 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:280214 Archived-At: Eli Zaretskii writes: > pixel-scroll-precision-mode sounds better to me. Hmm, I don't think that's quite right, but I can't explain how it's not. I think it would be best to keep it as `pixel-scroll-precise-mode'. >> -** New minor mode 'better-pixel-scroll-mode'. >> +** New minor mode 'pixel-scroll-precise-mode'. >> When enabled, using this mode with a capable scroll wheel will result >> in the display being scrolled precisely according to the turning of >> that wheel. > This text doesn't really describe what the mode does. It basically > says something like "pixel-scroll-precise-mode scrolls precisely". > the main part that was left unexplained is "according to the turning of > that wheel", and specifically the "according" part. How about this: "When enabled, you can scroll the display up or down by individual pixels in a way that corresponds with the movement of your mouse wheel, if supported by the mouse wheel."? > What is the problem with scrolling by more than the window's height? Basically, we use `posn-at-x-y' to find the window start and the vscroll that's wanted, which doesn't work when y is outside the window. > I think you should detect the EOB condition early on and simply not > scroll at all in that case. I couldn't find a way to know if scrolling will result in EOB before it actually happens. >> +(defun pixel-scroll-precise (event &optional arg) >> + "Scroll the display according to EVENT. > This sentence should include something to indicate the "precise" > feature. Otherwise it is too general, indistinguishable from any > other scroll command. Hmm, how about "Scroll the display by pixels according to EVENT"? >> +Take into account any pixel deltas in EVENT to scroll the display >> +according to the user's turning the mouse wheel. If EVENT does >> +not have precise scrolling deltas, call `mwheel-scroll' instead. > This describes what the code does, not what the user should expect in > terms of the effect on the screen. "Scroll the display vertically by pixels according to EVENT. Move the display up or down by the pixel deltas in EVENT to scroll the display according to the user's turning the mouse wheel." How's this instead? >> +ARG is passed to `mwheel-scroll', should that be called." > Likewise: the description of ARG should be similar to how we describe > the effect of prefix arg in other similar commands. Actually, this command doesn't handle hscroll, so ARG seems to be pointless. Removed, thanks. > Shouldn't this say something about "setting the variable doesn't have > any effect"? Yes, my bad. > And what about horizontal scrolling? It doesn't handle horizontal scrolling, so I changed the doc strings to specify that the display is scrolled vertically by these commands. Thanks.