From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Zhiwei Chen Newsgroups: gmane.emacs.bugs Subject: bug#47991: 28.0.50; inconsistency between async-shell-command and shell-command Date: Mon, 26 Apr 2021 00:38:10 +0800 Message-ID: <87tunu2ubx.fsf@gmail.com> References: <87eef02ciz.fsf@gmail.com> <83r1j0lzla.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21008"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 47991@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 25 18:39:16 2021 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 1lahmt-0005M4-P7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Apr 2021 18:39:15 +0200 Original-Received: from localhost ([::1]:34816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lahms-0004Fk-C2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Apr 2021 12:39:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lahmg-0004Ed-1k for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2021 12:39:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60284) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lahmf-0001y1-MX for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2021 12:39:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lahmf-0007QD-KQ for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2021 12:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Zhiwei Chen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Apr 2021 16:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47991 X-GNU-PR-Package: emacs Original-Received: via spool by 47991-submit@debbugs.gnu.org id=B47991.161936870428487 (code B ref 47991); Sun, 25 Apr 2021 16:39:01 +0000 Original-Received: (at 47991) by debbugs.gnu.org; 25 Apr 2021 16:38:24 +0000 Original-Received: from localhost ([127.0.0.1]:43597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lahm4-0007PO-AN for submit@debbugs.gnu.org; Sun, 25 Apr 2021 12:38:24 -0400 Original-Received: from mail-pg1-f175.google.com ([209.85.215.175]:38544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lahm1-0007PA-L8 for 47991@debbugs.gnu.org; Sun, 25 Apr 2021 12:38:22 -0400 Original-Received: by mail-pg1-f175.google.com with SMTP id w10so1127441pgh.5 for <47991@debbugs.gnu.org>; Sun, 25 Apr 2021 09:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=AyJOZ54fcbMI7wmm1SFyCEa4yIJF+Jh4fMVDvrti8Fg=; b=nzAqit1FoaixsRNP88uXVARYYcV5+xczLTcDF9ITfpBe1pf1rPS7UJUqwEHWVP4HD1 tcQZfTxOl3YR+C3tlB4BVRgZTou+En7DJU6lTmLmhFqxjdJkw48iiaoWyPaEo040ekes XL+RA4V8n04unETE0wF+Ql11yLvJr3VD9NfY7oQ4BdEp6myqJvK+XXuuGU/oSPxYCDT3 OXVpva/hiu6sbXBEkNFf2ggTSTtHBxhYPNFyhkPZu12vuBwa+EK7TOcvxO/Ciat7XdVm iHjPzE/NSiAu2WLP5JJ5rvX95u+617U261JPvTfB2wuRKpBErJKhnhIozjH3A7Ejb8KM FhpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=AyJOZ54fcbMI7wmm1SFyCEa4yIJF+Jh4fMVDvrti8Fg=; b=nzxQJoM3zSSEaPKH8qID+h6V6mYdDqnAnwuvaSppIGuQcC9mBYCN8/nL/R2aECikEm ZClIRxm/vp1YI9b5tlmUvOjsjP2dEx6TNs/xuQQwXMvNets5hiaNsgbjhrYezir4o+58 PyLW0BNDeB7HIi6PIlthJNyPTOed0B5JrLP3vOZ29Bsbdtzbl3UvnZSdi3ak+EOuddOs gqGj2zxaU3dZXN9wfJpl3+IHzDo5+BKkHDSXjwAqXJp21oLqvyUMrz3XfOeqY+9O+EJm nTDHvg7X8464mXwZLocElUdR1jRO+8STEzqNnZcgTiKu+XzbRGqHsSm303agw7WxR1fE jJug== X-Gm-Message-State: AOAM533bhO2RiGNqGC1fTM4rSHkf1PrO0DstQBRP+t0MtAlI2fjtrte3 tWbUIttxyayChts8YEFnhT8e7r5BR5fQ5W56 X-Google-Smtp-Source: ABdhPJy6xBKTh81ruMD2YWQWnwYn17ZUpgqp7r/lPoHSo7WS6upPkRpSiZTMIgM8qN6bXiYKUw5ZQw== X-Received: by 2002:a62:830a:0:b029:273:940:747b with SMTP id h10-20020a62830a0000b02902730940747bmr6048728pfe.70.1619368695396; Sun, 25 Apr 2021 09:38:15 -0700 (PDT) Original-Received: from Youmu (192.69.92.236.16clouds.com. [192.69.92.236]) by smtp.gmail.com with ESMTPSA id ch14sm188455pjb.55.2021.04.25.09.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Apr 2021 09:38:14 -0700 (PDT) In-Reply-To: <83r1j0lzla.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 24 Apr 2021 13:57:21 +0300") 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" Xref: news.gmane.io gmane.emacs.bugs:204887 Archived-At: Eli Zaretskii writes: >> From: Zhiwei Chen >> Date: Sat, 24 Apr 2021 18:38:12 +0800 >> >> >> shell-command pops a buffer in fundamental-mode while >> async-shell-command is in shell-mode. > > That's a feature. > > Why do you want the buffer in shell-mode when the command is run > synchronously? The original intention is to make `async-shell-command` and `shell-command` default to `evil-normal-state' by adding a hook in which checks if `this-command' is `shell-command' or `async-shell-command'. As a result, I found that they behave differently. It looks too odd that `async-shell-command' is implemented in `shell-command' but it has a different semantic. Since the buffer is in `fundamental-mode', there is no way to access `shell-mode-map' where user maybe define their own bindings. I'm curious about the reason why it's a feature. Why the synchronous `shell-command' should be in `fundamental-mode' while the async doesn't. -- Zhiwei Chen