Subject: bug#70579: 30.0.50; gnus: Wrong unread count in the Group buffer

From: James Thomas <[email-masked]>
Date: Fri, 26 Apr 2024 09:02:35 +0530

- (Preferably starting with an empty drafts folder) Compose a message
  and save it.
- Open the drafts group, press e on the message and then kill the new
  buffer; then (incidentally, if you now do '/ N' then this bug does not
  arise) delete the message (B DEL)
- Press q
- The message count is wrong (but can be corrected with M-g)

cf. In gnus.general (gnus-summary-goto-article "[email-masked]")

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.33, cairo version 1.16.0) of 2024-03-19 built on
 user-Inspiron-15-5518
Repository revision: 88355de6022458c3e890cc6d5da60d6f35fe8868
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Ubuntu 22.04.3 LTS

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ 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 GTK3 ZLIB

Important settings:
  value of $LANG: en_IN
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: iso-latin-1-unix

Major mode: Summary

Minor modes in effect:
  buffer-face-mode: t
  hl-line-mode: t
  display-time-mode: t
  desktop-environment-mode: t
  server-mode: t
  recentf-mode: t
  erc-track-mode: t
  erc-ring-mode: t
  erc-netsplit-mode: t
  erc-menu-mode: t
  erc-match-mode: t
  erc-log-mode: t
  erc-list-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-autojoin-mode: t
  midnight-mode: t
  icomplete-mode: t
  fido-mode: t
  erc-networks-mode: t
  display-battery-mode: t
  override-global-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
  buffer-read-only: 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:
~/.emacs.d/lisp/lexic hides /home/user/.emacs.d/elpa/lexic-0.0.1/lexic
/home/user/.emacs.d/elpa/bind-key-20230203.2004/bind-key hides /home/user/code/emacs-master/lisp/bind-key
/home/user/.emacs.d/elpa/transient-20231205.1848/transient hides /home/user/code/emacs-master/lisp/transient
/home/user/.emacs.d/elpa/use-package-20230203.2004/use-package-jump hides /home/user/code/emacs-master/lisp/use-package/use-package-jump
/home/user/.emacs.d/elpa/use-package-20230203.2004/use-package-ensure hides /home/user/code/emacs-master/lisp/use-package/use-package-ensure
/home/user/.emacs.d/elpa/use-package-20230203.2004/use-package-lint hides /home/user/code/emacs-master/lisp/use-package/use-package-lint
/home/user/.emacs.d/elpa/use-package-20230203.2004/use-package-core hides /home/user/code/emacs-master/lisp/use-package/use-package-core
/home/user/.emacs.d/elpa/use-package-20230203.2004/use-package hides /home/user/code/emacs-master/lisp/use-package/use-package
/home/user/.emacs.d/elpa/use-package-20230203.2004/use-package-delight hides /home/user/code/emacs-master/lisp/use-package/use-package-delight
/home/user/.emacs.d/elpa/use-package-20230203.2004/use-package-bind-key hides /home/user/code/emacs-master/lisp/use-package/use-package-bind-key
/home/user/.emacs.d/elpa/use-package-20230203.2004/use-package-diminish hides /home/user/code/emacs-master/lisp/use-package/use-package-diminish
/home/user/.emacs.d/elpa/ox-odt-9.6.620/ox-odt hides /home/user/code/emacs-master/lisp/org/ox-odt
~/code/tramp/lisp/tramp-uu hides /home/user/code/emacs-master/lisp/net/tramp-uu
~/code/tramp/lisp/tramp-rclone hides /home/user/code/emacs-master/lisp/net/tramp-rclone
~/code/tramp/lisp/tramp-gvfs hides /home/user/code/emacs-master/lisp/net/tramp-gvfs
~/code/tramp/lisp/tramp-integration hides /home/user/code/emacs-master/lisp/net/tramp-integration
~/code/tramp/lisp/tramp-container hides /home/user/code/emacs-master/lisp/net/tramp-container
~/code/tramp/lisp/tramp-sh hides /home/user/code/emacs-master/lisp/net/tramp-sh
~/code/tramp/lisp/tramp-sshfs hides /home/user/code/emacs-master/lisp/net/tramp-sshfs
~/code/tramp/lisp/tramp hides /home/user/code/emacs-master/lisp/net/tramp
~/code/tramp/lisp/tramp-sudoedit hides /home/user/code/emacs-master/lisp/net/tramp-sudoedit
~/code/tramp/lisp/tramp-message hides /home/user/code/emacs-master/lisp/net/tramp-message
~/code/tramp/lisp/tramp-androidsu hides /home/user/code/emacs-master/lisp/net/tramp-androidsu
~/code/tramp/lisp/trampver hides /home/user/code/emacs-master/lisp/net/trampver
~/code/tramp/lisp/tramp-archive hides /home/user/code/emacs-master/lisp/net/tramp-archive
~/code/tramp/lisp/tramp-fuse hides /home/user/code/emacs-master/lisp/net/tramp-fuse
~/code/tramp/lisp/tramp-adb hides /home/user/code/emacs-master/lisp/net/tramp-adb
~/code/tramp/lisp/tramp-crypt hides /home/user/code/emacs-master/lisp/net/tramp-crypt
~/code/tramp/lisp/tramp-compat hides /home/user/code/emacs-master/lisp/net/tramp-compat
~/code/tramp/lisp/tramp-cmds hides /home/user/code/emacs-master/lisp/net/tramp-cmds
~/code/tramp/lisp/tramp-cache hides /home/user/code/emacs-master/lisp/net/tramp-cache
~/code/tramp/lisp/tramp-ftp hides /home/user/code/emacs-master/lisp/net/tramp-ftp
~/code/tramp/lisp/tramp-smb hides /home/user/code/emacs-master/lisp/net/tramp-smb
~/code/tramp/lisp/tramp-loaddefs hides /home/user/code/emacs-master/lisp/net/tramp-loaddefs

