Subject: 29.0.50; image-mode buffer scrolled down automatically

From: Visuwesh <[email-masked]>
Date: Thu, 16 Jun 2022 09:31:14 +0530

image-mode buffers are scrolled down without user intervention sometimes
when another buffer content is updated.  I can reliably reproduce this
using eww.  To demonstrate,

    1. emacs -Q
    2. Visit attached image file.
    3. s o ;; to make the window show only some part of the image
    4. M->
    5. C-x 3 ;; split the frame into two windows
    6. M-s M-w search for something here RET
    7. C-x o ;; switch to the image-mode buffer
    8. Observe image-mode buffer moving to the beginning of image when
       the eww buffer gets updated with the webpage content.

(7,8) You have to be quick enough to switch back to the image-mode
buffer as otherwise, this behaviour is not seen.

By (2), I mean to say that the image should be large enough such that
only a part of the image is shown in the window, unlike what is seen
when you visit the file initially.

This does not happen only with eww but in other scenarios as well.  But
I am unable to reproduce this behaviour in those scenarios as they are a
lot more involved.

In GNU Emacs 29.0.50 (build 17, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
 of 2022-06-15 built on astatine
Repository revision: 112b6b8e37b5df268ced98c4354802275a4da417
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure --with-modules --with-sound=alsa --with-x-toolkit=lucid
 --with-json --without-xaw3d --without-gconf --without-libsystemd
 --with-x --without-cairo'

Configured features:
ACL DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XFT
XIM XINPUT2 XPM LUCID ZLIB

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

Major mode: Group

Minor modes in effect:
  shell-dirtrack-mode: t
  gnus-undo-mode: t
  eros-mode: t
  pdf-occur-global-minor-mode: t
  minibuffer-depth-indicate-mode: t
  repeat-mode: t
  display-time-mode: t
  display-battery-mode: t
  winner-mode: t
  delete-selection-mode: t
  straight-use-package-mode: t
  straight-package-neutering-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  undelete-frame-mode: t
  buffer-read-only: 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 dictionary dictionary-connection emacsbug rect org-datetree
org-capture doct shr-color lacarte icomplete vc-backup log-view
pcvs-util vc pulse color vc-git vc-dispatcher bug-reference dabbrev
sh-script smie executable help-fns radix-tree ecomplete qp flyspell
ispell org-pdftools pdf-annot facemenu org-noter goto-addr org-element
avl-tree generator ob-C cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs ob-shell shell ob-racket
async ob-async cdlatex texmathp ol-eww eww xdg url-queue mm-url ol-rmail
ol-mhe ol-irc ol-info ol-gnus nnselect ol-docview doc-view ol-bibtex
ol-bbdb ol-w3m ol-doi org-link-doi org-tempo tempo org-id org-refile
ol-man org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-footnote org-src ob-comint org-pcomplete pcomplete org-list
org-faces org-entities noutline outline org-version ob-emacs-lisp
ob-core ob-eval org-table oc-basic bibtex ol org-keys oc org-compat
org-macs org-loaddefs smerge-mode diff diff-mode mule-util flow-fill
mm-archive gnus-fun sort gnus-cite mail-extr textsec uni-scripts
idna-mapping ucs-normalize uni-confusable textsec-check gnus-async
gnus-bcklg gnus-ml network-stream nsm nndraft nnmh nnfolder nnmaildir
nnagent nnml nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual
gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig nntp
gnus-cache gnus-sum shr pixel-fill kinsoku url-file url-dired svg dom
gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail
mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int
gnus-range message sendmail yank-media rmc puny rfc822 mml mml-sec epa
epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus
nnheader gnus-util mail-utils range mm-util mail-prsvr face-remap
misearch multi-isearch tabify man cursor-sensor server paredit edmacro
kmacro eros time-date checkdoc lisp-mnt flymake-proc flymake project
warnings thingatpt wordel-autoloads sokoban-autoloads ement-autoloads
ts-autoloads svg-lib-autoloads taxy-magit-section-autoloads
taxy-autoloads plz-autoloads nov-autoloads esxml-autoloads kv-autoloads
transmission-autoloads lua-mode-autoloads nix-mode-autoloads
magit-section-autoloads dash-autoloads racket-mode-autoloads
eros-autoloads flymake-shellcheck-autoloads writegood-mode-autoloads
siege-mode-autoloads paredit-autoloads puni-autoloads
expand-region-autoloads filladapt-autoloads compose quail
scroll-other-window org-pdftools-autoloads org-noter-autoloads
change-env-autoloads math-delimiters-autoloads doct-autoloads
ob-async-autoloads async-autoloads emacs-ob-racket-autoloads
valign-autoloads org-starless-autoloads cdlatex-autoloads
auctex-autoloads tex-site pdf-occur ibuf-ext ibuffer ibuffer-loaddefs
tablist advice tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local cedet pdf-isearch
let-alist pdf-misc imenu pdf-tools package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source eieio eieio-core eieio-loaddefs json map url-vars compile
comint ansi-color cus-edit hl-todo edebug debug backtrace find-func
wid-edit pdf-view password-cache jka-compr pdf-cache pdf-info tq
pdf-util pdf-macs image-mode dired-x dired dired-loaddefs exif
pdf-tools-autoloads tablist-autoloads mb-depth repeat
visual-fill-autoloads olivetti-autoloads hl-todo-autoloads time
format-spec battery dbus filenotify xml disp-table lacarte-autoloads
shell-command-plus-autoloads winner derived delsel cus-load easy-mmode
avy ring avy-autoloads vc-backup-autoloads icalendar diary-lib
diary-loaddefs cal-menu calendar cal-loaddefs rx filecache
flymake-grammarly-autoloads grammarly-autoloads websocket-autoloads
finder-inf request-autoloads s-autoloads chemtable-autoloads
molar-mass-autoloads saveplace-pdf-view saveplace bookmark
text-property-search pp saveplace-pdf-view-autoloads pcase
straight-autoloads info cl-seq cl-extra help-mode seq byte-opt straight
subr-x cl-macs gv cl-loaddefs cl-lib bytecomp byte-compile cconv
vz-nh-theme vz-options-theme iso-transl tooltip 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 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 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 dynamic-setting system-font-setting
font-render-setting x-toolkit xinput2 x multi-tty make-network-process
emacs)

Memory information:
((conses 16 669053 130341) (symbols ?0 36912 13) (strings 32 181064 19196) (string-bytes 1 5941597)
 (vectors 16
          100406) (vector-slots 8 2012397 208881) (floats 8 614 566) (intervals ?8 45133 1478) (buffers 992 37))