When I give a new async command with an interactively called async-shell-command, it gives a message "A command is running in the default buffer. Use a new buffer? (y or n)". I think this behaviour is unnecessary, every time I'm giving a new command, I'll press y. Can I disable this behavior in some way?
You may be interested in creating a new/modified function of
shell-command that does not seek confirmation. You may also be interested in customizing the variable
async-shell-command-buffer. For a listing of the options, type
M-x describe-variable or
To see how this variable works within the function
M-x find-function RET shell-command RET.
How did I find this out? I typed
M-x find-function RET async-shell-command-buffer RET and I did a word search in that library for "a command is running". There are other methods to find this stuff out, like reading the manual that probably discusses the above-variable ... however, I usually just examine the code to figure stuff out.