GNU bug report logs - #70856
30.0.50; Hang when scrolling the echo-line with pixel-scroll-precision-mode

Previous Next

Package: emacs;

Reported by: Steven Allen <steven <at> stebalien.com>

Date: Thu, 9 May 2024 22:57:02 UTC

Severity: normal

Found in version 30.0.50

Done: Po Lu <luangruo <at> yahoo.com>

To reply to this bug, email your comments to 70856 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#70856; Package emacs. (Thu, 09 May 2024 22:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steven Allen <steven <at> stebalien.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 09 May 2024 22:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Steven Allen <steven <at> stebalien.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; Hang when scrolling the echo-line with
 pixel-scroll-precision-mode
Date: Thu, 09 May 2024 15:56:31 -0700
Scrolling (mouse-wheel) in the echo line when
`pixel-scroll-precision-mode` is enabled hangs until `C-g` is pressed.
To reproduce:

1. Run `emacs -Q`.
2. Enter `M-x pixel-scroll-precision-mode RET`
3. Move the mouse cursor to the echo area (minibuffer should be hidden).
4. Scroll with the mouse wheel. I'm using a trackpad with libinput
   (xinput2) but I don't think that'll make a difference?

This appears to be happening because the window is one-line high so
there's obviously nothing to scroll.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, cairo version
 1.18.0) of 2024-05-07 built on Laptop
Repository revision: d0b36be59ab9840eebbda45609bc8c075ece40c0
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101013
System Description: Arch Linux

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
 --with-modules --without-m17n-flt --without-selinux --without-pop
 --without-gconf --enable-link-time-optimization
 --with-native-compilation=yes --with-xinput2 --with-x-toolkit=no
 --without-toolkit-scroll-bars --without-xft --without-xaw3d
 --with-cairo-xcb --with-sound=no --with-tree-sitter --without-gpm
 --without-compress-install
 '--program-transform-name=s/\([ec]tags\)/\1.emacs/'
 'CFLAGS=-march=native -mtune=native -O2 -pipe -fno-plt -fexceptions
 -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security
 -fstack-clash-protection -fcf-protection -flto=auto' 'LDFLAGS=-Wl,-O1
 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now
 -Wl,-z,pack-relative-relocs -Wl,-z,noexecstack -flto=auto''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
OLDXMENU PDUMPER PNG RSVG SECCOMP SQLITE3 THREADS TIFF TREE_SITTER WEBP
X11 XDBE XIM XINPUT2 XPM ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  pixel-scroll-precision-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
cus-start cus-load pixel-scroll cua-base ring subr-x rmc iso-transl
tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list
replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse
jit-lock font-lock syntax font-core term/tty-colors frame minibuffer
nadvice seq simple cl-generic indonesian philippine cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo xinput2 x multi-tty move-toolbar
make-network-process native-compile emacs)

Memory information:
((conses 16 58507 10490) (symbols 48 6439 0) (strings 32 14905 2238)
 (string-bytes 1 417728) (vectors 16 9144)
 (vector-slots 8 119890 8551) (floats 8 73 13) (intervals 56 311 0)
 (buffers 992 10))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70856; Package emacs. (Thu, 09 May 2024 23:54:01 GMT) Full text and rfc822 format available.

Message #8 received at 70856 <at> debbugs.gnu.org (full text, mbox):

From: Charalampos Mitrodimas <charmitro <at> posteo.net>
To: Steven Allen via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>
Cc: 70856 <at> debbugs.gnu.org, Steven Allen <steven <at> stebalien.com>
Subject: Re: bug#70856: 30.0.50; Hang when scrolling the echo-line with
 pixel-scroll-precision-mode
Date: Thu, 09 May 2024 23:53:18 +0000
Steven Allen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> writes:

> Scrolling (mouse-wheel) in the echo line when
> `pixel-scroll-precision-mode` is enabled hangs until `C-g` is pressed.
> To reproduce:
>
> 1. Run `emacs -Q`.
> 2. Enter `M-x pixel-scroll-precision-mode RET`
> 3. Move the mouse cursor to the echo area (minibuffer should be hidden).
> 4. Scroll with the mouse wheel. I'm using a trackpad with libinput
>    (xinput2) but I don't think that'll make a difference?

Hi Steven,

I was also able to reproduce it.

