From unknown Sat Jun 21 02:53:53 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#63629 <63629@debbugs.gnu.org> To: bug#63629 <63629@debbugs.gnu.org> Subject: Status: 28.3; Emacsclient exits with no error message and breaks terminal when opening a file without permissions Reply-To: bug#63629 <63629@debbugs.gnu.org> Date: Sat, 21 Jun 2025 09:53:53 +0000 retitle 63629 28.3; Emacsclient exits with no error message and breaks term= inal when opening a file without permissions reassign 63629 emacs submitter 63629 Adam Ibrahim severity 63629 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun May 21 14:09:14 2023 Received: (at submit) by debbugs.gnu.org; 21 May 2023 18:09:15 +0000 Received: from localhost ([127.0.0.1]:32836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0nUX-0004NJ-Tr for submit@debbugs.gnu.org; Sun, 21 May 2023 14:09:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:37824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0nUV-0004NB-Da for submit@debbugs.gnu.org; Sun, 21 May 2023 14:09:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0nUV-0008NY-20 for bug-gnu-emacs@gnu.org; Sun, 21 May 2023 14:09:11 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q0nUS-0007df-GO for bug-gnu-emacs@gnu.org; Sun, 21 May 2023 14:09:10 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-96f7bf3cf9eso448894766b.0 for ; Sun, 21 May 2023 11:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684692546; x=1687284546; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=R8E99mW/Cky/H+++Utxw1pl9PgayulkGvwx+6YDU1qw=; b=DDZEWJORrGLneyxr9QPgSU9l5N6ihiksQ7Op7yp+zp8c+vFsLs+mYOUn5feQ8bF1CY MJCagr9sjwmtXTowqFgAmVQYWM1czLxaoryCE4wkgEHz6RyiuPJcdbK96a9X0jSvyllC oXuGAFjqAY9BrPxfxTpaoS7ZIYnM3v9FN66TceEm5E97ZdF4htxlMb9oGyKpGWHlLiuR sY0NkYj5hQbnHV1Lfc4n8RiqTrBNAemTRXv9WR6b/LiopvZFmlYRtFmwHSci7HJlmUp3 94oCzN+gb6LmWL3OBMywLiGF0Hb4n374P1locqpIcVeLHPFJ6TU65laGC0bJW01BwBfV VVYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684692546; x=1687284546; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=R8E99mW/Cky/H+++Utxw1pl9PgayulkGvwx+6YDU1qw=; b=PhmIBvgdCmpBdFtwJe5P4RUpui03/D3UbIh/vj/OnGDq6itFKTQ94IZEbnN6Oli5xK 0y95u2mt5qLwV3C3hLWJXEMWZwwP3pjulQhCM0Sux4c4J0wFZcyjE22K7nQUcyT4xdYn 70+Z2C6ooirnUYFwKXsum/8nK5hTWqOe6YuTepgdJ+xOp+18tG7EqbcuWJkN9aMRvIea nODIhYQI04xXeclsjztmNlAHxBLo7KIlEMRbDtw3wz+dG5kZR2ozocsV8bySIZ8j0FCH TLXV8fRFIEp5aALdezKUOuTrohbSbu46YIWDQDJXENRyRYngNsTcMV2C1CkFc4p6+v5a WFpw== X-Gm-Message-State: AC+VfDydWMQ7tUQHXtxxAbuPehs8EuccbtyfZK+7UKudIdCaFiiUtNRr dfCVbD55RwPmNgzx0fozpIrCtnljg45sfP8w0+sl577C X-Google-Smtp-Source: ACHHUZ7eGFW/VHjXN+1I/8PLpjLo5El0uqI780UYO1YsYMQccgKRfuyMIloQJSlLvrXlemsEk85cfgQ0UvIiy5q2LxA= X-Received: by 2002:a17:907:7fa9:b0:96f:ddaa:c30f with SMTP id qk41-20020a1709077fa900b0096fddaac30fmr1121015ejc.13.1684692545711; Sun, 21 May 2023 11:09:05 -0700 (PDT) MIME-Version: 1.0 From: Adam Ibrahim Date: Sun, 21 May 2023 14:08:50 -0400 Message-ID: Subject: 28.3; Emacsclient exits with no error message and breaks terminal when opening a file without permissions To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000be31a705fc380c78" Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=ibrahimadam193@gmail.com; helo=mail-ej1-x62d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --000000000000be31a705fc380c78 Content-Type: text/plain; charset="UTF-8" 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)) --000000000000be31a705fc380c78 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
when I use emacsclient on a file that I don't have pe= rmissions to open,
two problems happen: the client exits without printin= g an error message
so I have no idea what's going on, and then the t= erminal 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.<= br>
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-2= 7 built on localhost
Configured using:
'configure --disable-depe= ndency-tracking
--prefix=3D/data/data/com.termux/files/usr
--libdir= =3D/data/data/com.termux/files/usr/lib
--sbindir=3D/data/data/com.termu= x/files/usr/bin --disable-rpath
--disable-rpath-hack --host=3Daarch64-l= inux-android --disable-autodepend
--with-dumping=3Dnone --with-gif=3Dno= --with-gnutls --with-jpeg=3Dno
--with-json --with-modules --with-pdump= er=3Dyes --with-png=3Dno
--with-tiff=3Dno --with-xml2 --with-xpm=3Dno -= -without-dbus --without-gconf
--without-gsettings --without-lcms2 --wit= hout-selinux --without-x
emacs_cv_sanitize_address=3Dyes emacs_cv_prog_= cc_no_pie=3Dno
ac_cv_lib_elf_elf_begin=3Dno gl_cv_func_dup2_works=3Dno<= br> ac_cv_func_setrlimit=3Dno --disable-nls --enable-shared --enable-static=
--libexecdir=3D/data/data/com.termux/files/usr/libexec 'CFLAGS=3D<= br> -fstack-protector-strong -Oz' 'CPPFLAGS=3D
-I/data/data/com= .termux/files/usr/include'
'LDFLAGS=3D-L/data/data/com.termux/f= iles/usr/lib
-Wl,-rpath=3D/data/data/com.termux/files/usr/lib -fopenmp = -static-openmp
-Wl,--enable-new-dtags -Wl,--as-needed -Wl,-z,relro,-z,n= ow''

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

Important settin= gs:
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 locale-coding-system: u= tf-8-unix

Major mode: Dired by name

