Subject: 28.3; Emacsclient exits with no error message and breaks terminal when opening a file without permissions
From: Adam Ibrahim <[email-masked]>
To: [email-masked]
Date: Sun, 21 May 2023 14:08:50 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

when I use emacsclient on a file that I don't have permissions to open,
two problems happen: the client exits without printing an error message
so I have no idea what's going on, and then the terminal is broken. when
I type into it, no keys are echoed back. though when I press enter
whatever I typed in does get submitted to the shell.

Neither of these happens when I have emacsclient open up a graphical
frame. I've tried these out with my emacs server run with `-Q`, so I've
ruled out my configuration as a reason.

In GNU Emacs 28.3 (build 1, aarch64-unknown-linux-android)
of 2023-02-27 built on localhost
Configured using:
'configure --disable-dependency-tracking
--prefix=/data/data/com.termux/files/usr
--libdir=/data/data/com.termux/files/usr/lib
--sbindir=/data/data/com.termux/files/usr/bin --disable-rpath
--disable-rpath-hack --host=aarch64-linux-android --disable-autodepend
--with-dumping=none --with-gif=no --with-gnutls --with-jpeg=no
--with-json --with-modules --with-pdumper=yes --with-png=no
--with-tiff=no --with-xml2 --with-xpm=no --without-dbus --without-gconf
--without-gsettings --without-lcms2 --without-selinux --without-x
emacs_cv_sanitize_address=yes emacs_cv_prog_cc_no_pie=no
ac_cv_lib_elf_elf_begin=no gl_cv_func_dup2_works=no
ac_cv_func_setrlimit=no --disable-nls --enable-shared --enable-static
--libexecdir=/data/data/com.termux/files/usr/libexec 'CFLAGS=
-fstack-protector-strong -Oz' 'CPPFLAGS=
-I/data/data/com.termux/files/usr/include'
'LDFLAGS=-L/data/data/com.termux/files/usr/lib
-Wl,-rpath=/data/data/com.termux/files/usr/lib -fopenmp -static-openmp
-Wl,--enable-new-dtags -Wl,--as-needed -Wl,-z,relro,-z,now''

Configured features:
GMP GNUTLS JSON LIBXML2 MODULES NOTIFY INOTIFY PDUMPER SECCOMP THREADS
XIM ZLIB

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

Major mode: Dired by name

Minor modes in effect:
  which-key-mode: t
  diff-hl-dired-mode: t
  erc-truncate-mode: t
  erc-track-mode: t
  erc-spelling-mode: t
  global-flycheck-mode: t
  global-hl-todo-mode: t
  which-function-mode: t
  global-company-mode: t
  company-mode: t
  vertico-mode: t
  editorconfig-mode: t
  global-diff-hl-mode: t
  winner-mode: t
  global-undo-tree-mode: t
  global-anzu-mode: t
  anzu-mode: t
  projectile-mode: t
  volatile-highlights-mode: t
  global-hl-line-mode: t
  super-save-mode: t
  windmove-mode: t
  recentf-mode: t
  savehist-mode: t
  save-place-mode: t
  show-smartparens-global-mode: t
  global-auto-revert-mode: t
  delete-selection-mode: t
  prelude-mode: t
  shell-dirtrack-mode: t
  global-display-line-numbers-mode: t
  display-line-numbers-mode: t
  override-global-mode: t
  xterm-mouse-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  menu-bar-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
  buffer-read-only: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/data/data/com.termux/files/home/.emacs.d/elpa/transient-20230501.1034/transient
hides /data/data/com.termux/files/usr/share/emacs/28.3/lisp/transient

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec epa derived
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mailabbrev
gmm-utils mailheader sendmail mail-utils cursor-sensor which-key
dired-aux vc-mtn vc-hg vc-git vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs
diff-hl-dired term/xterm xterm add-log server rainbow-mode
rainbow-delimiters elisp-slime-nav guru-mode prelude-modules prelude-erc
erc-truncate erc-track erc-match erc-autoaway erc-spelling erc-notify
erc-networks erc-log erc-goodies erc erc-backend erc-loaddefs
prelude-yaml prelude-xml nxml-mode-expansions rng-nxml rng-valid rng-loc
rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap html-mode-expansions sgml-mode facemenu
dom nxml-util nxml-enc xmltok prelude-web web-mode-expansions
smartparens-html web-mode disp-table prelude-shell sh-script smie
executable prelude-perl prelude-lsp lsp-ui lsp-ui-flycheck lsp-ui-doc
goto-addr lsp-ui-imenu lsp-ui-peek lsp-ui-sideline image lsp-mode
spinner network-stream puny nsm rmc smartparens-markdown markdown-mode
color lv inline f f-shortdoc shortdoc epg rfc6068 epg-config lsp-ui-util
face-remap lsp-protocol s ht prelude-js js2-mode-expansions js2-mode
js-mode-expansions smartparens-javascript js cc-mode-expansions
smartparens-c cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs prelude-emacs-lisp prelude-lisp
prelude-css prelude-c prelude-programming flycheck hl-todo which-func
prelude-org org-habit org-agenda org-refile the-org-mode-expansions
org-element avl-tree smartparens-org 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 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 find-func cal-menu calendar
cal-loaddefs prelude-company company-oddmuse company-keywords
company-etags company-gtags company-dabbrev-code company-dabbrev
company-files company-clang company-capf company-cmake company-semantic
company-template company-bbdb company prelude-vertico orderless vertico
compat compat-29 prelude-linux exec-path-from-shell warnings
prelude-global-keybindings prelude-editor editorconfig editorconfig-core
editorconfig-core-handle editorconfig-fnmatch operate-on-number calc-bin
calc-ext calc calc-loaddefs calc-macs diff-hl smartrep log-view
pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode fringe winner undo-tree
diff queue eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg
esh-module esh-groups esh-util re-builder whitespace tabify
browse-kill-ring midnight ediff ediff-merg ediff-mult ediff-wind
ediff-diff ediff-help ediff-init ediff-util dired-x dired dired-loaddefs
anzu avy projectile lisp-mnt mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr grep compile ibuf-ext ibuffer ibuffer-loaddefs
bookmark text-property-search pp expand-region text-mode-expansions
er-basic-expansions expand-region-core expand-region-custom flyspell
ispell rect etags fileloop generator xref project volatile-highlights
hl-line super-save windmove recentf tree-widget wid-edit savehist
saveplace diminish smartparens-config smartparens-text smartparens
advice loadhist dash autorevert filenotify delsel prelude-mode edmacro
kmacro crux tramp tramp-loaddefs trampver tramp-integration files-x
tramp-compat shell pcomplete comint ansi-color ring parse-time iso8601
time-date ls-lisp format-spec thingatpt imenu-anywhere imenu
prelude-core epl prelude-ui misterioso-theme display-line-numbers
prelude-custom prelude-packages 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
xt-mouse regexp-opt rx pcase info tool-bar package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic 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 simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads inotify multi-tty
make-network-process emacs)

Memory information:
((conses 16 647720 209601)
(symbols 48 54050 77)
(strings 32 230059 27365)
(string-bytes 1 6714998)
(vectors 16 89242)
(vector-slots 8 900514 196184)
(floats 8 408 924)
(intervals 56 617 479)
(buffers 992 12))