When async-shell-command-display-buffer is non-nil, the output buffer is displayed immediately. Otherwise, the buffer is displayed by the (advised) process filter, which should only be invoked for output-producing shell commands[1]. For example, the Unix null command M-& : RET does not invoke the process filter. Without my patch, the process filter advice only displays the output buffer if it is already empty, i.e. if no previous shell-command invocation has written output to the process buffer. This guard seems to contradict the purpose of a non-nil shell-command-dont-erase-buffer setting. So, my patch continues to allow the immediate display of the output buffer, irrespective of command output, when async-shell-command-display-buffer is non-nil, as well as the deferred and repeated display of the output buffer, irrespective of shell-command-dont-erase-buffer and subject to command output, when async-shell-command-display-buffer is nil. [1] This assumption is based on observation, not expertise in process filters; I cannot guarantee the absence of obscure edge cases. -- Basil