Minor modes in effect:=C2=A0 which-key-mode: t
=C2=A0 diff-hl-dired-mode: t
=C2=A0 erc-tru= ncate-mode: t
=C2=A0 erc-track-mode: t
=C2=A0 erc-spelling-mode: t=C2=A0 global-flycheck-mode: t
=C2=A0 global-hl-todo-mode: t
=C2=A0 = which-function-mode: t
=C2=A0 global-company-mode: t
=C2=A0 company-m= ode: t
=C2=A0 vertico-mode: t
=C2=A0 editorconfig-mode: t
=C2=A0 g= lobal-diff-hl-mode: t
=C2=A0 winner-mode: t
=C2=A0 global-undo-tree-m= ode: t
=C2=A0 global-anzu-mode: t
=C2=A0 anzu-mode: t
=C2=A0 proje= ctile-mode: t
=C2=A0 volatile-highlights-mode: t
=C2=A0 global-hl-lin= e-mode: t
=C2=A0 super-save-mode: t
=C2=A0 windmove-mode: t
=C2=A0= recentf-mode: t
=C2=A0 savehist-mode: t
=C2=A0 save-place-mode: t=C2=A0 show-smartparens-global-mode: t
=C2=A0 global-auto-revert-mode: = t
=C2=A0 delete-selection-mode: t
=C2=A0 prelude-mode: t
=C2=A0 sh= ell-dirtrack-mode: t
=C2=A0 global-display-line-numbers-mode: t
=C2= =A0 display-line-numbers-mode: t
=C2=A0 override-global-mode: t
=C2= =A0 xterm-mouse-mode: t
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mo= de: t
=C2=A0 show-paren-mode: t
=C2=A0 electric-indent-mode: t
=C2= =A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-fo= nt-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 auto-composition-mode= : t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: t=C2=A0 buffer-read-only: t
=C2=A0 size-indication-mode: t
=C2=A0 col= umn-number-mode: t
=C2=A0 line-number-mode: t
=C2=A0 transient-mark-m= ode: 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 rma= il-loaddefs mm-decode mm-bodies mm-encode mailabbrev
gmm-utils mailheade= r 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 gur= u-mode prelude-modules prelude-erc
erc-truncate erc-track erc-match erc-= autoaway erc-spelling erc-notify
erc-networks erc-log erc-goodies erc er= c-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 rn= g-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap html-mode-expansi= ons sgml-mode facemenu
dom nxml-util nxml-enc xmltok prelude-web web-mod= e-expansions
smartparens-html web-mode disp-table prelude-shell sh-scrip= t 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-modespinner network-stream puny nsm rmc smartparens-markdown markdown-modecolor lv inline f f-shortdoc shortdoc epg rfc6068 epg-config lsp-ui-utilface-remap lsp-protocol s ht prelude-js js2-mode-expansions js2-mode
j= s-mode-expansions smartparens-javascript js cc-mode-expansions
smartpare= ns-c cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-en= gine 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 smar= tparens-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-entitie= s noutline outline org-version
ob-emacs-lisp ob-core ob-eval org-table o= c-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-dabbre= v
company-files company-clang company-capf company-cmake company-semanti= c
company-template company-bbdb company prelude-vertico orderless vertic= o
compat compat-29 prelude-linux exec-path-from-shell warnings
prelud= e-global-keybindings prelude-editor editorconfig editorconfig-core
edito= rconfig-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-gr= oups esh-util re-builder whitespace tabify
browse-kill-ring midnight edi= ff ediff-merg ediff-mult ediff-wind
ediff-diff ediff-help ediff-init edi= ff-util dired-x dired dired-loaddefs
anzu avy projectile lisp-mnt mail-p= arse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr grep compile = ibuf-ext ibuffer ibuffer-loaddefs
bookmark text-property-search pp expan= d-region text-mode-expansions
er-basic-expansions expand-region-core exp= and-region-custom flyspell
ispell rect etags fileloop generator xref pro= ject volatile-highlights
hl-line super-save windmove recentf tree-widget= wid-edit savehist
saveplace diminish smartparens-config smartparens-tex= t 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
prelud= e-custom prelude-packages cl-extra help-mode use-package
use-package-ens= ure use-package-delight use-package-diminish
use-package-bind-key bind-k= ey easy-mmode use-package-core finder-inf
xt-mouse regexp-opt rx pcase i= nfo 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 pa= ssword-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-comp= ile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc paren electric uni= quify ediff-hook vc-hooks
lisp-float-type elisp-mode tabulated-list repl= ace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-= bar rfn-eshadow isearch
easymenu timer select mouse jit-lock font-lock s= yntax font-core
term/tty-colors frame minibuffer cl-generic cham georgia= n utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japan= ese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopi= c indian
cyrillic chinese composite emoji-zwj charscript charprop case-t= able
epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadv= ice
button loaddefs faces cus-face macroexp files window text-properties=
overlay sha1 md5 base64 format env code-pages mule custom widget
has= htable-print-readable backquote threads inotify multi-tty
make-network-p= rocess emacs)

