How to change the buffer name in emacs to any given string? Useful if one has many shell buffers for various specific tasks and is merely seeing their order of creation.


1 Answer 1


In this particular case, C-u M-x shell helps by giving each shell buffer a unique name, using a counter that increments every time.

If you want to give them more meaningful names, M-x rename-buffer RET foo RET will do the deed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.