Subject: bug#58228: 29.0.50; ansi-term display garbled

From: Jose A Ortega Ruiz <[email-masked]>
Date: Sat, 01 Oct 2022 16:07:28 +0100

- emacs -Q

- M-x ansi-term (accept default /bin/bash)

- type anything in the bash prompt that produces output, a simple ls
  will suffice: the output is garbled, sometimes non-existent (the
  effect is very dramatic for ncurses apps).

In GNU Emacs 29.0.50 (build 31, x86_64-pc-linux-gnu, cairo version
 1.16.0) of 2022-10-01 built on rivendell
Repository revision: e50a3b57921e8b690d3c3adb993e2441d5970116
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure --prefix=/usr/local/stow/emacs29 --with-x-toolkit=no
 --with-imagemagick -C'

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

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

Major mode: notmuch-hello

Minor modes in effect:
  circe-lagmon-mode: t
  disable-mouse-global-mode: t
  telega-root-auto-fill-mode: t
  telega-active-locations-mode: t
  telega-patrons-mode: t
  telega-mode-line-mode: t
  global-diff-hl-mode: t
  eshell-syntax-highlighting-global-mode: t
  winner-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  global-auto-revert-mode: t
  shell-dirtrack-mode: t
  vertico-multiform-mode: t
  vertico-mode: t
  marginalia-mode: t
  persistent-scratch-autosave-mode: t
  jao-minibuffer-mode: t
  minibuffer-electric-default-mode: t
  minibuffer-depth-indicate-mode: t
  repeat-mode: t
  savehist-mode: t
  recentf-mode: t
  save-place-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
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/jao/lib/elisp/notmuch/notmuch-wash hides /usr/local/share/emacs/site-lisp/notmuch-wash
/home/jao/lib/elisp/notmuch/notmuch-address hides /usr/local/share/emacs/site-lisp/notmuch-address
/home/jao/lib/elisp/notmuch/notmuch-jump hides /usr/local/share/emacs/site-lisp/notmuch-jump
/home/jao/lib/elisp/notmuch/notmuch-message hides /usr/local/share/emacs/site-lisp/notmuch-message
/home/jao/lib/elisp/notmuch/coolj hides /usr/local/share/emacs/site-lisp/coolj
/home/jao/lib/elisp/notmuch/notmuch-tree hides /usr/local/share/emacs/site-lisp/notmuch-tree
/home/jao/lib/elisp/notmuch/notmuch-company hides /usr/local/share/emacs/site-lisp/notmuch-company
/home/jao/lib/elisp/notmuch/notmuch-tag hides /usr/local/share/emacs/site-lisp/notmuch-tag
/home/jao/lib/elisp/notmuch/notmuch-compat hides /usr/local/share/emacs/site-lisp/notmuch-compat
/home/jao/lib/elisp/notmuch/notmuch-crypto hides /usr/local/share/emacs/site-lisp/notmuch-crypto
/home/jao/lib/elisp/notmuch/notmuch-mua hides /usr/local/share/emacs/site-lisp/notmuch-mua
/home/jao/lib/elisp/notmuch/notmuch-hello hides /usr/local/share/emacs/site-lisp/notmuch-hello
/home/jao/lib/elisp/notmuch/notmuch-version hides /usr/local/share/emacs/site-lisp/notmuch-version
/home/jao/lib/elisp/notmuch/notmuch-print hides /usr/local/share/emacs/site-lisp/notmuch-print
/home/jao/lib/elisp/notmuch/notmuch-query hides /usr/local/share/emacs/site-lisp/notmuch-query
/home/jao/lib/elisp/notmuch/notmuch-draft hides /usr/local/share/emacs/site-lisp/notmuch-draft
/home/jao/lib/elisp/notmuch/notmuch-show hides /usr/local/share/emacs/site-lisp/notmuch-show
/home/jao/lib/elisp/notmuch/notmuch-parser hides /usr/local/share/emacs/site-lisp/notmuch-parser
/home/jao/lib/elisp/notmuch/notmuch hides /usr/local/share/emacs/site-lisp/notmuch
/home/jao/lib/elisp/notmuch/notmuch-lib hides /usr/local/share/emacs/site-lisp/notmuch-lib
/home/jao/lib/elisp/notmuch/notmuch-maildir-fcc hides /usr/local/share/emacs/site-lisp/notmuch-maildir-fcc
/home/jao/lib/elisp/bbdb/lisp/bbdb-tex hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-tex
/home/jao/lib/elisp/bbdb/lisp/bbdb-mua hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-mua
/home/jao/lib/elisp/bbdb/lisp/bbdb hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb
/home/jao/lib/elisp/bbdb/lisp/bbdb-com hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-com
/home/jao/lib/elisp/bbdb/lisp/bbdb-rmail hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-rmail
/home/jao/lib/elisp/bbdb/lisp/bbdb-mu4e hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-mu4e
/home/jao/lib/elisp/bbdb/lisp/bbdb-site hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-site
/home/jao/lib/elisp/bbdb/lisp/bbdb-vm-aux hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-vm-aux
/home/jao/lib/elisp/bbdb/lisp/bbdb-migrate hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-migrate
/home/jao/lib/elisp/bbdb/lisp/bbdb-vm hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-vm
/home/jao/lib/elisp/bbdb/lisp/bbdb-wl hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-wl
/home/jao/lib/elisp/bbdb/lisp/bbdb-snarf hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-snarf
/home/jao/lib/elisp/bbdb/lisp/bbdb-anniv hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-anniv
/home/jao/lib/elisp/bbdb/lisp/bbdb-sc hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-sc
/home/jao/lib/elisp/bbdb/lisp/bbdb-pgp hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-pgp
/home/jao/lib/elisp/bbdb/lisp/bbdb-ispell hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-ispell
/home/jao/lib/elisp/bbdb/lisp/bbdb-gnus-aux hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-gnus-aux
/home/jao/lib/elisp/bbdb/lisp/bbdb-gnus hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-gnus
/home/jao/lib/elisp/bbdb/lisp/bbdb-mhe hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-mhe
/home/jao/lib/elisp/bbdb/lisp/bbdb-message hides /home/jao/.emacs.d/elpa.29/bbdb-20220706.433/bbdb-message
/home/jao/etc/emacs/site/custom hides /usr/local/stow/emacs29/share/emacs/29.0.50/lisp/custom
/home/jao/.emacs.d/elpa.29/transient-20220918.2101/transient hides /usr/local/stow/emacs29/share/emacs/29.0.50/lisp/transient