Memory information:
((conses 16 647720 209601)
= (symbols 48 54050 77)
(strings 32 230059 27365)
(string-bytes 1 671= 4998)
(vectors 16 89242)
(vector-slots 8 900514 196184)
(floats= 8 408 924)
(intervals 56 617 479)
(buffers 992 12))
--000000000000be31a705fc380c78-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 21 14:21:59 2023 Received: (at 63629) by debbugs.gnu.org; 21 May 2023 18:21:59 +0000 Received: from localhost ([127.0.0.1]:32843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0ngt-0004ic-05 for submit@debbugs.gnu.org; Sun, 21 May 2023 14:21:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0ngq-0004iL-Vy for 63629@debbugs.gnu.org; Sun, 21 May 2023 14:21:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0ngl-0001Su-4c; Sun, 21 May 2023 14:21:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=RGWkCb3084bHpgDePHPH0hdQFv3ANfR4gPg6CDznYvk=; b=TQ0xQpP0m6Ck FdDCyZZhUpTDe6nBX3x3s4UjGR3Xbp7n1qWEJ9p/S4bkPIt4ORkGFf3x0w6d3YlfkEhfFHzQyZcyX Yq3bQuH9ndB7X2JcmM7fSD7NeMQhQ3rPnqQLN8bpY0v78cQ8YD6MHJdL5/SgGLJ4HBtligNVgCe0p /NVRZydQGPPp3sZ+W8jgk7mKtQBwzrpDaosmt7jvJtXyPwapL5Xr+H4psMNBB95UwxyBtCVd3BHT+ rrwCmxis5Y0Qscwu5JxFqCJKfdmL7LoS70LFQmSj1XyABewEbxC/UidDE8aG7nvPFLpW9t+u2Cbyr heuhNhe35LMH9DIAgYJgqA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0ngi-0000Wz-NN; Sun, 21 May 2023 14:21:49 -0400 Date: Sun, 21 May 2023 21:22:08 +0300 Message-Id: <83a5xxr1db.fsf@gnu.org> From: Eli Zaretskii To: Adam Ibrahim In-Reply-To: (message from Adam Ibrahim on Sun, 21 May 2023 14:08:50 -0400) Subject: Re: bug#63629: 28.3; Emacsclient exits with no error message and breaks terminal when opening a file without permissions References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63629 Cc: 63629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Adam Ibrahim > Date: Sun, 21 May 2023 14:08:50 -0400 > > 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. Please show the results of "ls -l" on this problematic file, and also please show the exact emacsclient command you use which causes the problem. And what exactly do you mean by "the terminal is broken"? what doesn't work afterwards and which terminal emulator is that? (My guess is that emacsclient crashes, so perhaps try running it from GDB, and see what that produces.) From debbugs-submit-bounces@debbugs.gnu.org Sun May 21 14:57:30 2023 Received: (at 63629) by debbugs.gnu.org; 21 May 2023 18:57:30 +0000 Received: from localhost ([127.0.0.1]:32860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0oFF-0005t3-SA for submit@debbugs.gnu.org; Sun, 21 May 2023 14:57:30 -0400 Received: from mail-ed1-f53.google.com ([209.85.208.53]:44161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0oFB-0005sj-5J for 63629@debbugs.gnu.org; Sun, 21 May 2023 14:57:29 -0400 Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-510b6a249a8so9450540a12.0 for <63629@debbugs.gnu.org>; Sun, 21 May 2023 11:57:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684695439; x=1687287439; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=DUZC42UUH0sYb+90SXCgcC+GD6xS8EzrpLOz2bwJdfw=; b=P4CEkpfOhxcsEZFZJrFOXRcwDczOEWHz8k7mUcXP42YyEqjX28BAgcZpGLtwfitc+f oK4DHj/NGYiA4gsjV0R/PYq1a4vaScFJMGMHnwQ1krAKPJ1II4OM/UUkQb9rx9p5HmJi mR8MBxypE6cQAjGc92asTaId7wIwF1V4XQ4oIIPL0/e9tibg1kLrEVsz2QIZLoukpLna FlStELdEThJdQVa3jCPfBmmGyzUQOhfKRr24OK7WVstgAe1T8k54IKuYV6i5kpHVUw45 MXiMEB7femzYpREng7EwA3ELy2ak5jS8lJNLkVOZ/yoe2p97SAkUU6p+QgUnRH1YA6pt xHfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684695439; x=1687287439; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DUZC42UUH0sYb+90SXCgcC+GD6xS8EzrpLOz2bwJdfw=; b=LNp1Af26deClWvyLh7Sr/62EYEt/m3S/hhAfpL7i4mCWNpmBZXcqoz+JYoVEQiXel9 v+lgV4RWZOQ8gReMam+4lluVYiX2DB3EL2bddU7PG0CsK1ahRWLzOp91IHEyEbrH00TT y5UMLiXI0ec4NcBqpo6vxrT57qVv+ysFMkPLEIajdmqj3BUgSb6UCyqiovutiwhYDH5u RLbVWIdF7LNgvDFMQhCvPzDApW3mbVneAQCDPjCeGLKZzbE+LTBFdMh33+y/snsyfu3t mtIQ0YyGT7NECkb5Z4munFQGV4N3w/GaTUtV8JaYsVOuzBnwXzASo6AVXFGmvkpUohSx QAWg== X-Gm-Message-State: AC+VfDwDXX7zIEVKouO0NLgg3eqPXHF9Vz1EF9pkt4F5fJHqd2aA6n+D yt9OEwoAgxVJo4+h1NPUXFqiBvdqsPdSRdx/0XSt3jrO X-Google-Smtp-Source: ACHHUZ5zuxyJavJJ19eShgTZbbdgSeQXHWBvz4sP2jvixM9x9TVKsDTDzdRZGJxE+K1iiB0g68+6mHNraA+hrWusH9A= X-Received: by 2002:a17:907:6eac:b0:94e:116:8581 with SMTP id sh44-20020a1709076eac00b0094e01168581mr11718549ejc.5.1684695438903; Sun, 21 May 2023 11:57:18 -0700 (PDT) MIME-Version: 1.0 References: <83a5xxr1db.fsf@gnu.org> In-Reply-To: From: Adam Ibrahim Date: Sun, 21 May 2023 14:57:03 -0400 Message-ID: Subject: Fwd: bug#63629: 28.3; Emacsclient exits with no error message and breaks terminal when opening a file without permissions To: 63629@debbugs.gnu.org Content-Type: multipart/alternative; boundary="00000000000030ccc405fc38b9c9" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 63629 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --00000000000030ccc405fc38b9c9 Content-Type: text/plain; charset="UTF-8" ---------- Forwarded message --------- From: Adam Ibrahim Date: Sun, May 21, 2023, 14:48 Subject: Re: bug#63629: 28.3; Emacsclient exits with no error message and breaks terminal when opening a file without permissions To: Eli Zaretskii output of `ls -l`: ls -l no-perms ---------- 1 u0_a331 u0_a331 0 May 21 14:27 no-perms commands used: emacs --fg-daemon -Q emacsclient no-perms # in a separate terminal what stops working: when I type, the letters I type don't appear in the terminal anymore. nothing is echoed back to me. stuff still happens, and I can enter commands, but I can't see anything. And the terminal width seems screwed up. like things that should get indented, they don't look right. I've tried this on two terminal emulators: termux on Android and kitty on my desktop running Linux. On termux the problems in the terminal are consistent. and kitty, it happens sometimes. sometimes the terminal continues to function like normal and I can see the keys I typed echoed back to me, and sometimes not. what happens when I try using GDB: I can only use GDB on my desktop right now. when I try running `gdb emacsclient no-perms`, it prints an error message: `/path/to/no-perms: Permission denied`. So whatever this problem is, it doesn't show up in GDB on my desktop. On Sun, May 21, 2023, 14:21 Eli Zaretskii wrote: > > From: Adam Ibrahim > > Date: Sun, 21 May 2023 14:08:50 -0400 > > > > 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. > > Please show the results of "ls -l" on this problematic file, and also > please show the exact emacsclient command you use which causes the > problem. > > And what exactly do you mean by "the terminal is broken"? what doesn't > work afterwards and which terminal emulator is that? > > (My guess is that emacsclient crashes, so perhaps try running it from > GDB, and see what that produces.) > --00000000000030ccc405fc38b9c9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

---------- Forwarded message ---------
From: Adam Ibrahim <ibrahimadam193@gmail.c= om>
Date: Sun, May 21, 2023, 14:48
Subject: Re: bug#636= 29: 28.3; Emacsclient exits with no error message and breaks terminal when = opening a file without permissions
To: Eli Zaretskii <eliz@gnu.org>


ou= tput of `ls -l`:

=C2=A0ls -l n= o-perms
=C2=A0---------- 1 u0_a331 u0_a331 0 May 21 = 14:27 no-perms

commands = used:

=C2=A0emacs --fg-d= aemon -Q
=C2=A0emacsclient no-perms # in a separate = terminal

what stops work= ing: when I type, the letters I type don't appear in the terminal anymo= re. nothing is echoed back to me. stuff still happens, and I can enter comm= ands, but I can't see anything. And the terminal width seems screwed up= . like things that should get indented, they don't look right.

I've tried this on two termi= nal emulators: termux on Android and kitty on my desktop running Linux. On = termux the problems in the terminal are consistent. and kitty, it happens s= ometimes. sometimes the terminal continues to function like normal and I ca= n see the keys I typed echoed back to me, and sometimes not.=C2=A0

what happens when I try using GD= B: I can only use GDB on my desktop right now. when I try running `gdb emac= sclient no-perms`, it prints an error message: `/path/to/no-perms: Permissi= on denied`. So whatever this problem is, it doesn't show up in GDB on m= y desktop.


On Sun, May 21, 2023, 14:21 Eli= Zaretskii <eliz@gnu.org> wrote:
ibrahimadam193@gmail.com= >
> Date: Sun, 21 May 2023 14:08:50 -0400
>
> 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 messag= e
> 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.

Please show the results of "ls -l" on this problematic file, and = also
please show the exact emacsclient command you use which causes the
problem.

And what exactly do you mean by "the terminal is broken"? what do= esn't
work afterwards and which terminal emulator is that?

(My guess is that emacsclient crashes, so perhaps try running it from
GDB, and see what that produces.)
--00000000000030ccc405fc38b9c9-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 21 15:05:19 2023 Received: (at 63629) by debbugs.gnu.org; 21 May 2023 19:05:19 +0000 Received: from localhost ([127.0.0.1]:32865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0oMp-00065w-4X for submit@debbugs.gnu.org; Sun, 21 May 2023 15:05:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0oMn-00065j-EO for 63629@debbugs.gnu.org; Sun, 21 May 2023 15:05:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0oMi-0000Xu-25; Sun, 21 May 2023 15:05:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=NQGsMWaXmVmpgwX/ReBSDrdckrpaBuTHaHU0dcjGZgQ=; b=Ovi9//vehDzc wMJ+MZs+SB1G1Nbf76zCVLXtU9nWDZ3T6qCbNrqFA0FDW/BMoUUcQeXXCOtsyx60eK9MVUo7WfRIx +aEkVlElO/tpf5fkzp2vRkOxk6EjXkwozmym/K5CpCDApmaOCxn1P++AI4SGnPD2cszgptngF9omU W94RUt4Eq10l7gl0wUBjSR2Ar/oyDomo3yFYBiQmF/sJNATSdo+/i1BQVxeztVBbXY1D0mX3E7q7y NpKpISYWIdStTEodCFyFEy+qsoHUvE0jcwhZw6DJORM2MLbJZK6QV+8gCbZZkQZ3jCZfezRSVIArz MeRfUl3kJRUlquEOnCDFrw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0oMh-0007kj-I1; Sun, 21 May 2023 15:05:11 -0400 Date: Sun, 21 May 2023 22:05:29 +0300 Message-Id: <838rdhqzd2.fsf@gnu.org> From: Eli Zaretskii To: Adam Ibrahim In-Reply-To: (message from Adam Ibrahim on Sun, 21 May 2023 14:48:05 -0400) Subject: Re: bug#63629: 28.3; Emacsclient exits with no error message and breaks terminal when opening a file without permissions References: <83a5xxr1db.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63629 Cc: 63629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Adam Ibrahim > Date: Sun, 21 May 2023 14:48:05 -0400 > > what happens when I try using GDB: I can only use GDB on my desktop right now. when I try running > `gdb emacsclient no-perms`, it prints an error message: `/path/to/no-perms: Permission denied`. So > whatever this problem is, it doesn't show up in GDB on my desktop. You should invoke emacsclient from GDB like this: $ gdb --args emacsclient no-perms From debbugs-submit-bounces@debbugs.gnu.org Mon May 22 09:30:54 2023 Received: (at 63629) by debbugs.gnu.org; 22 May 2023 13:30:54 +0000 Received: from localhost ([127.0.0.1]:34078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q15cj-0000dj-O2 for submit@debbugs.gnu.org; Mon, 22 May 2023 09:30:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q15cg-0000dT-HQ for 63629@debbugs.gnu.org; Mon, 22 May 2023 09:30:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q15cb-0002Wi-52; Mon, 22 May 2023 09:30:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=3Q8garFM3sZaw0+rPdg0SO59pjd7YUsy9VmbZWEYM68=; b=P6APp08mR28j PO4g5ZpRtpFA+s8lEKB4tm1FZWWlZcOhlLQZZeBjj722uI1QXdtQBmxJ3XOwSHf60qlFqGVRohLUt eViW64ih/BgSRQfHViQYll0GjhFs145z4dxFW0oXOIoz8Hzr1SouugDszJiIQ6AWAgC/doGkeV2Y3 6fAkmWLmUPLUgxSSP4xWbOosBYtu4YUyVSZn+lC3mMIcIDox/BuvNZgtfO5z2hYF7RJ+hXGPGlEpq tq+N0uX2QwOKqjkFFQeZ0YvKZEbUVzW2za3qp2rRNm9PIVfvxXSwl1wO5rI/RLzFOjyaJZqhHYa9X 9c+d/H959Ehm9GFrEq00WA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q15cY-0008C8-LO; Mon, 22 May 2023 09:30:44 -0400 Date: Mon, 22 May 2023 16:31:03 +0300 Message-Id: <83v8gkpk6g.fsf@gnu.org> From: Eli Zaretskii To: Adam Ibrahim In-Reply-To: (message from Adam Ibrahim on Sun, 21 May 2023 14:57:03 -0400) Subject: Re: bug#63629: Fwd: bug#63629: 28.3; Emacsclient exits with no error message and breaks terminal when opening a file without permissions References: <83a5xxr1db.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63629 Cc: 63629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Adam Ibrahim > Date: Sun, 21 May 2023 14:57:03 -0400 > > output of `ls -l`: > > ls -l no-perms > ---------- 1 u0_a331 u0_a331 0 May 21 14:27 no-perms > > commands used: > > emacs --fg-daemon -Q > emacsclient no-perms # in a separate terminal > > what stops working: when I type, the letters I type don't appear in the terminal anymore. nothing is > echoed back to me. stuff still happens, and I can enter commands, but I can't see anything. And the > terminal width seems screwed up. like things that should get indented, they don't look right. Thanks. Please try the patch below and see if it solves the problem without adding any new ones. diff --git a/lisp/server.el b/lisp/server.el index eaf24a770e4..7e35eaa6176 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -1138,6 +1138,11 @@ server-process-filter (server-log "Authentication failed" proc) (server-send-string proc (concat "-error " (server-quote-arg "Authentication failed"))) + (unless (eq system-type 'windows-nt) + (let ((terminal (process-get proc 'terminal))) + ;; Only delete the terminal if it is non-nil. + (when (and terminal (eq (terminal-live-p terminal) t)) + (delete-terminal terminal)))) ;; Before calling `delete-process', give emacsclient time to ;; receive the error string and shut down on its own. (sit-for 1) @@ -1459,6 +1464,11 @@ server-return-error proc (concat "-error " (server-quote-arg (error-message-string err)))) (server-log (error-message-string err) proc) + (unless (eq system-type 'windows-nt) + (let ((terminal (process-get proc 'terminal))) + ;; Only delete the terminal if it is non-nil. + (when (and terminal (eq (terminal-live-p terminal) t)) + (delete-terminal terminal)))) ;; Before calling `delete-process', give emacsclient time to ;; receive the error string and shut down on its own. (sit-for 5) From debbugs-submit-bounces@debbugs.gnu.org Tue May 23 16:30:39 2023 Received: (at 63629) by debbugs.gnu.org; 23 May 2023 20:30:39 +0000 Received: from localhost ([127.0.0.1]:40480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1YeU-0001Wz-Au for submit@debbugs.gnu.org; Tue, 23 May 2023 16:30:38 -0400 Received: from mail-ed1-f50.google.com ([209.85.208.50]:46322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1YeR-0001Wm-Rb for 63629@debbugs.gnu.org; Tue, 23 May 2023 16:30:37 -0400 Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-510db954476so534619a12.0 for <63629@debbugs.gnu.org>; Tue, 23 May 2023 13:30:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684873830; x=1687465830; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VuGAgIig9bWBZ4vwVJxjxrVreYMUMNbe652mTn9m8ak=; b=IxjXZ7YK98wWJ3yHNZcCcszTpHkMYi6HTbD9dWBSNkFhfnF4oqJDE98GtCjqwOSlP7 O0c/gG6AETu/O7DjyXJa7z1prSgS7TlzOK+uFSUH6Q4w1ssWG33LkhjEF497DA+oSCAY Axq2kywZRCiIMaws/fQGGtQ1WyPVxymK1BmxIn8eiTetCPKSlB4ufydLmtsHJjUsBv3I d7LpgB+fnF3XMdGvsjoOItrL5UQko4knIeCM9LOy4+aD/rkT/tYeZQBpOAEIsNmREHtA TCHO6gnExjS/D/V0tEFOJ1FdxRxRxPZP7Jcw8GTiyB4G6/SFGNWbo/bO0GVCEuyUjH9y hFvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684873830; x=1687465830; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VuGAgIig9bWBZ4vwVJxjxrVreYMUMNbe652mTn9m8ak=; b=ZQkyfUlQdWoTp/YnDIhCP0unC326ZBBBB6szSaC4KGfsgR6drduwJxY+PG4pxvTz59 9Tsle1rj2mwG+G9h5fd9GY1QW0Za29Bel76YeEGfExEaVgdquiBvZu68NIn0OsKZ9VQR pun56n5DZzKDXc+3K4Q2cZfyF36+EAls1fz8u1k+1Drl7OfX40SQPm3OxDA2NLQ9+5Mx +OeTSzQQYM5KRS0qFMul/yS4tfCmAQyTfNm6N5p9uzAyHY4WzWR0r/d8nnEDqMFByw5F KPkpW7JR7gL/FTukxbdAqsJBzO3QlWxbaagSTKOV6vM+wWq2KqKwngICxuWmcz8zPp32 LB/Q== X-Gm-Message-State: AC+VfDxIWVTd5JqJe/+8jLivj/S2RHMaqtWR1WXBCyO6KsQw7bI80NNz yjSs92poRLpA/yySZD1f/p3Ss03Pt1zo80gXdEc= X-Google-Smtp-Source: ACHHUZ7lDjlCs7PekZmXaGBQLp1neF5BYoG+OBFO63izGkt76w85CC6DptqbaumDpV13/2DANI/Hbirhcim8tn2Wu44= X-Received: by 2002:a17:907:6288:b0:96a:316f:8abf with SMTP id nd8-20020a170907628800b0096a316f8abfmr15549685ejc.20.1684873829690; Tue, 23 May 2023 13:30:29 -0700 (PDT) MIME-Version: 1.0 References: <83a5xxr1db.fsf@gnu.org> <83v8gkpk6g.fsf@gnu.org> In-Reply-To: <83v8gkpk6g.fsf@gnu.org> From: Adam Ibrahim Date: Tue, 23 May 2023 16:30:14 -0400 Message-ID: Subject: Re: bug#63629: Fwd: bug#63629: 28.3; Emacsclient exits with no error message and breaks terminal when opening a file without permissions To: Eli Zaretskii Content-Type: multipart/alternative; boundary="0000000000001c332605fc62428e" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 63629 Cc: 63629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --0000000000001c332605fc62428e Content-Type: text/plain; charset="UTF-8" I ran the following commands on my phone in termux and in Kitty on my PC 10 times each and record the results. I did it multiple times because the results seem random. ./src/emacs --fg-daemon -Q ./lib-src/emacsclient path/to/no-perms # in a separate terminal, 10 times Phone + Termux: 9 out of 10 times, I got the expected results where the terminal was not broken and I saw an error message. on the 10th time there was some weird behavior, but I haven't been able to reproduce it and I don't remember what happened. PC + Kitty: there were no crashes meaning the terminal wasn't broken anymore. but 6 out of 10 times the error message didn't print. sometimes all I saw was "waiting for emacs..." and some other times all I saw was "...". the other four times was expected behavior colon the error message printed and the terminal wasn't broken. Note: I have a slightly different environment on my phone compared to the first time. when I first reported the bug I was using the emacs and emacsclient programs located on my phone. this time I used the modified emacs and emacsclient from my desktop over SSH. I don't know if that changed the results. But the bug with unmodified emacs happens just the same over SSH as with emacs on my phone. On Mon, May 22, 2023, 09:30 Eli Zaretskii wrote: > > From: Adam Ibrahim > > Date: Sun, 21 May 2023 14:57:03 -0400 > > > > output of `ls -l`: > > > > ls -l no-perms > > ---------- 1 u0_a331 u0_a331 0 May 21 14:27 no-perms > > > > commands used: > > > > emacs --fg-daemon -Q > > emacsclient no-perms # in a separate terminal > > > > what stops working: when I type, the letters I type don't appear in the > terminal anymore. nothing is > > echoed back to me. stuff still happens, and I can enter commands, but I > can't see anything. And the > > terminal width seems screwed up. like things that should get indented, > they don't look right. > > Thanks. Please try the patch below and see if it solves the problem > without adding any new ones. > > diff --git a/lisp/server.el b/lisp/server.el > index eaf24a770e4..7e35eaa6176 100644 > --- a/lisp/server.el > +++ b/lisp/server.el > @@ -1138,6 +1138,11 @@ server-process-filter > (server-log "Authentication failed" proc) > (server-send-string > proc (concat "-error " (server-quote-arg "Authentication failed"))) > + (unless (eq system-type 'windows-nt) > + (let ((terminal (process-get proc 'terminal))) > + ;; Only delete the terminal if it is non-nil. > + (when (and terminal (eq (terminal-live-p terminal) t)) > + (delete-terminal terminal)))) > ;; Before calling `delete-process', give emacsclient time to > ;; receive the error string and shut down on its own. > (sit-for 1) > @@ -1459,6 +1464,11 @@ server-return-error > proc (concat "-error " (server-quote-arg > (error-message-string err)))) > (server-log (error-message-string err) proc) > + (unless (eq system-type 'windows-nt) > + (let ((terminal (process-get proc 'terminal))) > + ;; Only delete the terminal if it is non-nil. > + (when (and terminal (eq (terminal-live-p terminal) t)) > + (delete-terminal terminal)))) > ;; Before calling `delete-process', give emacsclient time to > ;; receive the error string and shut down on its own. > (sit-for 5) > --0000000000001c332605fc62428e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I ran the following commands on my phone in termux and in= Kitty on my PC 10 times each and record the results. I did it multiple tim= es because the results seem random.

=C2=A0./src/emacs --fg-daemon -Q
=C2=A0./lib-s= rc/emacsclient path/to/no-perms # in a separate terminal, 10 times

Phone + Termux: 9 out of 10 time= s, I got the expected results where the terminal was not broken and I saw a= n error message. on the 10th time there was some weird behavior, but I have= n't been able to reproduce it and I don't remember what happened.

PC + Kitty: there were no= crashes meaning the terminal wasn't broken anymore. but 6 out of 10 ti= mes the error message didn't print. sometimes all I saw was "waiti= ng for emacs..." and some other times all I saw was "...". t= he other four times was expected behavior colon the error message printed a= nd the terminal wasn't broken.

Note: I have a slightly different environment on my phone compar= ed to the first time. when I first reported the bug I was using the emacs a= nd emacsclient programs located on my phone. this time I used the modified = emacs and emacsclient from my desktop over SSH. I don't know if that ch= anged the results. But the bug with unmodified emacs happens just the same = over SSH as with emacs on my phone.

On Mon, May 22, 2023, 09:30 Eli Za= retskii <eliz@gnu.org> wrote:
=
> From: Adam Ibrahim <ibra= himadam193@gmail.com>
> Date: Sun, 21 May 2023 14:57:03 -0400
>
> output of `ls -l`:
>
>=C2=A0 ls -l no-perms
>=C2=A0 ---------- 1 u0_a331 u0_a331 0 May 21 14:27 no-perms
>
> commands used:
>
>=C2=A0 emacs --fg-daemon -Q
>=C2=A0 emacsclient no-perms # in a separate terminal
>
> what stops working: when I type, the letters I type don't appear i= n the terminal anymore. nothing is
> echoed back to me. stuff still happens, and I can enter commands, but = I can't see anything. And the
> terminal width seems screwed up. like things that should get indented,= they don't look right.

Thanks.=C2=A0 Please try the patch below and see if it solves the problem without adding any new ones.

diff --git a/lisp/server.el b/lisp/server.el
index eaf24a770e4..7e35eaa6176 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1138,6 +1138,11 @@ server-process-filter
=C2=A0 =C2=A0 =C2=A0 =C2=A0(server-log "Authentication failed" pr= oc)
=C2=A0 =C2=A0 =C2=A0 =C2=A0(server-send-string
=C2=A0 =C2=A0 =C2=A0 =C2=A0 proc (concat "-error " (server-quote-= arg "Authentication failed")))
+=C2=A0 =C2=A0 =C2=A0 (unless (eq system-type 'windows-nt)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((terminal (process-get proc 'termina= l)))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; Only delete the terminal if it is no= n-nil.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (when (and terminal (eq (terminal-live-= p terminal) t))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(delete-terminal terminal))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0;; Before calling `delete-process', give ema= csclient time to
=C2=A0 =C2=A0 =C2=A0 =C2=A0;; receive the error string and shut down on its= own.
=C2=A0 =C2=A0 =C2=A0 =C2=A0(sit-for 1)
@@ -1459,6 +1464,11 @@ server-return-error
=C2=A0 =C2=A0 =C2=A0 proc (concat "-error " (server-quote-arg
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (error-message-string err))))
=C2=A0 =C2=A0 =C2=A0(server-log (error-message-string err) proc)
+=C2=A0 =C2=A0 (unless (eq system-type 'windows-nt)
+=C2=A0 =C2=A0 =C2=A0 (let ((terminal (process-get proc 'terminal))) +=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; Only delete the terminal if it is non-nil.<= br> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 (when (and terminal (eq (terminal-live-p termi= nal) t))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(delete-terminal terminal))))
=C2=A0 =C2=A0 =C2=A0;; Before calling `delete-process', give emacsclien= t time to
=C2=A0 =C2=A0 =C2=A0;; receive the error string and shut down on its own. =C2=A0 =C2=A0 =C2=A0(sit-for 5)
--0000000000001c332605fc62428e-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 24 06:52:12 2023 Received: (at 63629) by debbugs.gnu.org; 24 May 2023 10:52:12 +0000 Received: from localhost ([127.0.0.1]:42074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1m6F-0006Oy-Rg for submit@debbugs.gnu.org; Wed, 24 May 2023 06:52:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1m6E-0006Ol-92 for 63629@debbugs.gnu.org; Wed, 24 May 2023 06:52:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1m69-0006De-0D; Wed, 24 May 2023 06:52:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=VRRILu6ThAFkwRVY6YvZ677qsO4W8DDa4W2gtqzYvM4=; b=VZM/flfjdk4f qH8U+iFq0Awisa/LiMuG6wRpLg6Y+6ucQvB2G969BeqBY+pPi33VZuQufw/rX8tcycg05rFgL2r8r AZPmYGFb6Jwm6aTTCU5rXTRRKuIakalJGUPBGO8+E+212nb9e+0k4yJotN3n/sBx3fRNzlp353Tms tL6Ua4ca/NquANCEJVGPHJaAPuQkjLelMsQVjeeqIk3nT1jJLNMeUQ2rjfzmz6Z+Ku4nplGb9zNEh RKOUo0J6Vde1bt5CliQ3VsQQa1Y7FFLM4P5IcfGE9x2bFjz1kcB5nPwmhpFlEeZ/I9Mda/au5PSQ+ ooP0Z6G3qrkbII4ifQG9pw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1m68-0004j8-Ep; Wed, 24 May 2023 06:52:04 -0400 Date: Wed, 24 May 2023 13:52:31 +0300 Message-Id: <83lehengr4.fsf@gnu.org> From: Eli Zaretskii To: Adam Ibrahim In-Reply-To: (message from Adam Ibrahim on Tue, 23 May 2023 16:30:14 -0400) Subject: Re: bug#63629: Fwd: bug#63629: 28.3; Emacsclient exits with no error message and breaks terminal when opening a file without permissions References: <83a5xxr1db.fsf@gnu.org> <83v8gkpk6g.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63629 Cc: 63629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Adam Ibrahim > Date: Tue, 23 May 2023 16:30:14 -0400 > Cc: 63629@debbugs.gnu.org > > I ran the following commands on my phone in termux and in Kitty on my PC 10 times each and record > the results. I did it multiple times because the results seem random. > > ./src/emacs --fg-daemon -Q > ./lib-src/emacsclient path/to/no-perms # in a separate terminal, 10 times > > Phone + Termux: 9 out of 10 times, I got the expected results where the terminal was not broken and I > saw an error message. on the 10th time there was some weird behavior, but I haven't been able to > reproduce it and I don't remember what happened. > > PC + Kitty: there were no crashes meaning the terminal wasn't broken anymore. but 6 out of 10 times > the error message didn't print. sometimes all I saw was "waiting for emacs..." and some other times > all I saw was "...". the other four times was expected behavior colon the error message printed and the > terminal wasn't broken. > > Note: I have a slightly different environment on my phone compared to the first time. when I first > reported the bug I was using the emacs and emacsclient programs located on my phone. this time I > used the modified emacs and emacsclient from my desktop over SSH. I don't know if that changed the > results. But the bug with unmodified emacs happens just the same over SSH as with emacs on my > phone. If the only problem you see after the change is that you don't always see the error message, then it's expected. emacsclient outputs the error message to stderr, and when there's a client frame on that display, it is impossible to make sure the error message will always be shown, before it is erased when the terminal is closed by the server Emacs process. So the only thing the fix tries to guarantee is that you will be able to use the terminal after emacsclient exits. If this happens in all the configurations you tried, then the goal of the change is achieved, and I don't think we can do much more. From debbugs-submit-bounces@debbugs.gnu.org Wed May 24 08:08:38 2023 Received: (at 63629) by debbugs.gnu.org; 24 May 2023 12:08:38 +0000 Received: from localhost ([127.0.0.1]:42429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1nID-0002f1-SN for submit@debbugs.gnu.org; Wed, 24 May 2023 08:08:38 -0400 Received: from mail-ej1-f53.google.com ([209.85.218.53]:62598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1nIA-0002em-L6 for 63629@debbugs.gnu.org; Wed, 24 May 2023 08:08:35 -0400 Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-95fde138693so1222935466b.0 for <63629@debbugs.gnu.org>; Wed, 24 May 2023 05:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684930108; x=1687522108; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3ltRtTGyn6X96p8IgJGF62ZEb2uStwAMuDOkV6L0s5E=; b=BK3IBnqlSpvl6t3gZ0ywWOTNCNYBXHYVlrhn6MXOl3+8wkTeArgp3kim5u8qS6nz2q REKwtW+Hn7GbQkQk/h7dyg7CoSvplLh4y/MoKQoTuBz/Lcvc9mjdorilFXmAU7h1fEcG aviwS5Kr2ZOUHE3By+N7lkyv7Cdf8ezBhxftHqkaUo1jUhN06kbAgPUhA2ZXp5mNT7+Y r/B9YDHJchq4rVsHjk66/dnvtzlLAtw5JDcrn8yPHeMGW44x2e2gMPw1n0UEl7BMwGpG vyo5Q/40yIXOYUF050Cj8b09WR/0mDCVJ2hIlv8mzO3AhRakPcuPWoMV9oWob5vSddjo 0/Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684930108; x=1687522108; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3ltRtTGyn6X96p8IgJGF62ZEb2uStwAMuDOkV6L0s5E=; b=MV9ZWcwN6sxa5DkOWBqY9iqjIgt/eMqJkY+CN7yTbCfggkD+tb9adSTpqwtIK7Na4B RdnN6gF0zZFvyv5tAOvyz3r07HgkBNgQCotbDNcxk96YEXD79y3vwHmRM3baj4DmXDm4 nVXVlsXpBaZaWGAZ8FL+OoQT0pBhT3pI1j/0T3Zm7OfHAGesbrQF1L48H0mDkACduSfS 1MxbLZhaLI3X4ahLpESqdL7MJI4uAyNASOHw4CoI7JEN1v5ZsMyU2CrukBnN7i/9B3Xk XnngNk1a1hmxKyf9gb7lrJDAPZdoHo6R/i5sxGrMsS00eUGPGwTZREiAmVIjBZ9I9CXH eq/g== X-Gm-Message-State: AC+VfDzX14ibuBtI98nE4pMP8wsI8hwTYSsnpwMVsMIMHhQCPZayv3Rm i/wsNLtEgxFFvb5hiahUuYUavq2lY3iEBn+LU1E= X-Google-Smtp-Source: ACHHUZ4bvPwWX1hV0PcdqSmICvQ/aPp+J2WapPOaOxiR3FzYDjy124+P2gmMjzFOwqVUNbAngSScKyvLjPps5JSznDg= X-Received: by 2002:a17:907:8a20:b0:953:834d:899b with SMTP id sc32-20020a1709078a2000b00953834d899bmr16274574ejc.29.1684930108404; Wed, 24 May 2023 05:08:28 -0700 (PDT) MIME-Version: 1.0 References: <83a5xxr1db.fsf@gnu.org> <83v8gkpk6g.fsf@gnu.org> <83lehengr4.fsf@gnu.org> In-Reply-To: <83lehengr4.fsf@gnu.org> From: Adam Ibrahim Date: Wed, 24 May 2023 08:08:13 -0400 Message-ID: Subject: Re: bug#63629: Fwd: bug#63629: 28.3; Emacsclient exits with no error message and breaks terminal when opening a file without permissions To: Eli Zaretskii Content-Type: multipart/alternative; boundary="0000000000009538e205fc6f5ce2" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 63629 Cc: 63629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --0000000000009538e205fc6f5ce2 Content-Type: text/plain; charset="UTF-8" Makes sense. Thanks. On Wed, May 24, 2023, 06:52 Eli Zaretskii wrote: > > From: Adam Ibrahim > > Date: Tue, 23 May 2023 16:30:14 -0400 > > Cc: 63629@debbugs.gnu.org > > > > I ran the following commands on my phone in termux and in Kitty on my PC > 10 times each and record > > the results. I did it multiple times because the results seem random. > > > > ./src/emacs --fg-daemon -Q > > ./lib-src/emacsclient path/to/no-perms # in a separate terminal, 10 > times > > > > Phone + Termux: 9 out of 10 times, I got the expected results where the > terminal was not broken and I > > saw an error message. on the 10th time there was some weird behavior, > but I haven't been able to > > reproduce it and I don't remember what happened. > > > > PC + Kitty: there were no crashes meaning the terminal wasn't broken > anymore. but 6 out of 10 times > > the error message didn't print. sometimes all I saw was "waiting for > emacs..." and some other times > > all I saw was "...". the other four times was expected behavior colon > the error message printed and the > > terminal wasn't broken. > > > > Note: I have a slightly different environment on my phone compared to > the first time. when I first > > reported the bug I was using the emacs and emacsclient programs located > on my phone. this time I > > used the modified emacs and emacsclient from my desktop over SSH. I > don't know if that changed the > > results. But the bug with unmodified emacs happens just the same over > SSH as with emacs on my > > phone. > > If the only problem you see after the change is that you don't always > see the error message, then it's expected. emacsclient outputs the > error message to stderr, and when there's a client frame on that > display, it is impossible to make sure the error message will always > be shown, before it is erased when the terminal is closed by the > server Emacs process. So the only thing the fix tries to guarantee is > that you will be able to use the terminal after emacsclient exits. If > this happens in all the configurations you tried, then the goal of the > change is achieved, and I don't think we can do much more. > --0000000000009538e205fc6f5ce2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Makes sense. Thanks.

On Wed, May 24, 202= 3, 06:52 Eli Zaretskii <eliz@gnu.org> wrote:
> From: Adam Ibrahim <ibrahimadam193@g= mail.com>
> Date: Tue, 23 May 2023 16:30:14 -0400
> Cc: 63629@debbugs.gnu.org
>
> I ran the following commands on my phone in termux and in Kitty on my = PC 10 times each and record
> the results. I did it multiple times because the results seem random.<= br> >
>=C2=A0 ./src/emacs --fg-daemon -Q
>=C2=A0 ./lib-src/emacsclient path/to/no-perms # in a separate terminal,= 10 times
>
> Phone + Termux: 9 out of 10 times, I got the expected results where th= e terminal was not broken and I
> saw an error message. on the 10th time there was some weird behavior, = but I haven't been able to
> reproduce it and I don't remember what happened.
>
> PC + Kitty: there were no crashes meaning the terminal wasn't brok= en anymore. but 6 out of 10 times
> the error message didn't print. sometimes all I saw was "wait= ing for emacs..." and some other times
> all I saw was "...". the other four times was expected behav= ior colon the error message printed and the
> terminal wasn't broken.
>
> Note: I have a slightly different environment on my phone compared to = the first time. when I first
> reported the bug I was using the emacs and emacsclient programs locate= d on my phone. this time I
> used the modified emacs and emacsclient from my desktop over SSH. I do= n't know if that changed the
> results. But the bug with unmodified emacs happens just the same over = SSH as with emacs on my
> phone.

If the only problem you see after the change is that you don't always see the error message, then it's expected.=C2=A0 emacsclient outputs th= e
error message to stderr, and when there's a client frame on that
display, it is impossible to make sure the error message will always
be shown, before it is erased when the terminal is closed by the
server Emacs process.=C2=A0 So the only thing the fix tries to guarantee is=
that you will be able to use the terminal after emacsclient exits.=C2=A0 If=
this happens in all the configurations you tried, then the goal of the
change is achieved, and I don't think we can do much more.
--0000000000009538e205fc6f5ce2-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 26 06:29:20 2023 Received: (at 63629) by debbugs.gnu.org; 26 May 2023 10:29:21 +0000 Received: from localhost ([127.0.0.1]:48926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2UhE-00064I-Hf for submit@debbugs.gnu.org; Fri, 26 May 2023 06:29:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2Uh8-00063v-Vc for 63629@debbugs.gnu.org; Fri, 26 May 2023 06:29:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2Uh3-0005pH-Is; Fri, 26 May 2023 06:29:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xLVjovKhSXpoMToQyL1mb2bL2BCtCoMvjPgW3egZFDA=; b=nA3voAPNoUaG OSaVAtQSfA4xfGMdIPvPISxDDmvldeoopLkPu450I8Awws13KlFktRYtQdYRlGW2woJT6bPXTe9hQ 39RizP6ulzlRnIyvVs1pyZuJupybqy+Rw1vw3Km6TFwkf7abXJkwg+e8bNeju5gMucqhmw4+ex8EC mt5BJ89wTqqr6LSteeZLuUTVTYYZDdzcmbaBDPhSGGGjGT5zC09vz4UuPrmOEmsEVNnd9LQpr++ZU lLgOMDXdAD4pAw85DrvwUALk4yr8Mxbxk5s9WpxMEKU+N+Q1DGw9Id2mNfZYu+rns5/C2gnqLc32P tNvdMCJ1+Va9t2+pjt4U7A==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2Uh2-0007Na-0G; Fri, 26 May 2023 06:29:08 -0400 Date: Fri, 26 May 2023 13:29:38 +0300 Message-Id: <837csvl71p.fsf@gnu.org> From: Eli Zaretskii To: Adam Ibrahim In-Reply-To: (message from Adam Ibrahim on Wed, 24 May 2023 08:08:13 -0400) Subject: Re: bug#63629: Fwd: bug#63629: 28.3; Emacsclient exits with no error message and breaks terminal when opening a file without permissions References: <83a5xxr1db.fsf@gnu.org> <83v8gkpk6g.fsf@gnu.org> <83lehengr4.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63629 Cc: 63629@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Adam Ibrahim > Date: Wed, 24 May 2023 08:08:13 -0400 > Cc: 63629@debbugs.gnu.org > > Makes sense. Thanks. I eventually found a way of showing the error message in almost all cases, and installed the fix with those changes on the master branch. Please try the patch below and see if it produces better results. diff --git a/lisp/server.el b/lisp/server.el index 608e5df..c3325e5 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -1143,8 +1143,18 @@ server-process-filter (process-put proc :authenticated t) (server-log "Authentication successful" proc)) (server-log "Authentication failed" proc) + ;; Display the error as a message and give the user time to see + ;; it, in case the error written by emacsclient to stderr is not + ;; visible for some reason. + (message "Authentication failed") + (sit-for 2) (server-send-string proc (concat "-error " (server-quote-arg "Authentication failed"))) + (unless (eq system-type 'windows-nt) + (let ((terminal (process-get proc 'terminal))) + ;; Only delete the terminal if it is non-nil. + (when (and terminal (eq (terminal-live-p terminal) t)) + (delete-terminal terminal)))) ;; Before calling `delete-process', give emacsclient time to ;; receive the error string and shut down on its own. (sit-for 1) @@ -1462,10 +1472,20 @@ server-execute (defun server-return-error (proc err) (ignore-errors + ;; Display the error as a message and give the user time to see + ;; it, in case the error written by emacsclient to stderr is not + ;; visible for some reason. + (message (error-message-string err)) + (sit-for 2) (server-send-string proc (concat "-error " (server-quote-arg (error-message-string err)))) (server-log (error-message-string err) proc) + (unless (eq system-type 'windows-nt) + (let ((terminal (process-get proc 'terminal))) + ;; Only delete the terminal if it is non-nil. + (when (and terminal (eq (terminal-live-p terminal) t)) + (delete-terminal terminal)))) ;; Before calling `delete-process', give emacsclient time to ;; receive the error string and shut down on its own. (sit-for 5) From debbugs-submit-bounces@debbugs.gnu.org Wed May 31 09:20:45 2023 Received: (at 63629-done) by debbugs.gnu.org; 31 May 2023 13:20:45 +0000 Received: from localhost ([127.0.0.1]:35105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4Lkr-0000FY-0E for submit@debbugs.gnu.org; Wed, 31 May 2023 09:20:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4Lkp-0000FJ-Vg for 63629-done@debbugs.gnu.org; Wed, 31 May 2023 09:20:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4Lkk-0003lJ-Lg; Wed, 31 May 2023 09:20:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=zy6qx5Nq64Mh8fqfdL93cQ+YL8Q36j3fKz04z9Tyzfc=; b=lyUmUadNpHbY bazEIQE5kwc3KHajWZENbhFureNh6MFRZXOBmd+k8c3iGwjFhs/1YeiWHSUqA2GJ8MkuwX5sVQbqq XL1BfzunaV06eQxUMwkOdowi+vFJaIwKjDAri/xlaZTRIay67YmrQRTch3+sF2Z2BxTXJGzcNcejG 1xTgN6lNKW4jQ8pAzJbX5BHsnMYILhT19ZDiB4cjaSdi2tLqzIdIU8r0XhXRyDyPw3hNuRymKFuP1 WSgwRxLhwb+VsKdPEy+ZmHXhDd87LXuO5Ps17bsm1TmRz6Pycy6V6sSe2bV6rDEC84c1uulm1mHBd q7jplviBUEDWaAAR3xZGLw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4LkH-00023t-CU; Wed, 31 May 2023 09:20:37 -0400 Date: Wed, 31 May 2023 16:20:54 +0300 Message-Id: <831qiwfxhl.fsf@gnu.org> From: Eli Zaretskii To: ibrahimadam193@gmail.com In-Reply-To: <837csvl71p.fsf@gnu.org> (message from Eli Zaretskii on Fri, 26 May 2023 13:29:38 +0300) Subject: Re: bug#63629: Fwd: bug#63629: 28.3; Emacsclient exits with no error message and breaks terminal when opening a file without permissions References: <83a5xxr1db.fsf@gnu.org> <83v8gkpk6g.fsf@gnu.org> <83lehengr4.fsf@gnu.org> <837csvl71p.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63629-done Cc: 63629-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 63629@debbugs.gnu.org > Date: Fri, 26 May 2023 13:29:38 +0300 > From: Eli Zaretskii > > > From: Adam Ibrahim > > Date: Wed, 24 May 2023 08:08:13 -0400 > > Cc: 63629@debbugs.gnu.org > > > > Makes sense. Thanks. > > I eventually found a way of showing the error message in almost all > cases, and installed the fix with those changes on the master branch. > Please try the patch below and see if it produces better results. No more comments, so I'm closing this bug. From unknown Sat Jun 21 02:53:53 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 29 Jun 2023 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator