unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#70856: 30.0.50; Hang when scrolling the echo-line with pixel-scroll-precision-mode
@ 2024-05-09 22:56 Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-05-09 23:53 ` Charalampos Mitrodimas
  0 siblings, 1 reply; 10+ messages in thread
From: Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-09 22:56 UTC (permalink / raw)
  To: 70856


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))





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#70856: 30.0.50; Hang when scrolling the echo-line with pixel-scroll-precision-mode
  2024-05-09 22:56 bug#70856: 30.0.50; Hang when scrolling the echo-line with pixel-scroll-precision-mode Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-09 23:53 ` Charalampos Mitrodimas
  2024-05-10  1:28   ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 10+ messages in thread
From: Charalampos Mitrodimas @ 2024-05-09 23:53 UTC (permalink / raw)
  To: 70856; +Cc: steven

Steven Allen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#70856: 30.0.50; Hang when scrolling the echo-line with pixel-scroll-precision-mode
  2024-05-09 23:53 ` Charalampos Mitrodimas
@ 2024-05-10  1:28   ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-05-10  3:02     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 10+ messages in thread
From: Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-10  1:28 UTC (permalink / raw)
  To: charmitro, 70856


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.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#70856: 30.0.50; Hang when scrolling the echo-line with pixel-scroll-precision-mode
  2024-05-10  1:28   ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-10  3:02     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-05-10  4:48       ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-05-10  7:09       ` Eli Zaretskii
  0 siblings, 2 replies; 10+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-10  3:02 UTC (permalink / raw)
  To: Steven Allen; +Cc: charmitro, 70856

Steven Allen <steven@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.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#70856: 30.0.50; Hang when scrolling the echo-line with pixel-scroll-precision-mode
  2024-05-10  3:02     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-10  4:48       ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-05-10  6:01         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-05-10  7:21         ` Eli Zaretskii
  2024-05-10  7:09       ` Eli Zaretskii
  1 sibling, 2 replies; 10+ messages in thread
From: Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-10  4:48 UTC (permalink / raw)
  To: Po Lu; +Cc: charmitro, 70856


Fixed! Thanks!

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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#70856: 30.0.50; Hang when scrolling the echo-line with pixel-scroll-precision-mode
  2024-05-10  4:48       ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-10  6:01         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-05-10  7:21         ` Eli Zaretskii
  1 sibling, 0 replies; 10+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-10  6:01 UTC (permalink / raw)
  To: Steven Allen; +Cc: charmitro, 70856-done

Steven Allen <steven@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.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#70856: 30.0.50; Hang when scrolling the echo-line with pixel-scroll-precision-mode
  2024-05-10  3:02     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-05-10  4:48       ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-10  7:09       ` Eli Zaretskii
  1 sibling, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2024-05-10  7:09 UTC (permalink / raw)
  To: Po Lu; +Cc: charmitro, 70856, steven

> Cc: charmitro@posteo.net, 70856@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@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.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#70856: 30.0.50; Hang when scrolling the echo-line with pixel-scroll-precision-mode
  2024-05-10  4:48       ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-05-10  6:01         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-10  7:21         ` Eli Zaretskii
  2024-05-10 15:03           ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2024-05-10  7:21 UTC (permalink / raw)
  To: Steven Allen; +Cc: luangruo, charmitro, 70856

> Cc: charmitro@posteo.net, 70856@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@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..





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#70856: 30.0.50; Hang when scrolling the echo-line with pixel-scroll-precision-mode
  2024-05-10  7:21         ` Eli Zaretskii
@ 2024-05-10 15:03           ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-05-10 15:45             ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-10 15:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: luangruo, charmitro, 70856


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.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#70856: 30.0.50; Hang when scrolling the echo-line with pixel-scroll-precision-mode
  2024-05-10 15:03           ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-10 15:45             ` Eli Zaretskii
  0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2024-05-10 15:45 UTC (permalink / raw)
  To: Steven Allen, Daniel Mendler; +Cc: luangruo, charmitro, 70856

> From: Steven Allen <steven@stebalien.com>
> Cc: luangruo@yahoo.com, charmitro@posteo.net, 70856@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.





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-05-10 15:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-09 22:56 bug#70856: 30.0.50; Hang when scrolling the echo-line with pixel-scroll-precision-mode Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-09 23:53 ` Charalampos Mitrodimas
2024-05-10  1:28   ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10  3:02     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10  4:48       ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10  6:01         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10  7:21         ` Eli Zaretskii
2024-05-10 15:03           ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10 15:45             ` Eli Zaretskii
2024-05-10  7:09       ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).