GNU bug report logs - #74430
30.0.92; pixel-scroll-precision-mode hiding Eshell prompt after some commands

Previous Next

Package: emacs;

Reported by: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>

Date: Tue, 19 Nov 2024 05:28:02 UTC

Severity: normal

Found in version 30.0.92

To reply to this bug, email your comments to 74430 AT debbugs.gnu.org.

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#74430; Package emacs. (Tue, 19 Nov 2024 05:28:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ashton Wiersdorf <ashton <at> wiersdorfmail.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 19 Nov 2024 05:28:03 GMT) Full text and rfc822 format available.

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

From: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.92; pixel-scroll-precision-mode hiding Eshell prompt after
 some commands
Date: Mon, 18 Nov 2024 10:52:27 -0700
Reproducing the bug from emacs -Q

I had this as my `early-init.el`:

   (setq package-enable-at-startup nil)
   (setq frame-resize-pixelwise t)

and this as `init.el`:

   (pixel-scroll-precision-mode)

Then, when Emacs started, I resized the window so it wasn't a 
multiple
of a full character's height.

Next, I ran `M-x eshell` and went to an Elixir project where I ran 
`mix
test`. This bit shouldn't be important, but it's the most reliable 
way I
could find to trigger the bug, unfortunately. I'll report back if 
I find
another easily reproducible command that trigger the behavior.

When the command finished, the Eshell prompt was almost entirely
obscured by the modeline.

The bug does not manifest when I turn off 
`pixel-scroll-precision-mode`.
It returns when I turn `pixel-scroll-precision-mode` back on.

In GNU Emacs 30.0.92 (build 2, aarch64-apple-darwin24.1.0, NS
appkit-2575.20 Version 15.1 (Build 24B83)) of 2024-11-05 built on
vulcan.local
Windowing system distributor 'Apple', version 10.3.2575
System Description:  macOS 15.1

Configured using:
'configure --disable-dependency-tracking --disable-silent-rules
--enable-locallisppath=/opt/homebrew/share/emacs/site-lisp
--infodir=/opt/homebrew/Cellar/emacs-plus <at> 30/30.0.92/share/info/emacs
--prefix=/opt/homebrew/Cellar/emacs-plus <at> 30/30.0.92 --with-xml2
--with-gnutls --with-native-compilation=aot 
--without-compress-install
--with-dbus --with-imagemagick --with-modules --with-rsvg 
--with-webp
--without-pop --with-xwidgets --with-ns 
--disable-ns-self-contained
'CFLAGS=-O2 -DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT
-I/opt/homebrew/opt/gcc/include 
-I/opt/homebrew/opt/libgccjit/include'
'LDFLAGS=-L/opt/homebrew/lib/gcc/14 
-I/opt/homebrew/opt/gcc/include
-I/opt/homebrew/opt/libgccjit/include''

Configured features:
ACL DBUS GIF GLIB GMP GNUTLS IMAGEMAGICK JPEG LCMS2 LIBXML2 
MODULES
NATIVE_COMP NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM XWIDGETS ZLIB

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

Major mode: Eshell

Minor modes in effect:
 eshell-prompt-mode: t
 eshell-pred-mode: t
 eshell-hist-mode: t
 eshell-cmpl-mode: t
 eshell-proc-mode: t
 eshell-arg-mode: t
 pixel-scroll-precision-mode: t
 tooltip-mode: t
 global-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 compile comp-run comp-common emacsbug 
message
mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec
password-cache epa derived epg rfc6068 epg-config gnus-util 
time-date
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev 
gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils cl-seq pcmpl-unix cl-extra help-mode rx em-unix em-term 
term
disp-table shell ehelp em-script em-prompt text-property-search 
em-pred
em-ls em-hist em-glob em-extpipe em-cmpl em-dirs em-basic 
em-banner
em-alias esh-mode esh-var eshell esh-cmd generator cl-loaddefs 
cl-lib
esh-ext esh-opt esh-proc esh-io byte-opt gv bytecomp byte-compile
esh-arg pcomplete comint ansi-osc ansi-color esh-module
esh-module-loaddefs esh-util files-x 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/ns-win ns-win
ucs-normalize mule-util term/common-win 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 xwidget-internal 
dbusbind
kqueue cocoa ns lcms2 multi-tty make-network-process 
native-compile
emacs)

Memory information:
((conses 16 107402 9344) (symbols 48 8995 0) (strings 32 25963 
2526)
(string-bytes 1 865352) (vectors 16 16688)
(vector-slots 8 212549 7121) (floats 8 179 59) (intervals 56 579 
0)
(buffers 992 14))

-- 
Ashton Wiersdorf
https://lambdaland.org/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Thu, 21 Nov 2024 10:55:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>,
 Po Lu <luangruo <at> yahoo.com>, Jim Porter <jporterbugs <at> gmail.com>
Cc: 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92;
 pixel-scroll-precision-mode hiding Eshell prompt after some commands
Date: Thu, 21 Nov 2024 12:53:53 +0200
> From: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>
> Date: Mon, 18 Nov 2024 10:52:27 -0700
> 
> 
> Reproducing the bug from emacs -Q
> 
> I had this as my `early-init.el`:
> 
>     (setq package-enable-at-startup nil)
>     (setq frame-resize-pixelwise t)
> 
> and this as `init.el`:
> 
>     (pixel-scroll-precision-mode)
> 
> Then, when Emacs started, I resized the window so it wasn't a 
> multiple
> of a full character's height.
> 
> Next, I ran `M-x eshell` and went to an Elixir project where I ran 
> `mix
> test`. This bit shouldn't be important, but it's the most reliable 
> way I
> could find to trigger the bug, unfortunately. I'll report back if 
> I find
> another easily reproducible command that trigger the behavior.
> 
> When the command finished, the Eshell prompt was almost entirely
> obscured by the modeline.
> 
> The bug does not manifest when I turn off 
> `pixel-scroll-precision-mode`.
> It returns when I turn `pixel-scroll-precision-mode` back on.

Po Lu and Jim, could you look into this, please?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Thu, 21 Nov 2024 18:39:01 GMT) Full text and rfc822 format available.

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

From: Jim Porter <jporterbugs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Ashton Wiersdorf
 <ashton <at> wiersdorfmail.net>, Po Lu <luangruo <at> yahoo.com>
Cc: 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Thu, 21 Nov 2024 10:37:08 -0800
On 11/21/2024 2:53 AM, Eli Zaretskii wrote:
>> From: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>
>> Date: Mon, 18 Nov 2024 10:52:27 -0700
>>
>> When the command finished, the Eshell prompt was almost entirely
>> obscured by the modeline.
>>
>> The bug does not manifest when I turn off
>> `pixel-scroll-precision-mode`.
>> It returns when I turn `pixel-scroll-precision-mode` back on.
> 
> Po Lu and Jim, could you look into this, please?

I'm only dimly aware of how 'pixel-scroll-precision-mode' works, but I 
seem to recall that it sets the window's vscroll to allow scrolling past 
*part* of a line. On the Eshell side, I believe the relevant function is 
'eshell-postoutput-scroll-to-bottom', which calls 'recenter' to scroll 
the window.

I'm guessing these interact badly, and what we actually want to do is to 
reset the vscroll when Eshell calls 'recenter'. However, I'm not sure 
what the best way to do this would be. Is there some better function 
Eshell can call that would handle this case correctly?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Fri, 22 Nov 2024 00:01:01 GMT) Full text and rfc822 format available.

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

From: Po Lu <luangruo <at> yahoo.com>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Ashton Wiersdorf <ashton <at> wiersdorfmail.net>,
 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Fri, 22 Nov 2024 07:59:50 +0800
Jim Porter <jporterbugs <at> gmail.com> writes:

> I'm only dimly aware of how 'pixel-scroll-precision-mode' works, but I
> seem to recall that it sets the window's vscroll to allow scrolling
> past *part* of a line. On the Eshell side, I believe the relevant
> function is 'eshell-postoutput-scroll-to-bottom', which calls
> 'recenter' to scroll the window.
>
> I'm guessing these interact badly, and what we actually want to do is
> to reset the vscroll when Eshell calls 'recenter'. However, I'm not
> sure what the best way to do this would be. Is there some better
> function Eshell can call that would handle this case correctly?

Since pixel-scroll-precision-mode never configures a vscroll taller than
one screen line, resetting vscroll in these scenarios is generally the
safest and simplest solutions to problems such as the OP is facing.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Fri, 22 Nov 2024 07:00:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: jporterbugs <at> gmail.com, ashton <at> wiersdorfmail.net, 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Fri, 22 Nov 2024 08:58:58 +0200
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  Ashton Wiersdorf
>  <ashton <at> wiersdorfmail.net>,  74430 <at> debbugs.gnu.org
> Date: Fri, 22 Nov 2024 07:59:50 +0800
> 
> Jim Porter <jporterbugs <at> gmail.com> writes:
> 
> > I'm only dimly aware of how 'pixel-scroll-precision-mode' works, but I
> > seem to recall that it sets the window's vscroll to allow scrolling
> > past *part* of a line. On the Eshell side, I believe the relevant
> > function is 'eshell-postoutput-scroll-to-bottom', which calls
> > 'recenter' to scroll the window.
> >
> > I'm guessing these interact badly, and what we actually want to do is
> > to reset the vscroll when Eshell calls 'recenter'. However, I'm not
> > sure what the best way to do this would be. Is there some better
> > function Eshell can call that would handle this case correctly?
> 
> Since pixel-scroll-precision-mode never configures a vscroll taller than
> one screen line, resetting vscroll in these scenarios is generally the
> safest and simplest solutions to problems such as the OP is facing.

So you suggest that eshell-postoutput-scroll-to-bottom explicitly
resets the window's vscroll, and that should solve the OP's problem?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Mon, 25 Nov 2024 05:15:02 GMT) Full text and rfc822 format available.

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

From: Jim Porter <jporterbugs <at> gmail.com>
To: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>, 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Sun, 24 Nov 2024 21:13:33 -0800
On 11/18/2024 9:52 AM, Ashton Wiersdorf wrote:
> Then, when Emacs started, I resized the window so it wasn't a multiple
> of a full character's height.
[snip]
> When the command finished, the Eshell prompt was almost entirely
> obscured by the modeline.

I'm not able to reproduce this. I tried running a bunch of commands, 
including ones that output large amounts of text, but it all works as 
expected: once Eshell starts scrolling the buffer (by way of calls to 
'recenter'), the vscroll is reset to 0 and everything works as it should.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Sat, 30 Nov 2024 10:08:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: ashton <at> wiersdorfmail.net, Jim Porter <jporterbugs <at> gmail.com>
Cc: 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92;
 pixel-scroll-precision-mode hiding Eshell prompt after some commands
Date: Sat, 30 Nov 2024 12:07:20 +0200
> Date: Sun, 24 Nov 2024 21:13:33 -0800
> From: Jim Porter <jporterbugs <at> gmail.com>
> 
> On 11/18/2024 9:52 AM, Ashton Wiersdorf wrote:
> > Then, when Emacs started, I resized the window so it wasn't a multiple
> > of a full character's height.
> [snip]
> > When the command finished, the Eshell prompt was almost entirely
> > obscured by the modeline.
> 
> I'm not able to reproduce this. I tried running a bunch of commands, 
> including ones that output large amounts of text, but it all works as 
> expected: once Eshell starts scrolling the buffer (by way of calls to 
> 'recenter'), the vscroll is reset to 0 and everything works as it should.

Ashton, could you please help Jim reproduce the problem?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Sat, 30 Nov 2024 10:09:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: luangruo <at> yahoo.com
Cc: jporterbugs <at> gmail.com, ashton <at> wiersdorfmail.net, 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92;
 pixel-scroll-precision-mode hiding Eshell prompt after some commands
Date: Sat, 30 Nov 2024 12:07:51 +0200
Ping!

> Cc: jporterbugs <at> gmail.com, ashton <at> wiersdorfmail.net, 74430 <at> debbugs.gnu.org
> Date: Fri, 22 Nov 2024 08:58:58 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > From: Po Lu <luangruo <at> yahoo.com>
> > Cc: Eli Zaretskii <eliz <at> gnu.org>,  Ashton Wiersdorf
> >  <ashton <at> wiersdorfmail.net>,  74430 <at> debbugs.gnu.org
> > Date: Fri, 22 Nov 2024 07:59:50 +0800
> > 
> > Jim Porter <jporterbugs <at> gmail.com> writes:
> > 
> > > I'm only dimly aware of how 'pixel-scroll-precision-mode' works, but I
> > > seem to recall that it sets the window's vscroll to allow scrolling
> > > past *part* of a line. On the Eshell side, I believe the relevant
> > > function is 'eshell-postoutput-scroll-to-bottom', which calls
> > > 'recenter' to scroll the window.
> > >
> > > I'm guessing these interact badly, and what we actually want to do is
> > > to reset the vscroll when Eshell calls 'recenter'. However, I'm not
> > > sure what the best way to do this would be. Is there some better
> > > function Eshell can call that would handle this case correctly?
> > 
> > Since pixel-scroll-precision-mode never configures a vscroll taller than
> > one screen line, resetting vscroll in these scenarios is generally the
> > safest and simplest solutions to problems such as the OP is facing.
> 
> So you suggest that eshell-postoutput-scroll-to-bottom explicitly
> resets the window's vscroll, and that should solve the OP's problem?
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Sat, 14 Dec 2024 09:39:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: ashton <at> wiersdorfmail.net
Cc: jporterbugs <at> gmail.com, 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92;
 pixel-scroll-precision-mode hiding Eshell prompt after some commands
Date: Sat, 14 Dec 2024 11:38:04 +0200
Ping!  Ashton, please respond.

> Cc: 74430 <at> debbugs.gnu.org
> Date: Sat, 30 Nov 2024 12:07:20 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > Date: Sun, 24 Nov 2024 21:13:33 -0800
> > From: Jim Porter <jporterbugs <at> gmail.com>
> > 
> > On 11/18/2024 9:52 AM, Ashton Wiersdorf wrote:
> > > Then, when Emacs started, I resized the window so it wasn't a multiple
> > > of a full character's height.
> > [snip]
> > > When the command finished, the Eshell prompt was almost entirely
> > > obscured by the modeline.
> > 
> > I'm not able to reproduce this. I tried running a bunch of commands, 
> > including ones that output large amounts of text, but it all works as 
> > expected: once Eshell starts scrolling the buffer (by way of calls to 
> > 'recenter'), the vscroll is reset to 0 and everything works as it should.
> 
> Ashton, could you please help Jim reproduce the problem?
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Sat, 14 Dec 2024 09:39:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: luangruo <at> yahoo.com
Cc: jporterbugs <at> gmail.com, ashton <at> wiersdorfmail.net, 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92;
 pixel-scroll-precision-mode hiding Eshell prompt after some commands
Date: Sat, 14 Dec 2024 11:38:38 +0200
Ping! Ping!  Po Lu, can you please answer the question?

> Cc: jporterbugs <at> gmail.com, ashton <at> wiersdorfmail.net, 74430 <at> debbugs.gnu.org
> Date: Sat, 30 Nov 2024 12:07:51 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> Ping!
> 
> > Cc: jporterbugs <at> gmail.com, ashton <at> wiersdorfmail.net, 74430 <at> debbugs.gnu.org
> > Date: Fri, 22 Nov 2024 08:58:58 +0200
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > 
> > > From: Po Lu <luangruo <at> yahoo.com>
> > > Cc: Eli Zaretskii <eliz <at> gnu.org>,  Ashton Wiersdorf
> > >  <ashton <at> wiersdorfmail.net>,  74430 <at> debbugs.gnu.org
> > > Date: Fri, 22 Nov 2024 07:59:50 +0800
> > > 
> > > Jim Porter <jporterbugs <at> gmail.com> writes:
> > > 
> > > > I'm only dimly aware of how 'pixel-scroll-precision-mode' works, but I
> > > > seem to recall that it sets the window's vscroll to allow scrolling
> > > > past *part* of a line. On the Eshell side, I believe the relevant
> > > > function is 'eshell-postoutput-scroll-to-bottom', which calls
> > > > 'recenter' to scroll the window.
> > > >
> > > > I'm guessing these interact badly, and what we actually want to do is
> > > > to reset the vscroll when Eshell calls 'recenter'. However, I'm not
> > > > sure what the best way to do this would be. Is there some better
> > > > function Eshell can call that would handle this case correctly?
> > > 
> > > Since pixel-scroll-precision-mode never configures a vscroll taller than
> > > one screen line, resetting vscroll in these scenarios is generally the
> > > safest and simplest solutions to problems such as the OP is facing.
> > 
> > So you suggest that eshell-postoutput-scroll-to-bottom explicitly
> > resets the window's vscroll, and that should solve the OP's problem?
> > 
> > 
> > 
> > 
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Sat, 14 Dec 2024 18:41:01 GMT) Full text and rfc822 format available.

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

From: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: jporterbugs <at> gmail.com, 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Sat, 14 Dec 2024 11:40:03 -0700
Hey, sorry Eli. I haven't been able to get this to reproduce 
consistently—it happens most often when I run a (broken) test 
suite on an Elixir project I'm working on, and then only 
sometimes. I think running a complex Elixir application would be a 
suboptimal thing to run to try to reproduce the bug, no?

I might have a little time today to try reproducing it with 
simpler commands; I'll let you know then. Sorry I haven't been 
able to get a MWE yet.

-- 
Ashton Wiersdorf
https://lambdaland.org/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Sun, 15 Dec 2024 19:12:01 GMT) Full text and rfc822 format available.

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

From: Jim Porter <jporterbugs <at> gmail.com>
To: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Sun, 15 Dec 2024 11:10:00 -0800
On 12/14/2024 10:40 AM, Ashton Wiersdorf wrote:
> Hey, sorry Eli. I haven't been able to get this to reproduce 
> consistently—it happens most often when I run a (broken) test suite on 
> an Elixir project I'm working on, and then only sometimes. I think 
> running a complex Elixir application would be a suboptimal thing to run 
> to try to reproduce the bug, no?
> 
> I might have a little time today to try reproducing it with simpler 
> commands; I'll let you know then. Sorry I haven't been able to get a MWE 
> yet.

If you can't find a minimal example, a screenshot could also help, so 
long as you wouldn't be leaking any private information.

Also, are there any "unique" properties of the output that causes this 
bug? For example, does it use "\r" carriage returns to overwrite the 
last line, or does it use emojis, or anything like that? If there's 
something different from the norm, that could help narrow things down.




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

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

From: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Fri, 27 Dec 2024 13:09:00 -0700
[Message part 1 (text/plain, inline)]
> If you can't find a minimal example, a screenshot could also 
> help, so
> long as you wouldn't be leaking any private information.

Here's a screenshot of the bug in action:

[screenshot_eshell_scroll_bug.png (image/png, inline)]
[Message part 3 (text/plain, inline)]
> Also, are there any "unique" properties of the output that 
> causes this
> bug? For example, does it use "\r" carriage returns to overwrite 
> the
> last line, or does it use emojis, or anything like that? If 
> there's
> something different from the norm, that could help narrow things 
> down.

I've seen this most often after running Elixir scripts—that might 
just be availability bias because that's what I'm doing for work 
right now! There *is* some colored text in the output. AFAIK 
Elixir doesn't send "\r" to do anything tricky with the last line. 
I think I've seen this happen with other commands.

I've noticed that the easiest way to rid myself of this behavior 
is to just it Ctrl-l when it arises. That resets something and it 
will work again for a while.

Note: I just upgraded to 30.0.93, and I'll keep my eyes peeled to 
see if it resurfaces.

Thanks for your help, attention, and patience. Happy holidays!

-- 
Ashton Wiersdorf
https://lambdaland.org/

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Sat, 28 Dec 2024 11:14:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: luangruo <at> yahoo.com
Cc: jporterbugs <at> gmail.com, ashton <at> wiersdorfmail.net, 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92;
 pixel-scroll-precision-mode hiding Eshell prompt after some commands
Date: Sat, 28 Dec 2024 13:13:18 +0200
Ping! Ping! Ping!  Po Lu, are you there?

> Cc: jporterbugs <at> gmail.com, ashton <at> wiersdorfmail.net, 74430 <at> debbugs.gnu.org
> Date: Sat, 14 Dec 2024 11:38:38 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> Ping! Ping!  Po Lu, can you please answer the question?
> 
> > Cc: jporterbugs <at> gmail.com, ashton <at> wiersdorfmail.net, 74430 <at> debbugs.gnu.org
> > Date: Sat, 30 Nov 2024 12:07:51 +0200
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > 
> > Ping!
> > 
> > > Cc: jporterbugs <at> gmail.com, ashton <at> wiersdorfmail.net, 74430 <at> debbugs.gnu.org
> > > Date: Fri, 22 Nov 2024 08:58:58 +0200
> > > From: Eli Zaretskii <eliz <at> gnu.org>
> > > 
> > > > From: Po Lu <luangruo <at> yahoo.com>
> > > > Cc: Eli Zaretskii <eliz <at> gnu.org>,  Ashton Wiersdorf
> > > >  <ashton <at> wiersdorfmail.net>,  74430 <at> debbugs.gnu.org
> > > > Date: Fri, 22 Nov 2024 07:59:50 +0800
> > > > 
> > > > Jim Porter <jporterbugs <at> gmail.com> writes:
> > > > 
> > > > > I'm only dimly aware of how 'pixel-scroll-precision-mode' works, but I
> > > > > seem to recall that it sets the window's vscroll to allow scrolling
> > > > > past *part* of a line. On the Eshell side, I believe the relevant
> > > > > function is 'eshell-postoutput-scroll-to-bottom', which calls
> > > > > 'recenter' to scroll the window.
> > > > >
> > > > > I'm guessing these interact badly, and what we actually want to do is
> > > > > to reset the vscroll when Eshell calls 'recenter'. However, I'm not
> > > > > sure what the best way to do this would be. Is there some better
> > > > > function Eshell can call that would handle this case correctly?
> > > > 
> > > > Since pixel-scroll-precision-mode never configures a vscroll taller than
> > > > one screen line, resetting vscroll in these scenarios is generally the
> > > > safest and simplest solutions to problems such as the OP is facing.
> > > 
> > > So you suggest that eshell-postoutput-scroll-to-bottom explicitly
> > > resets the window's vscroll, and that should solve the OP's problem?
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> > 
> > 
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Tue, 31 Dec 2024 23:52:02 GMT) Full text and rfc822 format available.

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

From: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, jporterbugs <at> gmail.com, 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Tue, 31 Dec 2024 16:51:19 -0700
[Message part 1 (text/plain, inline)]
Hey all, I've had some luck reproducing this just now!

Dump this into "eshell_scroll_bug.el":

   (pixel-scroll-precision-mode)
   (tool-bar-mode -1)
   (setopt frame-resize-pixelwise t)
   (set-frame-height (selected-frame) 486 nil t)
   (eshell)

Then run `emacs -Q -l eshell_scroll_bug.el`, and then run `find 
/etc/` from inside Eshell.

The prompt should appear covered by the mode-line.

Here's the `emacs-version` that this is occurring under:

GNU Emacs 30.0.93 (build 2, aarch64-apple-darwin24.2.0, NS 
appkit-2575.30 Version 15.2 (Build 24C101)) of 2024-12-26

I've attached a screenshot of what it looks like on my machine 
after running that. I hope this helps!

[Screenshot 2024-12-31 at 16.46.54.png (image/png, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Ashton Wiersdorf
https://lambdaland.org/

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Wed, 01 Jan 2025 03:12:02 GMT) Full text and rfc822 format available.

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

From: Jim Porter <jporterbugs <at> gmail.com>
To: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>, Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Tue, 31 Dec 2024 19:10:27 -0800
On 12/31/2024 3:51 PM, Ashton Wiersdorf wrote:
> Hey all, I've had some luck reproducing this just now!
> 
> Dump this into "eshell_scroll_bug.el":
> 
>     (pixel-scroll-precision-mode)
>     (tool-bar-mode -1)
>     (setopt frame-resize-pixelwise t)
>     (set-frame-height (selected-frame) 486 nil t)
>     (eshell)
> 
> Then run `emacs -Q -l eshell_scroll_bug.el`, and then run `find /etc/` 
> from inside Eshell.
> 
> The prompt should appear covered by the mode-line.

Everything looks ok to me on GNU/Linux. Maybe this is a macOS-specific 
issue?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Wed, 01 Jan 2025 09:03:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>, Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, jporterbugs <at> gmail.com, 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Wed, 1 Jan 2025 10:02:41 +0100
> Dump this into "eshell_scroll_bug.el":
>
>     (pixel-scroll-precision-mode)
>     (tool-bar-mode -1)
>     (setopt frame-resize-pixelwise t)
>     (set-frame-height (selected-frame) 486 nil t)
>     (eshell)
>
> Then run `emacs -Q -l eshell_scroll_bug.el`, and then run `find /etc/` from inside Eshell.
>
> The prompt should appear covered by the mode-line.

I can reproduce it here with (setopt frame-resize-pixelwise t) and
dragging the bottom border of the frame up so the eshell window doesn't
have an integral number of lines.

'pixel-scroll-precision-mode' sets 'make-cursor-line-fully-visible' to
nil so this is probably the intended bahavior.  When I do

(setq-default make-cursor-line-fully-visible nil)

I can't see it any more.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Wed, 01 Jan 2025 10:32:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>, Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, jporterbugs <at> gmail.com, 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Wed, 1 Jan 2025 11:31:28 +0100
> When I do
>
> (setq-default make-cursor-line-fully-visible nil)

This should obviously become

(setq-default make-cursor-line-fully-visible t)

> I can't see it any more.

Sorry for the confusion, martin




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

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

From: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>
To: martin rudalics <rudalics <at> gmx.at>
Cc: luangruo <at> yahoo.com, jporterbugs <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>,
 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Thu, 02 Jan 2025 17:09:13 -0700
> (setq-default make-cursor-line-fully-visible t)

I can confirm: this does solve the issue. Thank you so much!

I'm curious: does anyone know what the rationale is for 
`pixel-scroll-precision-mode` setting this to `nil`? It doesn't 
seem like something that you'd want… Did this behavior change in 
Emacs 30?

-- 
Ashton Wiersdorf
https://lambdaland.org/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Fri, 03 Jan 2025 08:27:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>
Cc: luangruo <at> yahoo.com, rudalics <at> gmx.at, 74430 <at> debbugs.gnu.org,
 jporterbugs <at> gmail.com
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Fri, 03 Jan 2025 10:26:12 +0200
> From: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  luangruo <at> yahoo.com,
>   jporterbugs <at> gmail.com,  74430 <at> debbugs.gnu.org
> Date: Thu, 02 Jan 2025 17:09:13 -0700
> 
> > (setq-default make-cursor-line-fully-visible t)
> 
> I can confirm: this does solve the issue. Thank you so much!
> 
> I'm curious: does anyone know what the rationale is for 
> `pixel-scroll-precision-mode` setting this to `nil`? It doesn't 
> seem like something that you'd want…

pixel-scroll-precision-mode sets that variable because otherwise you
couldn't have smooth scroll when the last line is tall, since Emacs
would then scroll by a larger amount to have the last line fully
visible.

> Did this behavior change in Emacs 30?

Yes, see bug#65214.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Fri, 03 Jan 2025 08:57:01 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>
Cc: luangruo <at> yahoo.com, jporterbugs <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>,
 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Fri, 3 Jan 2025 09:55:50 +0100
> I'm curious: does anyone know what the rationale is for
> `pixel-scroll-precision-mode` setting this to `nil`? It doesn't seem
> like something that you'd want… Did this behavior change in Emacs 30?

Apparently.  AFAICT the rationale was to fix Bug#65214.  I think the two
ways to handle that bug and the present one are:

- Add two new values for 'make-cursor-line-fully-visible', say 'always'
  and 'never', a mode would not be permitted to override.

- Add a second customizable variable say
  'pixel-scroll-precision-mode-make-cursor-line-fully-visible'
  that would control the behavior.

More experienced users could also try to set the buffer local value of
'make-cursor-line-fully-visible' in 'after-change-major-mode-hook'.

martin

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Sat, 18 Jan 2025 09:18:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: luangruo <at> yahoo.com, martin rudalics <rudalics <at> gmx.at>
Cc: jporterbugs <at> gmail.com, ashton <at> wiersdorfmail.net, 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Sat, 18 Jan 2025 11:17:09 +0200
Ping!  Po Lu, any suggestions or comments?

> Date: Fri, 3 Jan 2025 09:55:50 +0100
> Cc: Eli Zaretskii <eliz <at> gnu.org>, luangruo <at> yahoo.com, jporterbugs <at> gmail.com,
>  74430 <at> debbugs.gnu.org
> From: martin rudalics <rudalics <at> gmx.at>
> 
>  > I'm curious: does anyone know what the rationale is for
>  > `pixel-scroll-precision-mode` setting this to `nil`? It doesn't seem
>  > like something that you'd want… Did this behavior change in Emacs 30?
> 
> Apparently.  AFAICT the rationale was to fix Bug#65214.  I think the two
> ways to handle that bug and the present one are:
> 
> - Add two new values for 'make-cursor-line-fully-visible', say 'always'
>    and 'never', a mode would not be permitted to override.
> 
> - Add a second customizable variable say
>    'pixel-scroll-precision-mode-make-cursor-line-fully-visible'
>    that would control the behavior.
> 
> More experienced users could also try to set the buffer local value of
> 'make-cursor-line-fully-visible' in 'after-change-major-mode-hook'.
> 
> martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Sat, 18 Jan 2025 09:38:02 GMT) Full text and rfc822 format available.

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

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: martin rudalics <rudalics <at> gmx.at>, ashton <at> wiersdorfmail.net,
 74430 <at> debbugs.gnu.org, jporterbugs <at> gmail.com
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Sat, 18 Jan 2025 17:36:55 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> Ping!  Po Lu, any suggestions or comments?
>
>> Date: Fri, 3 Jan 2025 09:55:50 +0100
>> Cc: Eli Zaretskii <eliz <at> gnu.org>, luangruo <at> yahoo.com, jporterbugs <at> gmail.com,
>>  74430 <at> debbugs.gnu.org
>> From: martin rudalics <rudalics <at> gmx.at>
>> 
>>  > I'm curious: does anyone know what the rationale is for
>>  > `pixel-scroll-precision-mode` setting this to `nil`? It doesn't seem
>>  > like something that you'd want… Did this behavior change in Emacs 30?
>> 
>> Apparently.  AFAICT the rationale was to fix Bug#65214.  I think the two
>> ways to handle that bug and the present one are:
>> 
>> - Add two new values for 'make-cursor-line-fully-visible', say 'always'
>>    and 'never', a mode would not be permitted to override.
>> 
>> - Add a second customizable variable say
>>    'pixel-scroll-precision-mode-make-cursor-line-fully-visible'
>>    that would control the behavior.
>> 
>> More experienced users could also try to set the buffer local value of
>> 'make-cursor-line-fully-visible' in 'after-change-major-mode-hook'.
>> 
>> martin

I think it would be the optimal solution to accept a value of
make-cursor-line-fully-visible that only applies to the next redisplay
after a pixel scrolling command is executed.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Sat, 18 Jan 2025 10:50:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Po Lu <luangruo <at> yahoo.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: jporterbugs <at> gmail.com, ashton <at> wiersdorfmail.net, 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Sat, 18 Jan 2025 11:49:32 +0100
> I think it would be the optimal solution to accept a value of
> make-cursor-line-fully-visible that only applies to the next redisplay
> after a pixel scrolling command is executed.

I think 'pixel-scroll-precision-mode' should make the cursor line fully
visible when (1) 'make-cursor-line-fully-visible' is non-nil and (2) the
cursor line is not "too" tall.  Where a cursor line might be too tall
when it is the only visible line in its window, for example.

I have no idea whether this could cause an irritating yo-yo effect where
redisplay always jumps between fully showing a nearly but not "too" tall
line and back - for example when resizing windows - but that would
remain to be seen.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74430; Package emacs. (Sat, 18 Jan 2025 12:06:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: luangruo <at> yahoo.com, jporterbugs <at> gmail.com, ashton <at> wiersdorfmail.net,
 74430 <at> debbugs.gnu.org
Subject: Re: bug#74430: 30.0.92; pixel-scroll-precision-mode hiding Eshell
 prompt after some commands
Date: Sat, 18 Jan 2025 14:05:32 +0200
> Date: Sat, 18 Jan 2025 11:49:32 +0100
> Cc: ashton <at> wiersdorfmail.net, jporterbugs <at> gmail.com, 74430 <at> debbugs.gnu.org
> From: martin rudalics <rudalics <at> gmx.at>
> 
>  > I think it would be the optimal solution to accept a value of
>  > make-cursor-line-fully-visible that only applies to the next redisplay
>  > after a pixel scrolling command is executed.
> 
> I think 'pixel-scroll-precision-mode' should make the cursor line fully
> visible when (1) 'make-cursor-line-fully-visible' is non-nil and (2) the
> cursor line is not "too" tall.  Where a cursor line might be too tall
> when it is the only visible line in its window, for example.

I think that instead of "too tall" the condition should be the
fraction of the cursor line that is visible.  For example, if the
cursor line is 80% visible, we could consider it "visible enough" for
this purpose.

So maybe make-cursor-line-fully-visible could also be a float number.




This bug report was last modified 207 days ago.

Previous Next


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