From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tak Kunihiro Newsgroups: gmane.emacs.bugs Subject: bug#45628: 28.0.50; Scrolling on echo area with pixel-scroll-mode enabled locks up Emacs Date: Mon, 4 Jan 2021 17:57:48 +0900 Message-ID: <245408FF-2A90-4AA2-9301-4E2C7C1C9980@misasa.okayama-u.ac.jp> References: <87zh1qc80k.fsf@gnu.org> <83ble6c4hy.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="11768"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?UTF-8?Q?=E5=9B=BD=E5=BA=83=E5=8D=93=E4=B9=9F?= To: 45628@debbugs.gnu.org, Eli Zaretskii , Amin Bandali Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 04 09:59:14 2021 Return-path: Envelope-to: geb-bug-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 1kwLhn-0002oW-Dn for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Jan 2021 09:59:11 +0100 Original-Received: from localhost ([::1]:37542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwLhm-0008Rc-GO for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Jan 2021 03:59:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwLhe-0008RW-7G for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2021 03:59:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40946) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kwLhe-00022v-0k for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2021 03:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kwLhd-0008F6-Uv for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2021 03:59:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tak Kunihiro Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Jan 2021 08:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45628 X-GNU-PR-Package: emacs Original-Received: via spool by 45628-submit@debbugs.gnu.org id=B45628.160975068531542 (code B ref 45628); Mon, 04 Jan 2021 08:59:01 +0000 Original-Received: (at 45628) by debbugs.gnu.org; 4 Jan 2021 08:58:05 +0000 Original-Received: from localhost ([127.0.0.1]:52462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwLgd-0008C8-PM for submit@debbugs.gnu.org; Mon, 04 Jan 2021 03:58:05 -0500 Original-Received: from mlsec.cc.okayama-u.ac.jp ([150.46.12.254]:60309) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwLga-0008Be-F4 for 45628@debbugs.gnu.org; Mon, 04 Jan 2021 03:57:58 -0500 Original-Received: from jlsv301.okayama-u.ac.jp (unknown [150.46.12.5]) by mlsec.cc.okayama-u.ac.jp with smtp id 7277_88a2_fe74eda0_ffef_449f_bfe0_9f2f953a02e1; Mon, 04 Jan 2021 17:57:48 +0900 Original-Received: from [192.168.1.53] (vesta.misasa.okayama-u.ac.jp [150.46.48.154]) by jlsv301.okayama-u.ac.jp (Postfix) with ESMTPSA id 9DE1776022D; Mon, 4 Jan 2021 17:57:48 +0900 (JST) In-Reply-To: <83ble6c4hy.fsf@gnu.org> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 11 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 5 Rules triggered GME_TWTRE=0.1, EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_PASS=0, RV6906=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6906> : inlines <7226> : streams <1878101> : uri <3183742> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197292 Archived-At: >> As the Subject says, scrolling using the mouse wheel on the echo area >> causes Emacs to freeze/lock up (cursor is changed to spinning = circle), >> when pixel-scroll-mode is enabled. >=20 > Tak, can you please look into this? The code infloops inside > pixel-scroll-down, here: >=20 > (while (pixel-point-at-bottom-p amt) ; prevent too late (multi = tries) > (vertical-motion -1)) ; move point upward >=20 > because the mini-window is normally just one screen line high, so its > top and bottom coincide. >=20 > Shouldn't we exit the loop when vertical-motion returns zero, which > means it didn't move? >=20 > A similar loop exists in pixel-scroll-up, AFAICS. Thank you to shoot the problem.=20 I confirmed the problem and Eli's suggestion solves it. I think that following patch would work but usage of `while=E2=80=99 does not look cool. If there can is better style, please suggest me. diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index cc0e159fae..c266c54a06 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -132,8 +132,8 @@ pixel-scroll-up (pixel-line-height)))) (if (pixel-eob-at-top-p) ; when end-of-the-buffer is close (scroll-up 1) ; relay on robust method - (while (pixel-point-at-top-p amt) ; prevent too late (multi = tries) - (vertical-motion 1)) ; move point downward + (while (and (pixel-point-at-top-p amt) ; prevent too late = (multi tries) + (equal (vertical-motion 1) 1))) ; move point = downward (pixel-scroll-pixel-up amt)))))) ; move scope downward =20 (defun pixel-scroll-down (&optional arg) @@ -149,8 +149,8 @@ pixel-scroll-down pixel-resolution-fine-flag (frame-char-height)) (pixel-line-height -1)))) - (while (pixel-point-at-bottom-p amt) ; prevent too late (multi = tries) - (vertical-motion -1)) ; move point upward + (while (and (pixel-point-at-bottom-p amt) ; prevent too late = (multi tries) + (equal (vertical-motion -1) -1))) ; move point = upward (if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer = is seen (pixel-eob-at-top-p)) ; for file with a long line (scroll-down 1) ; relay on robust method