[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47991: 28.0.50; inconsistency between async-shell-command and shell-
From: |
Zhiwei Chen |
Subject: |
bug#47991: 28.0.50; inconsistency between async-shell-command and shell-command |
Date: |
Mon, 26 Apr 2021 00:38:10 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Zhiwei Chen <condy0919@gmail.com>
>> 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