>
> This appears to be happening because the window is one-line high so
> there's obviously nothing to scroll.

I'm wondering if we should just check for one-line heights in the
pixel-scroll-precision function, like this:
    (when (> (window-total-height window) 1)

Thoughts?

--
C. Mitrodimas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70856; Package emacs. (Thu, 09 May 2024 23:56:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70856; Package emacs. (Fri, 10 May 2024 01:29:02 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Steven Allen <steven <at> stebalien.com>
To: Charalampos Mitrodimas <charmitro <at> posteo.net>, "Steven Allen via Bug
 reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>
Cc: 70856 <at> debbugs.gnu.org
Subject: Re: bug#70856: 30.0.50; Hang when scrolling the echo-line with
 pixel-scroll-precision-mode
Date: Thu, 09 May 2024 18:28:19 -0700
I think the fix is a little more complicated because, while a window may
be 1 line tall, the underlying buffer may have more than one line.

I believe we need two changes.

1. In `pixel-scroll-precision-scroll-down` and `-up`, set `max-height`
   to a minimum of `1` (pixel). It looks like someone already "fixed" the
   `-up` variant, but I'm not sure that that "fix" is correct as it
   prevents scrolling in a 1-line window.
2. Disable `pixel-scroll-precision-mode` in the echo area and
   minibuffer? It does not behave well in either case.

But I'm not sure. I'm happy to submit a patch if this sounds like the
right approach.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70856; Package emacs. (Fri, 10 May 2024 01:29:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70856; Package emacs. (Fri, 10 May 2024 03:03:02 GMT) Full text and rfc822 format available.

Message #20 received at 70856 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Steven Allen <steven <at> stebalien.com>
Cc: charmitro <at> posteo.net, 70856 <at> debbugs.gnu.org
Subject: Re: bug#70856: 30.0.50; Hang when scrolling the echo-line with
 pixel-scroll-precision-mode
Date: Fri, 10 May 2024 11:02:01 +0800
Steven Allen <steven <at> stebalien.com> writes:

> I think the fix is a little more complicated because, while a window may
> be 1 line tall, the underlying buffer may have more than one line.
>
> I believe we need two changes.
>
> 1. In `pixel-scroll-precision-scroll-down` and `-up`, set `max-height`
>    to a minimum of `1` (pixel). It looks like someone already "fixed" the
>    `-up` variant, but I'm not sure that that "fix" is correct as it
>    prevents scrolling in a 1-line window.
> 2. Disable `pixel-scroll-precision-mode` in the echo area and
>    minibuffer? It does not behave well in either case.
>
> But I'm not sure. I'm happy to submit a patch if this sounds like the
> right approach.

I've fixed this on master, please test and ack.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70856; Package emacs. (Fri, 10 May 2024 04:50:02 GMT) Full text and rfc822 format available.

Message #23 received at 70856 <at> debbugs.gnu.org (full text, mbox):

From: Steven Allen <steven <at> stebalien.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: charmitro <at> posteo.net, 70856 <at> debbugs.gnu.org
Subject: Re: bug#70856: 30.0.50; Hang when scrolling the echo-line with
 pixel-scroll-precision-mode
Date: Thu, 09 May 2024 21:48:59 -0700
Fixed! Thanks!

(I still think we should disable mwheel scrolling in the echo area, but that's a separate and negligible-priority issue)




Reply sent to Po Lu <luangruo <at> yahoo.com>:
You have taken responsibility. (Fri, 10 May 2024 06:03:01 GMT) Full text and rfc822 format available.

Notification sent to Steven Allen <steven <at> stebalien.com>:
bug acknowledged by developer. (Fri, 10 May 2024 06:03:01 GMT) Full text and rfc822 format available.

Message #28 received at 70856-done <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Steven Allen <steven <at> stebalien.com>
Cc: charmitro <at> posteo.net, 70856-done <at> debbugs.gnu.org
Subject: Re: bug#70856: 30.0.50; Hang when scrolling the echo-line with
 pixel-scroll-precision-mode
Date: Fri, 10 May 2024 14:01:41 +0800
Steven Allen <steven <at> stebalien.com> writes:

> Fixed! Thanks!

Closing, thanks.

> (I still think we should disable mwheel scrolling in the echo area,
> but that's a separate and negligible-priority issue)

Indeed, that's a question for another day.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70856; Package emacs. (Fri, 10 May 2024 07:10:01 GMT) Full text and rfc822 format available.

Message #31 received at 70856 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: charmitro <at> posteo.net, 70856 <at> debbugs.gnu.org, steven <at> stebalien.com
Subject: Re: bug#70856: 30.0.50;
 Hang when scrolling the echo-line with pixel-scroll-precision-mode
Date: Fri, 10 May 2024 10:09:28 +0300
> Cc: charmitro <at> posteo.net, 70856 <at> debbugs.gnu.org
> Date: Fri, 10 May 2024 11:02:01 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> > I believe we need two changes.
> >
> > 1. In `pixel-scroll-precision-scroll-down` and `-up`, set `max-height`
> >    to a minimum of `1` (pixel). It looks like someone already "fixed" the
> >    `-up` variant, but I'm not sure that that "fix" is correct as it
> >    prevents scrolling in a 1-line window.
> > 2. Disable `pixel-scroll-precision-mode` in the echo area and
> >    minibuffer? It does not behave well in either case.
> >
> > But I'm not sure. I'm happy to submit a patch if this sounds like the
> > right approach.
> 
> I've fixed this on master, please test and ack.

Thanks, but please clarify the doc string some more:

>  +Note that this function doesn't work if DELTA is larger than or
>  +equal to the height of the current window."

This note is not very useful without explaining what exactly is meant
by "the height of the current window", and whether this inequality
should be done in pixel or character units.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70856; Package emacs. (Fri, 10 May 2024 07:24:02 GMT) Full text and rfc822 format available.

Message #34 received at 70856 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Steven Allen <steven <at> stebalien.com>
Cc: luangruo <at> yahoo.com, charmitro <at> posteo.net, 70856 <at> debbugs.gnu.org
Subject: Re: bug#70856: 30.0.50;
 Hang when scrolling the echo-line with pixel-scroll-precision-mode
Date: Fri, 10 May 2024 10:21:11 +0300
> Cc: charmitro <at> posteo.net, 70856 <at> debbugs.gnu.org
> Date: Thu, 09 May 2024 21:48:59 -0700
> From:  Steven Allen via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> (I still think we should disable mwheel scrolling in the echo area, but that's a separate and negligible-priority issue)

Why would we disable that?  The mini-window can legitimately be
several lines high, and if it is more than max-mini-window-height, not
all of the material there will be actually displayed, so scrolling it
makes perfect sense to me..




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70856; Package emacs. (Fri, 10 May 2024 15:04:01 GMT) Full text and rfc822 format available.

Message #37 received at 70856 <at> debbugs.gnu.org (full text, mbox):

From: Steven Allen <steven <at> stebalien.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, charmitro <at> posteo.net, 70856 <at> debbugs.gnu.org
Subject: Re: bug#70856: 30.0.50; Hang when scrolling the echo-line with
 pixel-scroll-precision-mode
Date: Fri, 10 May 2024 08:03:39 -0700
Hm. It looks like my issue is more with vertico than minibuffer
scrolling. Mouse-wheel scrolling with vertico (and likely other
completion frameworks) scrolls the prompt in addition to the text
whereas the arrow keys leave the prompt where it is.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70856; Package emacs. (Fri, 10 May 2024 15:48:02 GMT) Full text and rfc822 format available.

Message #40 received at 70856 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Steven Allen <steven <at> stebalien.com>,
 Daniel Mendler <mail <at> daniel-mendler.de>
Cc: luangruo <at> yahoo.com, charmitro <at> posteo.net, 70856 <at> debbugs.gnu.org
Subject: Re: bug#70856: 30.0.50; Hang when scrolling the echo-line with
 pixel-scroll-precision-mode
Date: Fri, 10 May 2024 18:45:13 +0300
> From: Steven Allen <steven <at> stebalien.com>
> Cc: luangruo <at> yahoo.com, charmitro <at> posteo.net, 70856 <at> debbugs.gnu.org
> Date: Fri, 10 May 2024 08:03:39 -0700
> 
> 
> Hm. It looks like my issue is more with vertico than minibuffer
> scrolling. Mouse-wheel scrolling with vertico (and likely other
> completion frameworks) scrolls the prompt in addition to the text
> whereas the arrow keys leave the prompt where it is.

Adding Daniel.




This bug report was last modified 21 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.