From unknown Sat Aug 09 09:34:36 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#64866 <64866@debbugs.gnu.org> To: bug#64866 <64866@debbugs.gnu.org> Subject: Status: 30.0.50; Emacsclient block for 2 seconds when error is raised from command Reply-To: bug#64866 <64866@debbugs.gnu.org> Date: Sat, 09 Aug 2025 16:34:36 +0000 retitle 64866 30.0.50; Emacsclient block for 2 seconds when error is raised= from command reassign 64866 emacs submitter 64866 Yikai Zhao severity 64866 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 25 22:10:41 2023 Received: (at submit) by debbugs.gnu.org; 26 Jul 2023 02:10:41 +0000 Received: from localhost ([127.0.0.1]:47254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOTz6-0004VM-Ba for submit@debbugs.gnu.org; Tue, 25 Jul 2023 22:10:41 -0400 Received: from lists.gnu.org ([2001:470:142::17]:33704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOTz3-0004V6-GG for submit@debbugs.gnu.org; Tue, 25 Jul 2023 22:10:38 -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 1qOTyx-0008SX-P8 for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2023 22:10:31 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOTyv-0005Id-FM for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2023 22:10:31 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1b8ad9eede0so49485865ad.1 for ; Tue, 25 Jul 2023 19:10:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=z1k.dev; s=google; t=1690337425; x=1690942225; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=ELPKvAFMrOFzBcu53zDqOAQpaGUj9z8WUQ1vycrmAxY=; b=EVJ60kNHhoofwfpdgW5Oe5n2TfIPkN3r1Z2QZjoXTy58S1J8DA20vTEvZSHEbsc2ql LRlMUw0yrbvJQ18A7InkoUnvWt+FW9+pJoS2W1zw+5u0Q/itZKxAZZhMfGplGhyigokV esVHeckd8hEOQVLaUD2DPciwIAPhovXiALOCWyhfhX9EfJRPJ46Vb5HSQ/WRPWgS1XVo tqhH8vL52pvZK9ryF4zVMglAIJjanCrIQqmNsy/vbB2/usjM1fY2cXyXQD18Vh5gnp0n u3eZWk9HWBfF+Dlnh9gBrk71sT0eFeBk5vf0BWVDvQcfxjB9gUXw+ere5iN4LCMRHPPm KVAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690337425; x=1690942225; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ELPKvAFMrOFzBcu53zDqOAQpaGUj9z8WUQ1vycrmAxY=; b=fWoq4E2pD0l7Z3ffG4j8YdNR7UZZSCmHZTKwzL2H3GFe9FTn9t4HwruRynsmFfG532 TbTlEfdRwNk8v4yQPQTkPrU2/lbmPn7DXdrtsREI/oDhTPFQN2+MNP/fvazzxKK4gTDe znYe67yHM9VevWS9WlkDS9KjQI7ilgSvKi5ikYiqoRV1dV/rBb61s3nahngfT530SQoa K0Rfcur68zxG5M0tat3lLqSXMvopo+Oz4TskI43gKT9hN/Z++xe2lQpAIDvK1zTaUg5m 5mNsrXEkkhXBluL5KWfdpNJaw/RUaAmRl7cowUPCXt8WgEXywAdbIsGQzaKDFyyIhEOv ESug== X-Gm-Message-State: ABy/qLZBBro5zBb+TLFMn4vY6yqwj4ZdGqW8yz89RE7Uh2LZk5+DyrPn znvzltNIYn13xvYWRnbfgqOQ5CosLf/MOs2CGeKtFbVy X-Google-Smtp-Source: APBJJlFMyzH1kGB6xki6783tfs+vqQdjDwrBArSEh+lfCAGDCYd1nsIEovRJYZw4/XRF319eyVfGAA== X-Received: by 2002:a17:902:b202:b0:1b5:694:b1a9 with SMTP id t2-20020a170902b20200b001b50694b1a9mr895568plr.32.1690337424648; Tue, 25 Jul 2023 19:10:24 -0700 (PDT) Received: from Oldtown ([2a06:a005:8d1:3000::23]) by smtp.gmail.com with ESMTPSA id w13-20020a170902d70d00b001afd821c057sm11713193ply.58.2023.07.25.19.10.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 19:10:24 -0700 (PDT) From: Yikai Zhao To: bug-gnu-emacs@gnu.org Subject: 30.0.50; Emacsclient block for 2 seconds when error is raised from command Date: Wed, 26 Jul 2023 10:10:08 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=i@blahgeek.com; helo=mail-pl1-x62a.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: After updating to recent master version of emacs, emacsclient would block for an extra 2 seconds when some error is raised from command. Minimal reproducable command: emacsclient -s <...> -e '(error "x")' Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_SCC_BODY_TEXT_LINE No description available. 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: 0.2 (/) After updating to recent master version of emacs, emacsclient would block for an extra 2 seconds when some error is raised from command. Minimal reproducable command: emacsclient -s <...> -e '(error "x")' Expected behavior: this command should return immediately Current behavior: this command take 2 second Why it affects me: I bind some keyboard shortcut globally to a script to move either from emacs window or i3wm window. It does something like this: emacsclient -e '(windmove-right)' || i3-msg focus right It rely on the behavior that, if I'm currently in the rightmost emacs buffer, '(windmove-right)' would return an error and fallback to use i3-msg to move to another frame. With this bug I mentioned, it would introduce 2-second delay on this action. In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-07-23 built on lilac-0 Repository revision: 5d2d28458d0eb378a7e94363ef716e8648ef129a Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 System Description: Arch Linux Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-modules --without-libotf --without-m17n-flt --without-gconf --with-native-compilation=yes --with-native-compilation=aot --with-sound=no --with-xwidgets --with-tree-sitter --without-gpm '--program-transform-name=s/\([ec]tags\)/\1.emacs/' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/emacs-native-comp-git/src=/usr/src/debug/emacs-native-comp-git -flto=auto' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM XWIDGETS GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=fcitx locale-coding-system: utf-8-unix Major mode: VTerm Minor modes in effect: sudo-edit-indicator-mode: t windmove-mode: t projectile-mode: t recentf-mode: t global-git-commit-mode: t magit-auto-revert-mode: t pixel-scroll-precision-mode: t server-mode: t winner-mode: t global-auto-revert-mode: t save-place-mode: t vertico-mode: t which-key-mode: t global-evil-visualstar-mode: t evil-visualstar-mode: t evil-snipe-mode: t evil-snipe-local-mode: t evil-owl-mode: t global-evil-surround-mode: t evil-surround-mode: t evil-commentary-mode: t evil-mode: t evil-local-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 buffer-read-only: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/blahgeek/.emacs.d/lib/cmake-mode/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /home/blahgeek/.emacs.d/lib/protobuf-mode/protobuf-mode hides /usr/share/emacs/site-lisp/protobuf-mode /home/blahgeek/.emacs.d/lib/transient/lisp/transient hides /usr/share/emacs/30.0.50/lisp/transient /home/blahgeek/.emacs.d/lib/use-package/use-package hides /usr/share/emacs/30.0.50/lisp/use-package/use-package /home/blahgeek/.emacs.d/lib/use-package/use-package-lint hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-lint /home/blahgeek/.emacs.d/lib/use-package/use-package-jump hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-jump /home/blahgeek/.emacs.d/lib/use-package/use-package-ensure hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-ensure /home/blahgeek/.emacs.d/lib/use-package/use-package-ensure-system-package hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-ensure-system-package /home/blahgeek/.emacs.d/lib/use-package/use-package-diminish hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-diminish /home/blahgeek/.emacs.d/lib/use-package/use-package-delight hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-delight /home/blahgeek/.emacs.d/lib/use-package/use-package-core hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-core /home/blahgeek/.emacs.d/lib/use-package/use-package-bind-key hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-bind-key /home/blahgeek/.emacs.d/lib/use-package/bind-key hides /usr/share/emacs/30.0.50/lisp/use-package/bind-key Features: (shadow sort mail-extr emacsbug evil-collection-woman woman evil-collection-man man rfc2104 sudo-edit conf-mode cl-print pulse consult-xref jka-compr evil-collection-shortdoc shortdoc dired-aux dired-x help-fns tramp-cmds windmove tramp-cache time-stamp lsp-diagnostics lsp-modeline evil-collection-view view lsp-zig lsp-tilt lsp-steep lsp-svelte lsp-sqls lsp-ruby-syntax-tree lsp-ruby-lsp lsp-yaml lsp-xml lsp-vimscript lsp-vhdl lsp-volar lsp-vetur lsp-html lsp-verilog lsp-vala lsp-v lsp-typeprof lsp-ttcn3 lsp-toml lsp-terraform lsp-tex lsp-sorbet lsp-solargraph lsp-rust lsp-rf lsp-ruff-lsp lsp-remark lsp-racket lsp-r lsp-purescript lsp-pylsp lsp-pyls lsp-pwsh lsp-php lsp-pls lsp-perlnavigator lsp-perl lsp-openscad lsp-ocaml lsp-magik lsp-nix lsp-nim lsp-nginx lsp-mint lsp-marksman lsp-markdown lsp-lua lsp-kotlin lsp-json lsp-javascript lsp-idris lsp-haxe lsp-groovy lsp-hack lsp-graphql lsp-glsl lsp-gleam lsp-go lsp-completion lsp-gdscript lsp-fsharp lsp-fortran lsp-eslint lsp-erlang lsp-emmet lsp-elixir lsp-elm lsp-dockerfile lsp-dhall lsp-d lsp-css lsp-csharp gnutls lsp-crystal lsp-cmake lsp-clojure lsp-semantic-tokens lsp-clangd dom lsp-beancount lsp-bash lsp-astro lsp-ansible lsp-angular lsp-ada lsp-actionscript lsp-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 evil-collection-flymake flymake-proc flymake etags fileloop generator dabbrev haskell-customize lsp-pyright lsp-mode lsp-protocol evil-collection-xref xref spinner network-stream nsm evil-collection-markdown-mode markdown-mode lv inline ht ewoc vertico-directory evil-vimish-fold vimish-fold f f-shortdoc git-gutter-fringe fringe-helper git-gutter flycheck-posframe posframe flycheck-google-cpplint evil-collection-flycheck flycheck ligature whitespace hl-line display-line-numbers elec-pair hl-todo dtrt-indent tempel copilot evil-collection-org org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete org-list org-footnote org-faces org-entities evil-collection-outline noutline outline ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs evil-collection-calendar cal-menu calendar cal-loaddefs org-version org-compat org-macs editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch s jsonrpc xonsh-mode evil-collection-sh-script sh-script smie executable evil-collection-python python treesit orderless projectile project evil-collection-grep grep ibuf-ext evil-collection-ibuffer ibuffer ibuffer-loaddefs recentf tree-widget wid-edit evil-collection-consult consult autoinsert vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs evil-collection-log-view log-view evil-collection-vc-git vc-git vc vc-dispatcher bug-reference company-keywords company-dabbrev-code company-dabbrev company-capf company-files company magit-bookmark evil-collection-magit magit-submodule 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 evil-collection-package-menu package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-handlers magit-repos magit-apply magit-wip magit-log which-func evil-collection-imenu imenu magit-diff smerge-mode diff evil-collection-diff-mode diff-mode git-commit evil-collection-log-edit log-edit message sendmail mailcap yank-media puny rfc822 mml mml-sec evil-collection-epa 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 pcvs-util add-log magit-core magit-autorevert magit-margin magit-transient magit-process with-editor magit-mode transient magit-git magit-base evil-collection-magit-section magit-section cursor-sensor crm dash time pixel-scroll cua-base auth-source-pass url-parse url-vars server fcitx dbus xml winner evil-collection-vterm vterm evil-collection-bookmark bookmark pp face-remap evil-collection-compile compile text-property-search evil-collection-term term disp-table ehelp find-func vterm-module term/xterm xterm cc-styles cc-align cc-engine cc-vars cc-defs google-c-style autorevert filenotify saveplace tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat xdg shell pcomplete evil-collection-comint comint ansi-osc parse-time iso8601 time-date auth-source eieio eieio-core password-cache json map ansi-color cus-load evil-collection-vertico vertico compat solarized-light-theme solarized-theme solarized solarized-faces color evil-collection-which-key which-key fringe-scale switch-buffer-functions evil-visualstar evil-snipe evil-owl format-spec evil-surround evil-commentary evil-commentary-integration evil-collection-tabulated-list evil-collection-tab-bar evil-collection-simple evil-collection-replace evil-collection-process-menu evil-collection-info evil-collection-indent evil-collection-image image-mode evil-collection-dired dired dired-loaddefs exif evil-collection-help evil-collection-elisp-mode evil-collection-eldoc evil-collection-buff-menu evil-collection annalist evil evil-integration evil-maps evil-commands reveal evil-jumps evil-command-window evil-search evil-ex evil-types evil-macros evil-repeat evil-states evil-core advice evil-common thingatpt rect evil-digraphs evil-vars ring edmacro kmacro byte-opt delight comp comp-cstr warnings icons cl-macs gv use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core yaml-mode-autoloads xonsh-mode-autoloads with-editor-autoloads which-key-autoloads wgrep-autoloads vterm-autoloads vimrc-mode-autoloads vimish-fold-autoloads vertico-autoloads use-package-autoloads treepy-autoloads transient-autoloads tempel-autoloads switch-buffer-functions-autoloads suggest-autoloads sudo-edit-autoloads spinner-autoloads solarized-theme-autoloads s-autoloads rust-mode-autoloads rg-autoloads rainbow-mode-autoloads pydoc-autoloads protobuf-mode-autoloads projectile-autoloads pr-review-autoloads posframe-autoloads popup-autoloads pkg-info-autoloads package-lint-autoloads org-tree-slide-autoloads orderless-autoloads markdown-mode-autoloads magit-autoloads lv-autoloads lua-mode-autoloads lsp-pyright-autoloads lsp-mode-autoloads lsp-haskell-autoloads loop-autoloads llama-autoloads ligature-autoloads kotlin-mode-autoloads just-mode-autoloads jsonnet-mode-autoloads jinja2-mode-autoloads ht-autoloads hl-todo-autoloads haskell-mode-autoloads groovy-mode-autoloads gptel-autoloads goto-chg-autoloads google-c-style-autoloads go-mode-autoloads gn-mode-autoloads git-link-autoloads git-gutter-fringe-autoloads git-gutter-autoloads ghub-autoloads fringe-helper-autoloads flycheck-posframe-autoloads flycheck-package-autoloads flycheck-autoloads fish-mode-autoloads fcitx-autoloads f-autoloads exec-path-from-shell-autoloads evil-visualstar-autoloads evil-vimish-fold-autoloads evil-surround-autoloads evil-snipe-autoloads evil-owl-autoloads evil-commentary-autoloads evil-collection-autoloads evil-autoloads epl-autoloads epkg-autoloads embark-autoloads emacsql-autoloads emacs-fringe-scale-autoloads editorconfig-autoloads dumb-jump-autoloads dtrt-indent-autoloads dockerfile-mode-autoloads devdocs-browser-autoloads delight-autoloads dash-autoloads cuda-mode-autoloads corfu-autoloads copilot-autoloads consult-flycheck-autoloads consult-autoloads compat-autoloads company-emoji-autoloads company-autoloads cmake-mode-autoloads closql-autoloads bpftrace-mode-autoloads borg-autoloads bazel-autoloads rx annalist-autoloads cl-extra help-mode add-node-modules-path-autoloads cl-seq borg loaddefs-gen generate-lisp-file lisp-mnt radix-tree subr-x pcase info cl-loaddefs cl-lib bytecomp byte-compile rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads xwidget-internal dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 914042 1065405) (symbols 48 49562 0) (strings 32 230924 32235) (string-bytes 1 8178630) (vectors 16 107518) (vector-slots 8 2649746 403281) (floats 8 648 8033) (intervals 56 29932 3912) (buffers 984 39)) From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 25 22:29:31 2023 Received: (at 64866) by debbugs.gnu.org; 26 Jul 2023 02:29:31 +0000 Received: from localhost ([127.0.0.1]:47270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOUHL-0004yM-HA for submit@debbugs.gnu.org; Tue, 25 Jul 2023 22:29:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOUHK-0004y7-0Y for 64866@debbugs.gnu.org; Tue, 25 Jul 2023 22:29:30 -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 1qOUHE-0005gW-N1; Tue, 25 Jul 2023 22:29:24 -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=iv/xYyNIVdZJVxaXTpSaQDyHXR08mhl7ZudrExc2c2M=; b=UUqfevV89iAP t+LhGoC1tXoKYzDwjlYqfhFBCmyOdAK3sxBOv116I8XkjuwNy6veKjpEHHu6nr3JiNJiGIARNOlz7 eT5iFjO87SETuSfFcQvVOrUXpPdUndVrQ91SI/jPFrA0Cc0D8AbPcGjrYKwfUmE+8cDlArXPwjVuD 2KVdm4SqjdeAV0veFAC3KZqNz/NPcTNYI9/sA1IXa+D+vrjT30e4sQWaHQ65xtd6dYhc1XMOU7F4W E53+in7VVPPzfCS5atf9eWsNoOEObhL0IVuYGO30+v2oXhF3Fs2BVvVD7A84HCP+rER9CFFql0iUR azeec4CUATOhMPvQfN8aig==; 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 1qOUHE-0001zY-5r; Tue, 25 Jul 2023 22:29:24 -0400 Date: Wed, 26 Jul 2023 05:30:11 +0300 Message-Id: <83y1j3o158.fsf@gnu.org> From: Eli Zaretskii To: Yikai Zhao In-Reply-To: (message from Yikai Zhao on Wed, 26 Jul 2023 10:10:08 +0800) Subject: Re: bug#64866: 30.0.50; Emacsclient block for 2 seconds when error is raised from command References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64866 Cc: 64866@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: Yikai Zhao > Date: Wed, 26 Jul 2023 10:10:08 +0800 > > > After updating to recent master version of emacs, emacsclient would > block for an extra 2 seconds when some error is raised from command. That's deliberate: we want to allow the user to see the error message. It is not a bug. > Why it affects me: > > I bind some keyboard shortcut globally to a script to move either from > emacs window or i3wm window. It does something like this: > > emacsclient -e '(windmove-right)' || i3-msg focus right > > It rely on the behavior that, if I'm currently in the rightmost emacs > buffer, '(windmove-right)' would return an error and fallback to use > i3-msg to move to another frame. With this bug I mentioned, it would > introduce 2-second delay on this action. I don't think your quite special use case is a reason good enough to prevent users from seeing error messages. An error message that cannot be read is useless. Sorry. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 26 11:51:03 2023 Received: (at 64866) by debbugs.gnu.org; 26 Jul 2023 15:51:03 +0000 Received: from localhost ([127.0.0.1]:49901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOgn1-0004NA-9B for submit@debbugs.gnu.org; Wed, 26 Jul 2023 11:51:03 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:55692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOgmy-0004MT-Vs for 64866@debbugs.gnu.org; Wed, 26 Jul 2023 11:51:02 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-31759e6a4a1so3411336f8f.3 for <64866@debbugs.gnu.org>; Wed, 26 Jul 2023 08:51:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=z1k.dev; s=google; t=1690386655; x=1690991455; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=NVT3kufhJjyr8V1hpbfGr79lqefhFo2+lWnsAX1Kmws=; b=eaFS9gEixCeVSdCC3NOfQf/OlvMyyMatpoub3UrBBYnrwTOWMOola3AS7wARftJ2aF SRTc8ODGidvHA2yBjE2BAyhe7Bfyvqp7TgvJK+IAFwQs6aRo3/IWkb/T67msm5+q1e9I Izn0MnjVm0UKwB7Mw0oDmSGJZsQolp7XxRd/anktV/2BtDIm4QvOOgAkV+WN9WMNlw5+ vKmZ18HTuqBRsIlbL83lvfqGcYVmILMLAlOmxYkTKrdshj1MOh1jsSNl6ew/1Q4iKWXB 45RXGxAe5ZW1q8qQIeHs4gibfPleqGWho/Wx9wqad/vkZDiQS9YKIk9pT9dHRItMpFYX +7qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690386655; x=1690991455; h=content-transfer-encoding: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=NVT3kufhJjyr8V1hpbfGr79lqefhFo2+lWnsAX1Kmws=; b=IaiSbqIgNNzbvx3ZZ/g+fNRADMS33kAWrr7DUdMXUA4NjOufRikgqKBnNSxrEW4HcO 2iwIyGuorerYgMQxD9j26+6fDZ3VyEodXedALisurSLZU8I6Uordo3zy+bjwq42Pdu19 xH8LGvzRlu28BrbD3yIPAzTX0le29uQIa1uhBD0J/ZgAJ478+tmqaOjJYonkfsvnzHE5 yL82GH44xnrmyrShLj5KCrZMqtkcO6pWB2G2nyzTiC/EnA4RB9CqN8Z6R8V4fIIuhPyz MqmiES3i0q51tRGHOFH7J92LYAbx2K7l8t5gDbvUKyaGeXqPON+mkLwWudmsqU49h3zk WPSA== X-Gm-Message-State: ABy/qLbwd/kXonngcIsk4fulVzaSZrBM8OCqFqj0M72RL+AFjvs/nV76 HXabclL0JjkhzT0pWZ14PTa0X8EdWJe6CfxkeJvhww== X-Google-Smtp-Source: APBJJlH61gT59ARYlbf94WMtoyNHC+c8yaiR7ynjBKjxmygCWeB4xHPS1O6V9/hjF71QqUfv7r7gWPle5l3vQNXAd0k= X-Received: by 2002:a5d:53ca:0:b0:317:5b32:b2c3 with SMTP id a10-20020a5d53ca000000b003175b32b2c3mr1915654wrw.6.1690386655034; Wed, 26 Jul 2023 08:50:55 -0700 (PDT) MIME-Version: 1.0 References: <83y1j3o158.fsf@gnu.org> In-Reply-To: <83y1j3o158.fsf@gnu.org> From: Yikai Zhao Date: Wed, 26 Jul 2023 23:50:43 +0800 Message-ID: Subject: Re: bug#64866: 30.0.50; Emacsclient block for 2 seconds when error is raised from command To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 64866 Cc: 64866@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.8 (/) Thanks for your reply. That's OK, I understand your point. Previously I thought this should be treated as a bug because in my mind, "emacsclient -e xxxx" is similar to "emacs --eval=3Dxxx" (and further, similar to "python -c xxxx"), which is a general interface to evaluate code (but maybe in a specific environment (the server)). In that case, arbitrarily sleeping some extra seconds in some valid evaluation scenarios seems unexpected. Now I can see why that's not the case as the primary function of emacsclient is to "tell a running Emacs to visit a file". For any others who may be interested, my use case can be workaround by using a slightly more complex command: RES=3D"$(emacsclient -e "(condition-case nil (progn (windmove-right) t) (error nil))")" if [ "$RES" !=3D "t" ]; then return 1 fi On Wed, Jul 26, 2023 at 10:29=E2=80=AFAM Eli Zaretskii wrote= : > > > From: Yikai Zhao > > Date: Wed, 26 Jul 2023 10:10:08 +0800 > > > > > > After updating to recent master version of emacs, emacsclient would > > block for an extra 2 seconds when some error is raised from command. > > That's deliberate: we want to allow the user to see the error message. > It is not a bug. > > > Why it affects me: > > > > I bind some keyboard shortcut globally to a script to move either from > > emacs window or i3wm window. It does something like this: > > > > emacsclient -e '(windmove-right)' || i3-msg focus right > > > > It rely on the behavior that, if I'm currently in the rightmost emacs > > buffer, '(windmove-right)' would return an error and fallback to use > > i3-msg to move to another frame. With this bug I mentioned, it would > > introduce 2-second delay on this action. > > I don't think your quite special use case is a reason good enough to > prevent users from seeing error messages. An error message that > cannot be read is useless. > > Sorry. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 26 11:57:51 2023 Received: (at 64866-done) by debbugs.gnu.org; 26 Jul 2023 15:57:51 +0000 Received: from localhost ([127.0.0.1]:49936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOgtb-0004YJ-Br for submit@debbugs.gnu.org; Wed, 26 Jul 2023 11:57:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOgtZ-0004Y6-00 for 64866-done@debbugs.gnu.org; Wed, 26 Jul 2023 11:57:49 -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 1qOgtT-0003FC-Gr; Wed, 26 Jul 2023 11:57:43 -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=1vkH4uCoM0CvvurHGYWUCnVCKjdXWO0w57uoX+ZZHKY=; b=gBlxJ3Ncg7ll ILb34J2LvGkN/ALpAPauOEHjmR/HjW4uUv7zyaEt1kad1eMOsDtVyyOgJ56XjKeP749Xegh4Xan77 FxusnfMOK8u0Z7IWN32rUHAVnCpUp8j0YBFE8E3inVzrgpqYYGWn4lQUsIyUja4+clZdohSFhsQsR 4n19Oaqgdsl0w7/Z0irk0wM+9Y1Ubn5weYfVePm/mncoJBmwxCN2GvzQNptfJR2TOYjhj7EP0x10I Jbel9QGPCV8GYvFHwLTnZFVAs9QKDEdphXFj5L3QHJxWGm5Lp7/RXeQEl493mtmcH9I2LGi6poDoh vLSoP6BtjXLBeIO9rKGzuw==; 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 1qOgtP-00024N-4E; Wed, 26 Jul 2023 11:57:43 -0400 Date: Wed, 26 Jul 2023 18:58:24 +0300 Message-Id: <83a5vioean.fsf@gnu.org> From: Eli Zaretskii To: Yikai Zhao In-Reply-To: (message from Yikai Zhao on Wed, 26 Jul 2023 23:50:43 +0800) Subject: Re: bug#64866: 30.0.50; Emacsclient block for 2 seconds when error is raised from command References: <83y1j3o158.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64866-done Cc: 64866-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 (---) > From: Yikai Zhao > Date: Wed, 26 Jul 2023 23:50:43 +0800 > Cc: 64866@debbugs.gnu.org > > That's OK, I understand your point. Previously I thought this should > be treated as a bug because in my mind, "emacsclient -e xxxx" is > similar to "emacs --eval=xxx" (and further, similar to "python -c > xxxx"), which is a general interface to evaluate code (but maybe in a > specific environment (the server)). In that case, arbitrarily sleeping > some extra seconds in some valid evaluation scenarios seems > unexpected. Now I can see why that's not the case as the primary > function of emacsclient is to "tell a running Emacs to visit a file". > > > For any others who may be interested, my use case can be workaround by > using a slightly more complex command: > > RES="$(emacsclient -e "(condition-case nil (progn (windmove-right) > t) (error nil))")" > if [ "$RES" != "t" ]; then > return 1 > fi Thanks, I'm therefore closing this bug. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 26 14:07:31 2023 Received: (at 64866) by debbugs.gnu.org; 26 Jul 2023 18:07:31 +0000 Received: from localhost ([127.0.0.1]:50037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOiv5-0007rd-24 for submit@debbugs.gnu.org; Wed, 26 Jul 2023 14:07:31 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:48553) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOiv3-0007rS-Nz for 64866@debbugs.gnu.org; Wed, 26 Jul 2023 14:07:30 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1b8ad9eede0so471405ad.1 for <64866@debbugs.gnu.org>; Wed, 26 Jul 2023 11:07:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690394844; x=1690999644; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=YNRqffopy8UO6EGxmfIojtX1FPwHNVEDElBqp0GGNDQ=; b=N601AbelSNPK4ozeqkgguLHDP5V4uM6UYSQw1aF77UuSPPvVxJWLXttfwm5dTtTnOn xQz+ELnnNSU1MqLcxlmrPSl2qzumyGQT+Z762O3IfsjRDZeP5S66pLJzBSrkh9t5+lHl gHP+Y7170M+L6Fdy7gXdzyama/Q3UE0WEPQQLbQZsBvv67vl+/Jj3dXUnq7AD0NTeU62 izEhxEvfrC7aVibN8nxFf/TdkODAmLiZ9DqxjKQ2DOuJgKNyUvzfLNm496/MsgOnimYt HWZi+wCrw1NU+XcjabzMJanvTClfudAuIVsEDy1vr0M13pGJ7FlJvxF3nUG9mhRFvkoo rNuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690394844; x=1690999644; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YNRqffopy8UO6EGxmfIojtX1FPwHNVEDElBqp0GGNDQ=; b=NxHjF0y66upMefWDkQ1ZnKgoxLPgdv/bbaF2Zu0kAELfrS2//IaNUVAHL5qd4MUOa5 u9iVmXeGaT3VnOcQfnXt+II+q+Wy0H2SRx/5CLBLTnbgdo8YuVgGsJgIgVdRMux9HaDb UmHjcBKevGLDrqMVX1tsRKOw2gjTZ9jKjplLl48Yk4tu1WHCdqciswqfmaUnAIHRgwTR Wl8Odi9VOnp64x+khwo4xRi+Ohk2sIuh/ABdn3O2bE9sAvBWgQzZp5yz3FQiOfd8bdxw fec71Bmz03Luh2TOXKEeskkvtgPwjzyto62d/RMfqaFLwmOlf3fbgmlg6ivTEPOT60kz Wi9g== X-Gm-Message-State: ABy/qLYLy8mdRQfCbKPWtpybEJuHeVj0NbVFBlw4vp8c4oXZDj6GxSxj r6uOizt+B1y5+j1GHMRumx/5LaPl0ZI= X-Google-Smtp-Source: APBJJlFOSDkCg1ifTPlrzLqxEMrmK1L6ZoIaGza6NK/MRspn+5w+jtMyuGYvGSaDbLjHj28Kitc5pA== X-Received: by 2002:a17:903:11c9:b0:1b8:c972:606a with SMTP id q9-20020a17090311c900b001b8c972606amr3002512plh.51.1690394843532; Wed, 26 Jul 2023 11:07:23 -0700 (PDT) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id i10-20020a1709026aca00b001b9de8fbd78sm13460692plt.212.2023.07.26.11.07.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jul 2023 11:07:23 -0700 (PDT) Message-ID: Date: Wed, 26 Jul 2023 11:07:24 -0700 MIME-Version: 1.0 Subject: Re: bug#64866: 30.0.50; Emacsclient block for 2 seconds when error is raised from command Content-Language: en-US To: Eli Zaretskii , Yikai Zhao References: <83y1j3o158.fsf@gnu.org> From: Jim Porter In-Reply-To: <83y1j3o158.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64866 Cc: 64866@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: -1.0 (-) On 7/25/2023 7:30 PM, Eli Zaretskii wrote: > I don't think your quite special use case is a reason good enough to > prevent users from seeing error messages. An error message that > cannot be read is useless. In this case, the user *can* see the error though: it's printed in the terminal that they called `emacsclient -e '(error "oops")'` from. Even without the 2 second delay, I don't think there would be any loss of information to the user (at least not that I can see). I've actually seen a related issue come up elsewhere: in our regression tests. When testing programmable completion in Eshell, I had to let-bind 'minibuffer-message-timeout' to 0 to prevent the 2 second delay, which occurred even in batch mode. (See 'em-cmpl-test/variable-ref-completion/directory' in "test/lisp/eshell/em-cmpl-tests.el".) I'm not sure why this delay is present in batch mode. (Going back to the original bug report, I'd consider 'emacsclient -e blah' to be analogous to batch mode.) Strangely, I tried running this and I still see a 2 second delay: emacsclient -e '(let ((minibuffer-message-timeout 0)) (error "oops"))' I'm not sure why that doesn't work... From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 26 14:48:01 2023 Received: (at 64866) by debbugs.gnu.org; 26 Jul 2023 18:48:01 +0000 Received: from localhost ([127.0.0.1]:50064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOjYH-0000Pu-3z for submit@debbugs.gnu.org; Wed, 26 Jul 2023 14:48:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOjYE-0000P3-QB for 64866@debbugs.gnu.org; Wed, 26 Jul 2023 14:47:59 -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 1qOjY8-0003IJ-TK; Wed, 26 Jul 2023 14:47:52 -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=gdhRIMqpjJMQzWp+X2VNLQ3/Rvo6Xcy1UpuB0Daog3c=; b=AHF+65bzLSfb IkTi5sQoOWiRPRBukG0/pHwFvYRDscP0zvO7BattKbd8oqa1PItn4RNOXmzqcNX7qu7hJNL8uByh8 NENKEa7GqvXDnl1O+N5TdDBF//v3gk5kMlISEEDrsGKBM6ufEtpyj2qazz7RTqYKoscCdqwRrngED jTBwvsH1BsleI+8tkERKGtBhGy/JDXPCJ2/kNUuwccmF8v9oq/vcCa0lyTNuKQ2oP9Fn2ONCXBrjQ GsIHwNcwnb1oUP8zhi85NgYsYimzq4hg/krApnPrF5cht/t3OIwvFNWJY2ShD8rD7FBuRVHWnutTD sl96MeuTZ2BtwFQYdaHyiA==; 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 1qOjY8-0004oX-Aw; Wed, 26 Jul 2023 14:47:52 -0400 Date: Wed, 26 Jul 2023 21:48:39 +0300 Message-Id: <837cqmo6ew.fsf@gnu.org> From: Eli Zaretskii To: Jim Porter In-Reply-To: (message from Jim Porter on Wed, 26 Jul 2023 11:07:24 -0700) Subject: Re: bug#64866: 30.0.50; Emacsclient block for 2 seconds when error is raised from command References: <83y1j3o158.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64866 Cc: 64866@debbugs.gnu.org, yikai@z1k.dev 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 (---) > Date: Wed, 26 Jul 2023 11:07:24 -0700 > Cc: 64866@debbugs.gnu.org > From: Jim Porter > > On 7/25/2023 7:30 PM, Eli Zaretskii wrote: > > I don't think your quite special use case is a reason good enough to > > prevent users from seeing error messages. An error message that > > cannot be read is useless. > > In this case, the user *can* see the error though: it's printed in the > terminal that they called `emacsclient -e '(error "oops")'` from. emacsclient writes the error message to its stderr, but it immediately exits. When it exits and the Emacs frame is deleted, if it was a TTY frame which was displayed on that sane terminal, the message is deleted because Emacs clears the terminal when it deletes the frame. I guess your experience is from GUI frames or something? But even in that case it is not guaranteed that the error message will be seen, because emacsclient could be called with -nowait and in background. So I consider relying on this message as not a good idea, especially for error messages that usually tell something about the problem. Imagine the frustration of a user who sees the message flashing, but cannot read it. I think the delay that sometimes gets in the way is a small price to pay for this important feature. > Strangely, I tried running this and I still see a 2 second delay: > > emacsclient -e '(let ((minibuffer-message-timeout 0)) (error "oops"))' > > I'm not sure why that doesn't work... Why did you think it should? According to its documentation it only affects minibuffer-message. The 2-sec delay in the above case is done by an explicit call to sit-for with a hard-coded argument of 2 sec. See server-return-error. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 26 15:48:49 2023 Received: (at 64866) by debbugs.gnu.org; 26 Jul 2023 19:48:49 +0000 Received: from localhost ([127.0.0.1]:50117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOkV7-00020G-2N for submit@debbugs.gnu.org; Wed, 26 Jul 2023 15:48:49 -0400 Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]:60604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOkV4-000201-Mi for 64866@debbugs.gnu.org; Wed, 26 Jul 2023 15:48:47 -0400 Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-1bbaa549c82so210132fac.0 for <64866@debbugs.gnu.org>; Wed, 26 Jul 2023 12:48:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690400921; x=1691005721; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=mIKafRpTC//d4Vg9Pp6GgJ4lnUdXd2UJquPma0f9Fts=; b=M/joksuU1wMXZX5AoBjkTlw0otRpUlJbJLAY2PlaGp1M9veMTzslwBFUGmYU3nKqEn oJUbfAqnOEYbRCoW2RaiUSTvDzn3Og4Gt98SXofvaZrEV2K1XVZP4DwD16P/V5hCIzOb 9JHMEB90VYua44IOJhG1k0EOvb7tLFMjegf34BzpqGY6PUSxjnDtgpybLyUC0JCZXOaT xL4ieLaK8HQ5gSPONMvHTORlFCW9txRtDZjII46aO9OYGamR/EDNzK9Hf0Dpyrz2GvDv nlb9JMqfzlQ2sutuDc87U9hlhYPyhS5QNA/dyoxN/l6lBdU1AfSH1i9CVmf0ACc+5JiL Ze7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690400921; x=1691005721; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mIKafRpTC//d4Vg9Pp6GgJ4lnUdXd2UJquPma0f9Fts=; b=hMSMcYNP/rYzpZuhPyIty2hD6KeW73GwgxZi/vST30t+Ym9XEYkHVAyUOU85AakBRT v35S58HdG3R3jdaX+fY/A/RfjELfrlI1ZzNViGe000Tix0BFj2tf7eU0/qHSNITuvbli uOHW88tQQk/qC4CLe+bwQoNezfhOEST5WqyrlV5UjSgPRUCLAhQ4Ffk9qIh9QQI6R7Gv hRMe21JvU3/jGyairXyNTBcaHiX2tUTfW1T+D3EzHWu8Ji0NC1MFGSAyLdheQjy9wvaT VuYzNc2g+z7SJ8oZ/uvEFudoZ9sO89BAamQim1p5aw67Z++mJyrDCudidj1oMHPrXZk3 hcnw== X-Gm-Message-State: ABy/qLbLrL41ijAGzsU8fWp+dOT0qnFRE8aWCvktyW0+8bxEMiJMg2dG 1/MjoEiU62F0MroHTRzLjxk= X-Google-Smtp-Source: APBJJlFPPolOY47Al9yMCmLwQIp0A6BWPXjn852cEZiCy04fDVT4jyszrT9riVlT/s4SO3WMUaG2Yw== X-Received: by 2002:a05:6871:204:b0:1b0:7078:5889 with SMTP id t4-20020a056871020400b001b070785889mr561797oad.12.1690400920911; Wed, 26 Jul 2023 12:48:40 -0700 (PDT) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id t24-20020a17090b019800b00264044cca0fsm12187880pjs.1.2023.07.26.12.48.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jul 2023 12:48:40 -0700 (PDT) Message-ID: <5243ab88-9045-2ca4-db50-32ad13de0330@gmail.com> Date: Wed, 26 Jul 2023 12:48:38 -0700 MIME-Version: 1.0 Subject: Re: bug#64866: 30.0.50; Emacsclient block for 2 seconds when error is raised from command Content-Language: en-US To: Eli Zaretskii References: <83y1j3o158.fsf@gnu.org> <837cqmo6ew.fsf@gnu.org> From: Jim Porter In-Reply-To: <837cqmo6ew.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64866 Cc: 64866@debbugs.gnu.org, yikai@z1k.dev 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: -1.0 (-) On 7/26/2023 11:48 AM, Eli Zaretskii wrote: > emacsclient writes the error message to its stderr, but it immediately > exits. When it exits and the Emacs frame is deleted, if it was a TTY > frame which was displayed on that sane terminal, the message is > deleted because Emacs clears the terminal when it deletes the frame. > > I guess your experience is from GUI frames or something? But even in > that case it is not guaranteed that the error message will be seen, > because emacsclient could be called with -nowait and in background. I was testing this without any frames (well, except for the invisible daemon frame). I see what you mean, though. Since most uses of "emacsclient" involve creating/using an Emacs frame, it makes sense that the code would be oriented around that case. > Why did you think it should? According to its documentation it only > affects minibuffer-message. The 2-sec delay in the above case is done > by an explicit call to sit-for with a hard-coded argument of 2 sec. > See server-return-error. Thanks for the pointer to this code. Looking at it, it doesn't seem easy to avoid this delay without causing the problems that you've mentioned. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 27 00:47:30 2023 Received: (at 64866) by debbugs.gnu.org; 27 Jul 2023 04:47:30 +0000 Received: from localhost ([127.0.0.1]:40493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOsuP-0003sw-QJ for submit@debbugs.gnu.org; Thu, 27 Jul 2023 00:47:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOsuN-0003sh-E7 for 64866@debbugs.gnu.org; Thu, 27 Jul 2023 00:47:28 -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 1qOsuH-0007Uu-Km; Thu, 27 Jul 2023 00:47:21 -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=uZFDlRZKLlCZW2Kjj2GbFZIZIeepTPzNJm/wBjOEMIo=; b=fguzLaeDZxZK M13lfPa5qHHxFW/QPDgPDgstrqV/YH38t251C6ggGMjb7tBgjwe/sTBzCEHL4Rh6q2Oez1+AqI+t7 QO4DN2zly+TtTdGh+Z1P0qq2/ZAYHA+Zv++r5IXUYmCvZxw+cY7m3AWMzBmaxsL0pETyC8wj67nlB twzwZQRM4vpPVj3ZfZrB8zl6WfdxHdcUwOFjTDSaS2l2Gg1e5dx4m8z2h+Tju1nPFmxILnvbmKDt6 d2Tv/mIju1dn0bBCTgFn15bU28f1rN6FeJD53iaSY+xyhtQxg5GPlcVa+XKDGhODAYMh499ylzU9a aWnkCURW+N27D6NJYU+GVg==; 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 1qOsuF-0001R9-02; Thu, 27 Jul 2023 00:47:20 -0400 Date: Thu, 27 Jul 2023 07:48:09 +0300 Message-Id: <83zg3im03a.fsf@gnu.org> From: Eli Zaretskii To: Jim Porter In-Reply-To: <5243ab88-9045-2ca4-db50-32ad13de0330@gmail.com> (message from Jim Porter on Wed, 26 Jul 2023 12:48:38 -0700) Subject: Re: bug#64866: 30.0.50; Emacsclient block for 2 seconds when error is raised from command References: <83y1j3o158.fsf@gnu.org> <837cqmo6ew.fsf@gnu.org> <5243ab88-9045-2ca4-db50-32ad13de0330@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64866 Cc: 64866@debbugs.gnu.org, yikai@z1k.dev 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 (---) > Date: Wed, 26 Jul 2023 12:48:38 -0700 > Cc: 64866@debbugs.gnu.org, yikai@z1k.dev > From: Jim Porter > > On 7/26/2023 11:48 AM, Eli Zaretskii wrote: > > Why did you think it should? According to its documentation it only > > affects minibuffer-message. The 2-sec delay in the above case is done > > by an explicit call to sit-for with a hard-coded argument of 2 sec. > > See server-return-error. > > Thanks for the pointer to this code. Looking at it, it doesn't seem easy > to avoid this delay without causing the problems that you've mentioned. Yes, see bug#63629 for the problems that code attempts to solve. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 27 01:34:20 2023 Received: (at 64866) by debbugs.gnu.org; 27 Jul 2023 05:34:20 +0000 Received: from localhost ([127.0.0.1]:40525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOtdj-0005Ok-Pc for submit@debbugs.gnu.org; Thu, 27 Jul 2023 01:34:20 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:52267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOtdh-0005OW-VV for 64866@debbugs.gnu.org; Thu, 27 Jul 2023 01:34:18 -0400 Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-267f870e6ffso357254a91.0 for <64866@debbugs.gnu.org>; Wed, 26 Jul 2023 22:34:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690436052; x=1691040852; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=JURr5eKIlbgbK1dfLmyM7Ri7ytmhX6hmwHYrivysgtA=; b=EVlUu0fZZ2OVA9fqsqq4MDqwFbyw8KrgEgY21N9HKkxPY/hfJEd9oLIv946migxJJv te5g69m1dnlBDEpt2XHlG7jodAHnIeH0RPxTZ5onDTKArcJgLRLe+A6R4wP9svUjb/w+ E/S/zk2Y3WqibEAaes8a3DuWy/3dmojQiGD7imb8usHJNtzEymi3zeUy93jYOuIgEGr2 5IqqnvVDD3B15zNTB4OI0RlCWn9M1HHJ3j3pG9zOfIIFLF3r3/RPowSHTbb0+KPYW3HQ vxLKaQ90F4ZXk3+Os+0BIVRr07qw31BSNEjcND8l6MqFUjOOiFquClXltaXUrNhAsFw4 sTEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690436052; x=1691040852; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JURr5eKIlbgbK1dfLmyM7Ri7ytmhX6hmwHYrivysgtA=; b=L37ps0LA3F0xveHDYauQRU9033wHREQcdOWI2F6T6JnHx1rXv7uAlJlMBj42wjopwd hGxmbv4XBUtWaZTuDBsyOfloBKCb19Z6oErsk66sDMINizGl9MDUufXP03OMW+wL0aOB n9jgJZeKOoQH39iHqjK3V5Ls2kcuGjNKQ+0codVEJzpgTdww8O83Oe6jidobYH11SQ6z 002esvONmFs81G4NNXC4CAJOHjWr3o+TzMmtxgBwwldrkXuizG7xy9l07MS5CNHpEBI2 3l2/jAEBtVLyf7Z1whqI43zHBPl7m/okqsqQSeaR3Cb3dbHlDIAUke4sFBqYlKWFEdxi SMLQ== X-Gm-Message-State: ABy/qLYyj+JE7KkbT6kdPMr874vfzpVNuaI1SRMeMy1EbR4Rv+vqntuD oFRuKCZSDUJ80vMSDRgpugtRHgeX9Qw= X-Google-Smtp-Source: APBJJlHd614UNMHDSbgA79/XO+9MfQGJ5m/gktscvlMiupcNdl2yG8DFdMUu3K7c3Ew9BZK3XHtr7Q== X-Received: by 2002:a17:90a:ba94:b0:260:e256:27c7 with SMTP id t20-20020a17090aba9400b00260e25627c7mr3296003pjr.15.1690436052000; Wed, 26 Jul 2023 22:34:12 -0700 (PDT) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id 7-20020a17090a034700b0026852d886fcsm2179823pjf.36.2023.07.26.22.34.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jul 2023 22:34:11 -0700 (PDT) Message-ID: <569eed52-7d21-87be-b177-87b9e987d2ce@gmail.com> Date: Wed, 26 Jul 2023 22:34:11 -0700 MIME-Version: 1.0 Subject: Re: bug#64866: 30.0.50; Emacsclient block for 2 seconds when error is raised from command To: Eli Zaretskii References: <83y1j3o158.fsf@gnu.org> <837cqmo6ew.fsf@gnu.org> <5243ab88-9045-2ca4-db50-32ad13de0330@gmail.com> <83zg3im03a.fsf@gnu.org> Content-Language: en-US From: Jim Porter In-Reply-To: <83zg3im03a.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64866 Cc: 64866@debbugs.gnu.org, yikai@z1k.dev 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: -1.0 (-) On 7/26/2023 9:48 PM, Eli Zaretskii wrote: >> Date: Wed, 26 Jul 2023 12:48:38 -0700 >> Cc: 64866@debbugs.gnu.org, yikai@z1k.dev >> From: Jim Porter >> >> On 7/26/2023 11:48 AM, Eli Zaretskii wrote: >>> Why did you think it should? According to its documentation it only >>> affects minibuffer-message. The 2-sec delay in the above case is done >>> by an explicit call to sit-for with a hard-coded argument of 2 sec. >>> See server-return-error. >> >> Thanks for the pointer to this code. Looking at it, it doesn't seem easy >> to avoid this delay without causing the problems that you've mentioned. > > Yes, see bug#63629 for the problems that code attempts to solve. Thanks. I'll take a look at that in more detail in the next week or so, since at this point I'm just curious as to whether there's a way to get the best of both worlds. (At minimum, maybe I can add a regression test.) From unknown Sat Aug 09 09:34:36 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, 24 Aug 2023 11:24:10 +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