Eli Zaretskii writes: > Thanks, but I don't understand why we need the error message. Isn't > it enough to pass nil as 2nd argument to shell-command? The error message is just for noninteractive cases where a caller passes a numeric argument as the second argument of `async-shell-command'. For interactive cases, a nil value will be always passed to `shell-command'. Example: Before patch: (async-shell-command "ls" 1) => error: (wrong-type-argument stringp 1) After patch: (async-shell-command "ls" 1) => error: (error "Invalid output buffer") Here is a patch without the error message, in case it's preferable: