GNU bug report logs - #70041
30.0.50; mouse-autoselect-window causes unexpected scroll

Previous Next

Package: emacs;

Reported by: Deric Bytes <dericbytes <at> gmail.com>

Date: Wed, 27 Mar 2024 23:17:01 UTC

Severity: normal

Tags: unreproducible

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 70041 in the body.
You can then email your comments to 70041 AT debbugs.gnu.org in the normal way.

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#70041; Package emacs. (Wed, 27 Mar 2024 23:17:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Deric Bytes <dericbytes <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 27 Mar 2024 23:17:01 GMT) Full text and rfc822 format available.

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

From: Deric Bytes <dericbytes <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; mouse-autoselect-window causes unexpected scroll
Date: Wed, 27 Mar 2024 23:16:26 +0000
[Message part 1 (text/plain, inline)]
Expected behavour:

Run the code below in emacs -Q.  The 'my-buf' buffer should be showing
the start of the buffer with contents of directory listing.


Actual behaviour:

The buffer appears empty, until buffer interaction. Page has scrolled to
end and
content dissappeared from sight even though the whole content can fit into
the buffer.

The expected behaviour happens when `mouse-autoselect-window' has it's
default setting.



(setq mouse-autoselect-window 0.1)

(let ((shell-cmd "ls -la")
      (output-buffer "my-buf")
      (default-directory "/scpx:bangmyhead <at> 192.168.0.46:")
      (shell-program "/usr/bin/bash")
      (process-name "my-proc"))
  (start-file-process process-name (get-buffer-create output-buffer)
         shell-program  "-c" shell-cmd)
  (switch-to-buffer output-buffer)
  (with-current-buffer output-buffer
    (goto-char (point-min))
    (find-file-other-window "ooo")))




In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.37, cairo version 1.16.0) of 2023-05-13 built on no-control-x1c
Repository revision: 7791907c3852e6ec197352e1c3d3dd8487cc04f5
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
System Description: Ubuntu 23.10

Configured using:
 'configure --with-tree-sitter --with-mailutils --with-json
 --with-xwidgets --with-modules --with-imagemagick
 --prefix=/home/no-control/installs --bindir=/home/no-control/bin
 --with-native-compilation=no --with-xft'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ IMAGEMAGICK
JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM XWIDGETS
GTK3 ZLIB

Important settings:
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-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
  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 epa derived epg rfc6068 epg-config
gnus-util text-property-search mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils thai-util thai-word mule-util
lao-util enriched disp-table facemenu view thingatpt vc-hg vc-git
diff-mode easy-mmode vc-bzr vc-dispatcher tramp-cmds tramp-cache
time-stamp tramp-sh tramp rx tramp-loaddefs trampver tramp-integration
files-x tramp-compat xdg shell pcomplete comint ansi-osc ansi-color ring
parse-time iso8601 ls-lisp format-spec auth-source cl-seq eieio
eieio-core cl-macs password-cache json map time-date subr-x help-fns
radix-tree cl-print byte-opt debug backtrace help-mode find-func
use-package-core cl-loaddefs cl-lib bytecomp byte-compile chemacs gv 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 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 inotify lcms2 dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit
xinput2 x multi-tty make-network-process emacs)

Memory information:
((conses 16 175970 15742)
 (symbols 48 10757 0)
 (strings 32 35076 2527)
 (string-bytes 1 1130443)
 (vectors 16 22552)
 (vector-slots 8 345228 14831)
 (floats 8 64 75)
 (intervals 56 866 6)
 (buffers 984 18))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70041; Package emacs. (Thu, 28 Mar 2024 06:54:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Deric Bytes <dericbytes <at> gmail.com>
Cc: 70041 <at> debbugs.gnu.org
Subject: Re: bug#70041: 30.0.50;
 mouse-autoselect-window causes unexpected scroll
Date: Thu, 28 Mar 2024 08:53:45 +0200
> From: Deric Bytes <dericbytes <at> gmail.com>
> Date: Wed, 27 Mar 2024 23:16:26 +0000
> 
> Expected behavour:
> 
> Run the code below in emacs -Q.  The 'my-buf' buffer should be showing 
> the start of the buffer with contents of directory listing.
> 
> Actual behaviour:
> 
> The buffer appears empty, until buffer interaction. Page has scrolled to end and 
> content dissappeared from sight even though the whole content can fit into the buffer.
> 
> The expected behaviour happens when `mouse-autoselect-window' has it's
> default setting.

I cannot reproduce this here, FWIW.  I get the expected behavior
without any "buffer interaction".  But I'm not using the GTK+ build of
Emacs, and I did need to modify the recipe to use a remote directory I
can actually access (instead of "/scpx:bangmyhead <at> 192.168.0.46:"), and
used start-file-process-shell-command to avoid the need to specify the
shell's file name explicitly.  Here's the recipe I tested:

  (let ((shell-cmd "ls -la")
	(output-buffer "my-buf")
	(default-directory <REDACTED>)
	(process-name "my-proc"))
    (start-file-process-shell-command
     process-name
     (get-buffer-create output-buffer)
     shell-cmd)
    (switch-to-buffer output-buffer)
    (with-current-buffer output-buffer
      (goto-char (point-min))
      (find-file-other-window "ooo")))

With the above recipe, I see the end of the listing (which is longer
than the window in my case).  This is what I'd expect.

Can someone who uses the GTK build of the master branch reproduce the
problematic behavior?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70041; Package emacs. (Thu, 28 Mar 2024 11:51:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Deric Bytes <dericbytes <at> gmail.com>, martin rudalics <rudalics <at> gmx.at>
Cc: 70041 <at> debbugs.gnu.org
Subject: Re: bug#70041: 30.0.50;
 mouse-autoselect-window causes unexpected scroll
Date: Thu, 28 Mar 2024 13:50:31 +0200
[Please use Reply All to reply, to keep the bug tracker CC'ed.]

> From: Deric Bytes <dericbytes <at> gmail.com>
> Date: Thu, 28 Mar 2024 10:55:33 +0000
> 
> Eli, I tried with your code and I could not reproduce it. I tried my code and could not reproduce it. I tried
> restarting emacs -q multiple times and I got the problem again whilst tweaking but I can not create a case that
> reproduces every time. 
> 
> I always get it in my main config but that contains so much code and the code was written when I was totally
> clueless and has been causing me problems for ages. I am happy to build with something other than GTK and
> see if that fixes my main emacs config. What do you recommend?  

Sorry, I don't know what to recommend.  You could try some other
toolkit, like Lucid, or maybe no toolkit at all.

Martin, any ideas for how to reproduce this, or maybe what could be
the problem?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70041; Package emacs. (Thu, 28 Mar 2024 12:00:02 GMT) Full text and rfc822 format available.

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

From: Deric Bytes <dericbytes <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: martin rudalics <rudalics <at> gmx.at>, 70041 <at> debbugs.gnu.org
Subject: Re: bug#70041: 30.0.50;
 mouse-autoselect-window causes unexpected scroll
Date: Thu, 28 Mar 2024 11:58:55 +0000
[Message part 1 (text/plain, inline)]
[Sorry if duplicate, just saw message in last email that I should reply to
All]

I have a reproducable example.

-  `mouse-autoselect-window' does not make a difference.
-  need a tilda in the address
- need to be in full screen

emacs -q -mm -l test.el


  (let ((shell-cmd "ls -la")
        (output-buffer "my-buf")
        (default-directory "/scpx:bangmyhead <at> 192.168.0.46:~")
        (process-name "my-proc"))
    (start-file-process-shell-command
     process-name
     (get-buffer-create output-buffer)
     shell-cmd)
    (switch-to-buffer output-buffer)
    (with-current-buffer output-buffer
      (goto-char (point-min))
      (find-file-other-window "ooo")))

On Thu, 28 Mar 2024 at 11:50, Eli Zaretskii <eliz <at> gnu.org> wrote:

> [Please use Reply All to reply, to keep the bug tracker CC'ed.]
>
> > From: Deric Bytes <dericbytes <at> gmail.com>
> > Date: Thu, 28 Mar 2024 10:55:33 +0000
> >
> > Eli, I tried with your code and I could not reproduce it. I tried my
> code and could not reproduce it. I tried
> > restarting emacs -q multiple times and I got the problem again whilst
> tweaking but I can not create a case that
> > reproduces every time.
> >
> > I always get it in my main config but that contains so much code and the
> code was written when I was totally
> > clueless and has been causing me problems for ages. I am happy to build
> with something other than GTK and
> > see if that fixes my main emacs config. What do you recommend?
>
> Sorry, I don't know what to recommend.  You could try some other
> toolkit, like Lucid, or maybe no toolkit at all.
>
> Martin, any ideas for how to reproduce this, or maybe what could be
> the problem?
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70041; Package emacs. (Thu, 28 Mar 2024 12:22:02 GMT) Full text and rfc822 format available.

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

From: Deric Bytes <dericbytes <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: martin rudalics <rudalics <at> gmx.at>, 70041 <at> debbugs.gnu.org
Subject: Re: bug#70041: 30.0.50;
 mouse-autoselect-window causes unexpected scroll
Date: Thu, 28 Mar 2024 12:20:50 +0000
[Message part 1 (text/plain, inline)]
I have the same problem with lucid.

On Thu, 28 Mar 2024 at 11:58, Deric Bytes <dericbytes <at> gmail.com> wrote:

> [Sorry if duplicate, just saw message in last email that I should reply to
> All]
>
> I have a reproducable example.
>
> -  `mouse-autoselect-window' does not make a difference.
> -  need a tilda in the address
> - need to be in full screen
>
> emacs -q -mm -l test.el
>
>
>   (let ((shell-cmd "ls -la")
>         (output-buffer "my-buf")
>         (default-directory "/scpx:bangmyhead <at> 192.168.0.46:~")
>         (process-name "my-proc"))
>     (start-file-process-shell-command
>      process-name
>      (get-buffer-create output-buffer)
>      shell-cmd)
>     (switch-to-buffer output-buffer)
>     (with-current-buffer output-buffer
>       (goto-char (point-min))
>       (find-file-other-window "ooo")))
>
> On Thu, 28 Mar 2024 at 11:50, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> [Please use Reply All to reply, to keep the bug tracker CC'ed.]
>>
>> > From: Deric Bytes <dericbytes <at> gmail.com>
>> > Date: Thu, 28 Mar 2024 10:55:33 +0000
>> >
>> > Eli, I tried with your code and I could not reproduce it. I tried my
>> code and could not reproduce it. I tried
>> > restarting emacs -q multiple times and I got the problem again whilst
>> tweaking but I can not create a case that
>> > reproduces every time.
>> >
>> > I always get it in my main config but that contains so much code and
>> the code was written when I was totally
>> > clueless and has been causing me problems for ages. I am happy to build
>> with something other than GTK and
>> > see if that fixes my main emacs config. What do you recommend?
>>
>> Sorry, I don't know what to recommend.  You could try some other
>> toolkit, like Lucid, or maybe no toolkit at all.
>>
>> Martin, any ideas for how to reproduce this, or maybe what could be
>> the problem?
>>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70041; Package emacs. (Thu, 28 Mar 2024 13:16:01 GMT) Full text and rfc822 format available.

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

From: Deric Bytes <dericbytes <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: martin rudalics <rudalics <at> gmx.at>, 70041 <at> debbugs.gnu.org
Subject: Re: bug#70041: 30.0.50;
 mouse-autoselect-window causes unexpected scroll
Date: Thu, 28 Mar 2024 13:15:32 +0000
[Message part 1 (text/plain, inline)]
Using the code below,

I noticed it works the first time.

emacs -q -mm -l test.el

I do M-x save-buffers-kill-terminal

then run

emacs -q -mm -l test.el

it has the described problem.

If I repeat this sequence, it works then does not work in that order every
time.

(let ((shell-cmd "ls -la")
      (output-buffer "my-buf")
      (default-directory "/scpx:bangmyhead <at> 192.168.0.46:~/")
      (process-name "my-proc"))
  (start-file-process-shell-command
   process-name
   (get-buffer-create output-buffer)
   shell-cmd)
  (switch-to-buffer output-buffer)
  (with-current-buffer output-buffer
    (goto-char (point-min))
    (find-file-other-window "~/readme.org")))


note: the other window opens horizontally.


On Thu, 28 Mar 2024 at 12:20, Deric Bytes <dericbytes <at> gmail.com> wrote:

> I have the same problem with lucid.
>
> On Thu, 28 Mar 2024 at 11:58, Deric Bytes <dericbytes <at> gmail.com> wrote:
>
>> [Sorry if duplicate, just saw message in last email that I should reply
>> to All]
>>
>> I have a reproducable example.
>>
>> -  `mouse-autoselect-window' does not make a difference.
>> -  need a tilda in the address
>> - need to be in full screen
>>
>> emacs -q -mm -l test.el
>>
>>
>>   (let ((shell-cmd "ls -la")
>>         (output-buffer "my-buf")
>>         (default-directory "/scpx:bangmyhead <at> 192.168.0.46:~")
>>         (process-name "my-proc"))
>>     (start-file-process-shell-command
>>      process-name
>>      (get-buffer-create output-buffer)
>>      shell-cmd)
>>     (switch-to-buffer output-buffer)
>>     (with-current-buffer output-buffer
>>       (goto-char (point-min))
>>       (find-file-other-window "ooo")))
>>
>> On Thu, 28 Mar 2024 at 11:50, Eli Zaretskii <eliz <at> gnu.org> wrote:
>>
>>> [Please use Reply All to reply, to keep the bug tracker CC'ed.]
>>>
>>> > From: Deric Bytes <dericbytes <at> gmail.com>
>>> > Date: Thu, 28 Mar 2024 10:55:33 +0000
>>> >
>>> > Eli, I tried with your code and I could not reproduce it. I tried my
>>> code and could not reproduce it. I tried
>>> > restarting emacs -q multiple times and I got the problem again whilst
>>> tweaking but I can not create a case that
>>> > reproduces every time.
>>> >
>>> > I always get it in my main config but that contains so much code and
>>> the code was written when I was totally
>>> > clueless and has been causing me problems for ages. I am happy to
>>> build with something other than GTK and
>>> > see if that fixes my main emacs config. What do you recommend?
>>>
>>> Sorry, I don't know what to recommend.  You could try some other
>>> toolkit, like Lucid, or maybe no toolkit at all.
>>>
>>> Martin, any ideas for how to reproduce this, or maybe what could be
>>> the problem?
>>>
>>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70041; Package emacs. (Thu, 28 Mar 2024 14:42:02 GMT) Full text and rfc822 format available.

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

From: Deric Bytes <dericbytes <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: martin rudalics <rudalics <at> gmx.at>, 70041 <at> debbugs.gnu.org
Subject: Re: bug#70041: 30.0.50;
 mouse-autoselect-window causes unexpected scroll
Date: Thu, 28 Mar 2024 14:40:59 +0000
[Message part 1 (text/plain, inline)]
emacs -q -mm -l test.el

I create a profile report for the following code when it did not work as
expected

(setq inhibit-startup-message t)
(setq initial-scratch-message nil)

(defun test()
  (let ((shell-cmd "ls -la")
(output-buffer "my-buf")
(default-directory "/scpx:bangmyhead <at> 192.168.0.46:~/")
(process-name "my-proc"))
    (start-file-process-shell-command
     process-name
     (get-buffer-create output-buffer)
     shell-cmd)
    (switch-to-buffer output-buffer)
    (with-current-buffer output-buffer
      (goto-char (point-min))
      (find-file-other-window "~/readme"))))

(require 'profiler)
(profiler-reset)
(profiler-start 'cpu+mem)
(test)
[Message part 2 (text/html, inline)]
[cpu-report (application/octet-stream, attachment)]
[memory-report (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70041; Package emacs. (Thu, 28 Mar 2024 14:46:02 GMT) Full text and rfc822 format available.

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

From: Deric Bytes <dericbytes <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: martin rudalics <rudalics <at> gmx.at>, 70041 <at> debbugs.gnu.org
Subject: Re: bug#70041: 30.0.50;
 mouse-autoselect-window causes unexpected scroll
Date: Thu, 28 Mar 2024 14:44:50 +0000
[Message part 1 (text/plain, inline)]
Here is the correct profile memory report

On Thu, 28 Mar 2024 at 14:40, Deric Bytes <dericbytes <at> gmail.com> wrote:

> emacs -q -mm -l test.el
>
> I create a profile report for the following code when it did not work as
> expected
>
> (setq inhibit-startup-message t)
> (setq initial-scratch-message nil)
>
> (defun test()
>   (let ((shell-cmd "ls -la")
> (output-buffer "my-buf")
> (default-directory "/scpx:bangmyhead <at> 192.168.0.46:~/")
> (process-name "my-proc"))
>     (start-file-process-shell-command
>      process-name
>      (get-buffer-create output-buffer)
>      shell-cmd)
>     (switch-to-buffer output-buffer)
>     (with-current-buffer output-buffer
>       (goto-char (point-min))
>       (find-file-other-window "~/readme"))))
>
> (require 'profiler)
> (profiler-reset)
> (profiler-start 'cpu+mem)
> (test)
>
>
>
>
>
>
[Message part 2 (text/html, inline)]
[mem-report (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70041; Package emacs. (Fri, 29 Mar 2024 08:44:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>, Deric Bytes <dericbytes <at> gmail.com>
Cc: 70041 <at> debbugs.gnu.org
Subject: Re: bug#70041: 30.0.50; mouse-autoselect-window causes unexpected
 scroll
Date: Fri, 29 Mar 2024 09:43:19 +0100
> Martin, any ideas for how to reproduce this, or maybe what could be
> the problem?

No idea.  Some random thoughts only:

- 'mouse-autoselect-window' should not be related as long as the mouse
  is not moved.

- If text is inserted asynchronously, window point will stay after that
  text and, to make sure that point remains visible, Emacs scrolls the
  window.

- Does changing 'scroll-margin', 'scroll-conservatively',
  'scroll-down-aggressively' or 'scroll-up-aggressively' change anything
  in the behavior?

- Maybe putting something on 'window-scroll-functions' could tell what
  happened.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70041; Package emacs. (Fri, 29 Mar 2024 16:54:01 GMT) Full text and rfc822 format available.

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

From: Deric Bytes <dericbytes <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 70041 <at> debbugs.gnu.org
Subject: Re: bug#70041: 30.0.50;
 mouse-autoselect-window causes unexpected scroll
Date: Fri, 29 Mar 2024 16:52:45 +0000
[Message part 1 (text/plain, inline)]
I changed the variables they do not seem to make a difference. The page is
still scrolled out of view

     (with-current-buffer output-buffer
      (setq scroll-margin 30)
      (setq scroll-conservatively 30)
      (setq scroll-down-aggressively 0.5)
      (setq scroll-up-aggressively 0.5)

What would you like me to test for on the window-scroll-hooks?


-pre start-file-process-shell-command
-time 16:50:54


-start-file-process-shell-command called
-time 16:50:55


  shell-ouput-buf
  POS: 1
  time: 16:50:55


-switched to shell-ouput-buf
-time 16:50:55


-inside with-current-buffer - pre go to point min
-time 16:50:55


-pre find-file-other-window
-time 16:50:55


  shell-ouput-buf
  POS: 1
  time: 16:50:55


  shell-ouput-buf
  POS: 1
  time: 16:50:55


  readme
  POS: 1
  time: 16:50:55


-post find-file-other-window
-time 16:50:55


-test code end
-time 16:50:55


  shell-ouput-buf
  POS: 5237
  time: 16:50:55


  shell-ouput-buf
  POS: 5237
  time: 16:50:57
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70041; Package emacs. (Fri, 29 Mar 2024 17:48:01 GMT) Full text and rfc822 format available.

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

From: Deric Bytes <dericbytes <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 70041 <at> debbugs.gnu.org
Subject: Re: bug#70041: 30.0.50;
 mouse-autoselect-window causes unexpected scroll
Date: Fri, 29 Mar 2024 17:47:07 +0000
[Message part 1 (text/plain, inline)]
I tried it in terminal and it still shows blank buffer until I switch to
the buffer and press up.

emacs -q -nw -mm -l test.el

even when I switch-to-buffer from the other window, to make it open on both
splits, it appears empty

point is on point-max, and on line 74
last text is on line 73
line 74 has just one white space char
point-max is on first line of buffer, mode-line says line 74
[Message part 2 (text/html, inline)]

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

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

From: martin rudalics <rudalics <at> gmx.at>
To: Deric Bytes <dericbytes <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 70041 <at> debbugs.gnu.org
Subject: Re: bug#70041: 30.0.50; mouse-autoselect-window causes unexpected
 scroll
Date: Sat, 30 Mar 2024 10:37:40 +0100
> What would you like me to test for on the window-scroll-hooks?

Let's start with

(defun foo (window start)
  "..."
  (with-current-buffer (get-buffer-create "*foo*")
    (let* ((buffer (window-buffer window))
	   (max (with-current-buffer buffer (point-max))))
      (insert (format "window %s start %s point %s point-max %s\n"
		      window start (window-point window) max)))))

(add-hook 'window-scroll-functions 'foo)

I suppose the problem you see is with windows where the value of 'point'
is not that of 'point-max'.  Let's find such a window in the buffer
*foo* first.

Thanks, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70041; Package emacs. (Tue, 02 Apr 2024 19:31:03 GMT) Full text and rfc822 format available.

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

From: Deric Bytes <dericbytes <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 70041 <at> debbugs.gnu.org
Subject: Re: bug#70041: 30.0.50;
 mouse-autoselect-window causes unexpected scroll
Date: Tue, 2 Apr 2024 20:30:26 +0100
[Message part 1 (text/plain, inline)]
I can no longer reproduce this error.

I suddenly started getting a stack smash (emacs 30.0.50) when opening
tsx-ts-mode. I installed apt-get emacs 29.1 and had the same problem.

I deleted all traces of emacs and tree-sitter from my machine. I installed
from the latest source.

Everything works great, both with GTK and Lucid toolkits.

Thanks for your help.

On Sat, 30 Mar 2024 at 09:37, martin rudalics <rudalics <at> gmx.at> wrote:

>  > What would you like me to test for on the window-scroll-hooks?
>
> Let's start with
>
> (defun foo (window start)
>    "..."
>    (with-current-buffer (get-buffer-create "*foo*")
>      (let* ((buffer (window-buffer window))
>            (max (with-current-buffer buffer (point-max))))
>        (insert (format "window %s start %s point %s point-max %s\n"
>                       window start (window-point window) max)))))
>
> (add-hook 'window-scroll-functions 'foo)
>
> I suppose the problem you see is with windows where the value of 'point'
> is not that of 'point-max'.  Let's find such a window in the buffer
> *foo* first.
>
> Thanks, martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#70041; Package emacs. (Sat, 06 Apr 2024 10:24:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Deric Bytes <dericbytes <at> gmail.com>
Cc: rudalics <at> gmx.at, 70041 <at> debbugs.gnu.org
Subject: Re: bug#70041: 30.0.50;
 mouse-autoselect-window causes unexpected scroll
Date: Sat, 06 Apr 2024 13:23:05 +0300
tags 70041 unreproducible
close 70041
thanks

> From: Deric Bytes <dericbytes <at> gmail.com>
> Date: Tue, 2 Apr 2024 20:30:26 +0100
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 70041 <at> debbugs.gnu.org
> 
> I can no longer reproduce this error.
> 
> I suddenly started getting a stack smash (emacs 30.0.50) when opening tsx-ts-mode. I installed apt-get emacs
> 29.1 and had the same problem.
> 
> I deleted all traces of emacs and tree-sitter from my machine. I installed from the latest source.
> 
> Everything works great, both with GTK and Lucid toolkits.
> 
> Thanks for your help.

Thanks, I'm therefore closing this bug as not reproducible.  If it
comes back, we can reopen.




Added tag(s) unreproducible. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 06 Apr 2024 10:24:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 70041 <at> debbugs.gnu.org and Deric Bytes <dericbytes <at> gmail.com> Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 06 Apr 2024 10:24:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 04 May 2024 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified today.

Previous Next


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