Subject: 29.0.50; Eshell in buffer completion not inserting chosen completion

From: Mohamed Suliman <[email-masked]>
Date: Fri, 07 Oct 2022 10:57:12 +0100

When cycling through the *Completions* window that pops up when I type,
say, `cd <TAB>' in eshell using the M-<down> and M-<up> key bindings, I
then select a completion (in this case a directory to cd into) using
M-<return>, but instead of inserting the chosen completion into my
eshell buffer, I get a message in the minibuffer saying "Text is read
only". To replicate after starting `emacs -Q':

1. `M-x eshell'
2. Type `cd' and then hit <TAB>
3. Cycle through the *Completions* buffer that pops up with M-<down> and
M-<up>.
4. Select a completion with M-<return>

In GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version
 3.24.31, cairo version 1.17.6) of 2022-09-09 built on avalon
Repository revision: 72c64dd73c93a92f91431435a0295d748588a4ed
Repository branch: master
System Description: Fedora Linux 36 (Workstation Edition)

Configured using:
 'configure --with-native-compilation --with-json --with-pgtk
 --with-cairo'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG
SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XIM GTK3 ZLIB

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

Major mode: Lisp Interaction

Minor modes in effect:
  pyvenv-mode: t
  pdf-occur-global-minor-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  marginalia-mode: t
  shell-dirtrack-mode: t
  repeat-mode: t
  global-display-line-numbers-mode: t
  display-line-numbers-mode: t
  global-eldoc-mode: t
  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
  blink-cursor-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/namilus/.config/emacs/elpa/transient-20220413.2332/transient hides /usr/local/share/emacs/29.0.50/lisp/transient

Features:
(shadow sort mail-extr emacsbug modus-vivendi-theme vc-hg vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs log-view vc bug-reference magit-extras
textsec uni-scripts idna-mapping ucs-normalize uni-confusable
textsec-check shr-color ispell misearch multi-isearch cal-iso face-remap
mhtml-mode css-mode smie color js cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode facemenu
htmlize tabify whitespace dabbrev vc-git vc-dispatcher org-indent ol-eww
eww mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art
mm-uu mml2015 gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus
gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int
gnus-range gnus-win gnus nnheader range ol-docview doc-view ol-bbdb
ol-w3m ol-doi org-link-doi shortdoc dired-aux em-banner cl-print em-cmpl
em-extpipe em-glob em-prompt em-rebind em-smart em-term term disp-table
ehelp mule-util em-alias em-basic em-dirs em-hist em-pred em-ls
em-script em-tramp em-unix esh-mode esh-var help-fns radix-tree 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 notmuch-query goto-addr icalendar diary-lib
diary-loaddefs notmuch-tag notmuch-lib notmuch-version notmuch-compat
mm-view mml-smime smime gnutls dig denote xdg pyvenv eshell esh-cmd
esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util
pdf-occur ibuf-ext ibuffer ibuffer-loaddefs tablist 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 pdf-misc pdf-tools cus-edit
cus-load pdf-view jka-compr pdf-cache pdf-info tq pdf-util pdf-macs
image-mode exif elfeed-show elfeed-search wid-edit magit-bookmark
bookmark pp shr pixel-fill kinsoku svg dom elfeed-csv elfeed elfeed-curl
elfeed-log elfeed-db elfeed-lib xml-query xml 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 magit-diff smerge-mode diff diff-mode easy-mmode
git-commit log-edit pcvs-util add-log magit-core magit-autorevert
autorevert magit-margin magit-transient magit-process with-editor
magit-mode transient comp comp-cstr warnings cl-extra edmacro kmacro
help-mode magit-git magit-base magit-section crm org-ref org-ref-core
org-ref-glossary org-ref-bibtex avy doi-utils url-http url-auth url-gw
nsm message sendmail yank-media puny dired dired-loaddefs rfc822 mml
mml-sec epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr mailabbrev mail-utils gmm-utils mailheader org-ref-utils
org-ref-export citeproc citeproc-itemgetters citeproc-biblatex
parse-time citeproc-bibtex ol-bibtex citeproc-cite citeproc-subbibs
citeproc-sort citeproc-name citeproc-formatters citeproc-number rst
compile text-property-search citeproc-proc citeproc-disamb
citeproc-itemdata citeproc-generic-elements citeproc-macro
citeproc-choose citeproc-date citeproc-context citeproc-prange
citeproc-style citeproc-locale citeproc-term citeproc-rt citeproc-lib
citeproc-s thingatpt queue ox-pandoc ht ox-org org-ref-misc-links
org-ref-label-link org-ref-ref-links org-ref-citation-links xref
org-ref-bibliography-links hydra lv bibtex-completion org-capture
filenotify biblio biblio-download biblio-dissemin biblio-ieee biblio-hal
biblio-dblp biblio-crossref biblio-arxiv timezone biblio-doi biblio-core
let-alist url-queue url-file ido hl-line parsebib f s dash
modus-operandi-theme modus-themes pcase orderless marginalia server
ob-python python project ob-dot ob-shell shell ox-odt rng-loc rng-uri
rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns
nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda org-refile
ox-html table ox-ascii ox-publish ox org-element org ob ob-tangle ob-ref
ob-lob ob-table org-macro org-footnote org-src ob-comint org-pcomplete
pcomplete comint ansi-color ring org-list org-faces org-entities
noutline outline icons org-version ob-emacs-lisp org-table org-keys
org-loaddefs find-func cal-menu calendar cal-loaddefs avl-tree generator
ol oc-basic bibtex iso8601 time-date oc ob-exp ob-core org-compat advice
ob-eval org-macs format-spec repeat 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
info auctex-autoloads tex-site denote-autoloads
dockerfile-mode-autoloads rx restclient-autoloads vertico-autoloads
display-line-numbers rmc iso-transl tooltip eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/pgtk-win pgtk-win term/common-win pgtk-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
dynamic-setting system-font-setting font-render-setting cairo gtk pgtk
multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 1166421 177112)
 (symbols 48 49572 0)
 (strings 32 211182 12204)
 (string-bytes 1 7731186)
 (vectors 16 118987)
 (vector-slots 8 2681835 239815)
 (floats 8 685 379)
 (intervals 56 19894 493)
 (buffers 1000 33))