From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yikai Zhao Newsgroups: gmane.emacs.bugs Subject: bug#64866: 30.0.50; Emacsclient block for 2 seconds when error is raised from command Date: Wed, 26 Jul 2023 23:50:43 +0800 Message-ID: References: <83y1j3o158.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1965"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64866@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 26 20:00:42 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qOioT-0000Co-SN for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Jul 2023 20:00:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOiDR-0000p3-8Y; Wed, 26 Jul 2023 13:22:25 -0400 Original-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 1qOgnz-0002zW-Kc for bug-gnu-emacs@gnu.org; Wed, 26 Jul 2023 11:52:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOgnz-0001Wu-3s for bug-gnu-emacs@gnu.org; Wed, 26 Jul 2023 11:52:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qOgny-0004OY-Ep for bug-gnu-emacs@gnu.org; Wed, 26 Jul 2023 11:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yikai Zhao Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jul 2023 15:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64866 X-GNU-PR-Package: emacs Original-Received: via spool by 64866-submit@debbugs.gnu.org id=B64866.169038666316825 (code B ref 64866); Wed, 26 Jul 2023 15:52:02 +0000 Original-Received: (at 64866) by debbugs.gnu.org; 26 Jul 2023 15:51:03 +0000 Original-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 Original-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 Original-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) In-Reply-To: <83y1j3o158.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266122 Archived-At: 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.