This happens frequently to me: I am using several M-x shell
shells at the same time. To open the next shell, I have to rename the first one with rename-buffer
. However, emacs simply then prompts the new buffer name without permitting me to reusing the existing buffer name to construct a related one like *shell* dist
in place of *shell*
. So how can I write the new name without retyping everything?
Note also C-hf rename-uniquely
So one option is:
rename-uniquely
RET
shell
RET
However for this specific use-case, you can circumvent a renaming step entirely by using a prefix argument when you invoke the command: C-uM-x shell
Obviously this all depends on whether you're happy with the automated name, or if you wanted to name it something more meaningful. If the latter, than the answer by false is clearly going to be the most useful (probably in conjunction with the prefix argument approach).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With