Features:
(shadow emacsbug qp bbdb-message proced mpv tq org-timer org-clock
org-indent reddigg ht request promise promise-rejection-tracking
promise-finally promise-done promise-es6-extensions promise-core
ind-util quail rect pcmpl-unix tramp-adb deeper-blue-theme package-vc
ffap ellama cus-start spinner ellama-autoloads llm-gpt4all llm-ollama
llm-gemini llm-fake ert llm-openai llm-vertex llm-provider-utils
llm-request llm llm-autoloads warnings spinner-autoloads loaddefs-gen
tar-mode arc-mode archive-mode lisp-mnt org-element org-persist org-id
org-refile avl-tree oc-basic ol-w3m ol-mhe ol-irc ol-info ol-gnus
nnselect ol-eww ol-docview doc-view filenotify jka-compr image-mode exif
ol-bibtex bibtex ol-bbdb org org-macro org-pcomplete org-list
org-footnote org-faces org-entities noutline outline org-version
ob-shell ob-dot ob-R ob-python ob ob-tangle org-src ob-ref ob-lob
ob-table ob-exp ob-comint ob-emacs-lisp ob-core ob-eval org-cycle
org-table ol org-fold org-fold-core org-keys oc org-loaddefs org-compat
org-macs sh-script smie executable etags fileloop info-look lpr debug
backtrace magit-base magit-section dash tabify imenu man em-rebind
em-smart em-tramp pulse xref wgrep find-dired grep bug-reference
find-func shortdoc comp-common help-fns radix-tree apropos tramp-cmds
tramp-cache time-stamp tramp-sh dired-aux em-unix em-term term ehelp
em-script em-prompt em-pred em-ls em-hist em-glob em-extpipe
em-elecslash em-cmpl em-dirs em-basic em-banner em-alias esh-mode
esh-var eshell esh-cmd generator esh-ext esh-opt esh-proc esh-io esh-arg
esh-module esh-groups esh-util vc-hg vc-git diff-mode vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs vc-dir ewoc sort gnus-cite smiley mail-extr
gnus-async gnus-bcklg face-remap gnus-ml hl-line disp-table nnrss
mm-archive nnatom nnfeed utf-7 epa-file nnagent nnml cursor-sensor
nndraft nnmh nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual
gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig nntp
gnus-cache gnus-sum gnus-group gnus-undo bbdb-gnus bbdb-mua bbdb-com crm
bbdb bbdb-site timezone auth-source-xoauth2 auth-source-pass smtpmail
gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo
gnus-spec gnus-int gnus-range message sendmail yank-media dired
dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode
mm-bodies mm-encode mailabbrev gmm-utils mailheader gnus-win cl-print
display-line-numbers timer-list hippie-exp shr-color color textsec
uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check
gnutls network-stream url-http mail-parse rfc2231 rfc2047 rfc2045
ietf-drums url-gw nsm url-cache url-auth mule-util eww-history-ext
derived eww-history-ext-dyn eww url-queue shr pixel-fill kinsoku
url-file svg dom puny mm-url gnus nnheader gnus-util mail-utils range
mm-util mail-prsvr thingatpt compile text-property-search python project
treesit inheritenv buffer-env misearch multi-isearch vc-backup log-view
pcvs-util vc vc-dispatcher diff time diary-lib diary-loaddefs cal-menu
calendar cal-loaddefs keychain-environment exwm-ns cus-edit pp icons
tramp trampver tramp-integration files-x tramp-message tramp-compat xdg
parse-time iso8601 tramp-loaddefs rx native-complete shell edmacro
desktop-environment exwm-systemtray xcb-systemtray xcb-xembed exwm
exwm-input xcb-keysyms xcb-xkb exwm-manage exwm-floating xcb-cursor
xcb-render exwm-layout exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb
xcb-xproto xcb-types xcb-debug kmacro server cl-extra help-mode advice
recentf tree-widget erc-track erc-ring erc-netsplit erc-menu erc-match
erc-log erc-list erc-goodies erc-pcomplete time-date pcomplete comint
ansi-osc ansi-color ring erc-button erc-fill erc-stamp wid-edit erc-join
midnight icomplete erc format-spec erc-backend erc-networks erc-common
erc-compat compat erc-loaddefs battery dbus xml cus-load use-package
use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core
base32-autoloads bash-completion-autoloads buffer-env-autoloads
comint-mime-autoloads company-autoloads consult-gh-embark-autoloads
coterm-autoloads daemons-autoloads detached-autoloads docker-autoloads
aio-autoloads dumb-jump-autoloads eat-autoloads eglot-java-autoloads
embark-consult-autoloads consult-autoloads embark-autoloads
enwc-autoloads exwm-firefox-core-autoloads exwm-ns-autoloads finder-inf
fedi-autoloads firefox-javascript-repl-autoloads forge-autoloads
closql-autoloads emacsql-autoloads ghub-autoloads gnus-mock-autoloads
inheritenv-autoloads keychain-environment-autoloads lexic-autoloads
pcase markdown-mode-autoloads mpv-autoloads native-complete-autoloads
org-mime-autoloads org-pdfview-autoloads org-present-autoloads
org-remark-autoloads osm-autoloads ox-odt-autoloads pdf-tools-autoloads
popup-autoloads python-view-data-autoloads csv-mode-autoloads
pythonic-autoloads realgud-ipdb-autoloads realgud-autoloads
realgud-recursive-autoloads loc-changes-autoloads
load-relative-autoloads reddigg-autoloads ht-autoloads promise-autoloads
request-autoloads restclient-autoloads s-autoloads test-simple-autoloads
transient-autoloads treepy-autoloads vc-backup-autoloads wgrep-autoloads
info yaml-autoloads 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 cl-seq
eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv
bytecomp byte-compile url-vars cl-loaddefs cl-lib 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 gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process emacs)

Memory information:
((conses 16 3067174 456353) (symbols 48 57687 14)
 (strings 32 499786 28268) (string-bytes 1 42406989)
 (vectors 16 181322) (vector-slots 8 2511916 350646)
 (floats 8 643 10877) (intervals 56 257891 9877) (buffers 992 107))