Features:
(shadow sort mailalias bbdb-message mail-extr circe-lagmon lui-track
circe-display-images circe lui-irc-colors irc lcs lui-logging lui-format
circe-compat slack slack-company slack-unread slack-websocket
slack-thread-event slack-room-event slack-star-event
slack-reaction-event slack-reply-event slack-typing slack-slash-commands
slack-message-event slack-event slack-dialog-edit-element-buffer
slack-dialog-buffer slack-dialog slack-stars-buffer
slack-search-result-buffer slack-thread-message-compose-buffer
slack-file-list-buffer slack-file-info-buffer slack-all-threads-buffer
slack-message-buffer slack-user-profile-buffer slack-pinned-items-buffer
slack-pinned-item slack-thread-message-buffer slack-room-info-buffer
slack-room-buffer slack-message-share-buffer slack-message-edit-buffer
slack-room-message-compose-buffer slack-message-compose-buffer
slack-message-attachment-preview-buffer slack-action slack-star
slack-reminder slack-search slack-message-reaction slack-message-editor
slack-message-sender slack-message-notification slack-buffer
slack-message-formatter slack-thread slack-im slack-channel slack-group
slack-conversations slack-create-message slack-attachment
slack-selectable slack-bot-message slack-user-message slack-file
slack-message slack-message-faces slack-unescape slack-block
slack-mrkdwn slack-usergroup slack-reaction slack-modeline slack-room
slack-counts slack-user slack-bot slack-dnd-status slack-emoji
slack-image slack-request slack-log request lui flyspell ispell
slack-team slack-team-ws slack-util websocket misearch multi-isearch
org-duration face-remap org-agenda image-file image-converter cal-iso
cal-move pulsar pulse shr-color textsec uni-scripts idna-mapping
uni-confusable textsec-check ucs-normalize network-stream url-cache
haskell-doc inf-haskell eglot array jsonrpc ert haskell-decl-scan
whitespace display-fill-column-indicator smartscan vc-hg vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs vertico-directory mule-util tramp-cmds
executable copyright bigml bml-logs bml bml-misc bml-whizzml bml-clojure
bml-clj-tests bml-python bml-skels bml-utils multisession sqlite
whizzml-skeletons whizzml-mode sieve sieve-mode sieve-manage sasl
sasl-anonymous sasl-login sasl-plain xmobar xterm-color xclip
disable-mouse jao-wayland jao-spt consult-spotify espotify jao-mpc
jao-random-album jao-lyrics jao-mpris telega-obsolete telega
telega-tdlib-events telega-webpage visual-fill-column telega-match
telega-root telega-info telega-chat telega-modes telega-company
telega-user telega-notifications telega-voip telega-msg telega-tme
telega-sticker telega-i18n telega-vvnote bindat telega-ffplay
telega-sort telega-filter telega-ins telega-folders telega-inline
telega-util telega-media telega-tdlib rainbow-identifiers dired-aux
telega-server telega-core cursor-sensor telega-customize emacsbug
jao-mullvad bluetooth enwc enwc-backend json-mode json-snatcher js
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs yaml-mode virtualenvwrapper gud pie haskell
haskell-completions haskell-load haskell-commands highlight-uses-mode
haskell-modules haskell-sandbox haskell-navigate-imports haskell-repl
haskell-svg haskell-collapse hideshow haskell-debug
haskell-interactive-mode haskell-presentation-mode haskell-compile
haskell-process haskell-session haskell-hoogle geiser-guile tramp
tramp-loaddefs trampver tramp-integration files-x tramp-compat ls-lisp
info-look geiser-repl geiser-image geiser-capf geiser-doc geiser-menu
geiser-edit geiser-completion geiser-autodoc geiser-eval
geiser-connection tq geiser-syntax scheme geiser-impl help-fns
radix-tree geiser-log geiser-popup view geiser-custom geiser-base geiser
package-lint finder lisp-mnt edit-list outline-minor-faces gist gh-gist
gh-oauth gh-api logito gh-cache pcache gh-auth gh-common marshal gh-url
gh-profile eieio-base git-modes gitignore-mode gitconfig-mode conf-mode
gitattributes-mode git-link git-timemachine diff-hl log-view vc-dir ewoc
vc jao-eshell-here eshell-autojump em-dirs esh-var eshell-up
git-ps1-mode em-term term disp-table ehelp eshell-syntax-highlighting
em-alias jao-custom-notmuch consult-notmuch org-capture org-refile
jao-notmuch notmuch notmuch-tree notmuch-jump notmuch-hello notmuch-show
notmuch-print notmuch-crypto notmuch-mua notmuch-message notmuch-draft
notmuch-maildir-fcc notmuch-address notmuch-company notmuch-parser
notmuch-wash coolj goto-addr icalendar notmuch-tag notmuch-lib
notmuch-version notmuch-compat hl-line mm-view mml-smime smime dig
jao-custom-email bbdb-loaddefs bbdb-anniv bbdb-com bbdb bbdb-site
timezone randomsig nov esxml-query saveplace-pdf-view jao-custom-eww
ol-eww jao-eww-session eww xdg url-queue mm-url gnus nnheader range
markdown-toc jao-custom-blog htmlize jao-custom-org jao-org-links
jao-doc-view jao-pdf doc-view image-mode exif ol-info ol-eshell esh-mode
eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module
esh-groups esh-util jao-org-notes ob-shell ob-scheme ob-python python
ob-org ob-ocaml ob-makefile ob-haskell ob-gnuplot ob-clojure ob-calc
calc-store calc-trail ob-prolog prolog smie align org-tempo tempo
ox-texinfo ox-latex ox-html table ox-ascii ox-publish ox org-fragtog
org-element avl-tree org ob ob-tangle ob-ref ob-lob ob-table ob-exp
org-macro org-footnote org-src ob-comint org-pcomplete org-list
org-faces org-entities org-version ob-emacs-lisp ob-core ob-eval
org-table oc-basic bibtex ol org-keys oc org-compat org-macs
org-loaddefs winner consult-recoll embark-consult consult-vertico
consult compat-28 magit-bookmark bookmark jao-custom-completion
embark-vc code-review code-review-actions code-review-comment
code-review-section code-review-bitbucket code-review-faces shr
pixel-fill kinsoku url-file svg dom emojify apropos tar-mode arc-mode
archive-mode pcase ht code-review-gitlab code-review-utils
code-review-parse-hunk code-review-github code-review-db uuidgen
calc-misc calc-ext calc calc-loaddefs rect calc-macs a
code-review-interfaces deferred s forge-list forge-commands forge-semi
forge-bitbucket buck forge-gogs gogs forge-gitea gtea forge-gitlab glab
forge-github ghub-graphql treepy gsexp ghub url-http url-gw nsm url-auth
let-alist gnutls forge-notify forge-revnote forge-pullreq forge-issue
forge-topic yaml parse-time iso8601 bug-reference forge-post
markdown-mode edit-indirect color forge-repo forge forge-core forge-db
closql emacsql-sqlite advice emacsql emacsql-compiler magit-submodule
magit-obsolete magit-blame magit-stash magit-reflog magit-bisect
magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log which-func imenu edebug
debug backtrace find-func magit-diff smerge-mode diff git-commit
log-edit message sendmail yank-media puny rfc822 mml mml-sec gnus-util
time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils
mailheader pcvs-util add-log magit-core magit-autorevert autorevert
filenotify magit-margin magit-transient magit-process with-editor shell
pcomplete magit-mode magit-git magit-base magit-section crm dash
compat-27 compat-26 embark ffap vertico-multiform vertico marginalia
orderless jao-skel-latex jao-skel-haskell haskell-mode haskell-cabal
haskell-utils haskell-font-lock haskell-indentation haskell-string
haskell-sort-imports haskell-lexeme haskell-align-imports
haskell-complete-module haskell-ghc-support noutline outline
flymake-proc flymake warnings thingatpt etags fileloop generator xref
project dabbrev haskell-customize jao-compilation jao-skel-lisp
jao-skel-geiser jao-skel skeleton autoinsert wgrep grep compile
text-property-search comint ansi-osc ring jka-compr dired-duplicates
dired-x dired dired-loaddefs persistent-scratch cal-china lunar solar
cal-dst cal-bahai cal-islam cal-hebrew holidays holiday-loaddefs vc-git
diff-mode vc-dispatcher appt diary-lib diary-loaddefs cal-menu calendar
cal-loaddefs tmr jao-tracking jao-afio jao-doc-session tracking shorten
jao-notify alert log4e notifications gntp battery diminish jao-mode-line
jao-minibuffer minibuf-eldef mb-depth jao-light-theme jao-themes
ansi-color epa-file epa derived epg rfc6068 epg-config transient
format-spec compat compat-macs cus-edit pp cus-load icons repeat
jao-shell edmacro kmacro jao-sleep dbus xml server savehist recentf
tree-widget wid-edit saveplace jao-gnus-private gnu-elpa-keyring-update
cl-extra help-mode use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core finder-inf auctex-autoloads tex-site bbdb-autoloads
bluetooth-autoloads cider-autoloads clojure-mode-autoloads
consult-dir-autoloads consult-eglot-autoloads diff-hl-autoloads
diminish-autoloads disable-mouse-autoloads eglot-autoloads
embark-consult-autoloads consult-autoloads embark-vc-autoloads
embark-autoloads eshell-syntax-highlighting-autoloads exwm-autoloads
exwm-edit-autoloads forge-autoloads closql-autoloads
emacsql-sqlite-autoloads emacsql-autoloads ghub-autoloads gist-autoloads
gh-autoloads git-timemachine-autoloads gnuplot-autoloads
haskell-mode-autoloads rx avy-autoloads logito-autoloads magit-autoloads
git-commit-autoloads magit-section-autoloads marginalia-autoloads
markdown-mode-autoloads marshal-autoloads nov-autoloads
orderless-autoloads package-lint-autoloads paredit-autoloads
password-store-autoloads pcache-autoloads pulsar-autoloads
racket-mode-autoloads ht-autoloads alert-autoloads request-autoloads
spinner-autoloads switch-window-autoloads telega-autoloads
transient-autoloads treepy-autoloads use-package-autoloads
bind-key-autoloads vertico-autoloads with-editor-autoloads info
compat-autoloads wordreference-autoloads s-autoloads xelb-autoloads
xterm-color-autoloads yaml-mode-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 cconv url-vars cl-loaddefs cl-lib
rmc 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 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 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 make-network-process emacs)

Memory information:
((conses 16 1662888 202671)
 (symbols 48 103934 175)
 (strings 32 503748 41511)
 (string-bytes 1 17163016)
 (vectors 16 200523)
 (vector-slots 8 6562888 225812)
 (floats 8 16845 861)
 (intervals 56 71408 9525)
 (buffers 1000 86))

-- 
No, no, you're not thinking, you're just being logical.
 -Niels Bohr, physicist (1885-1962)