2

To go to the next/prev buffer I use the commands next-buffer / prev-buffer. This works well and is very comfortable. But there are also two other commands switch-to-next-buffer / switch-to-prev-buffer that do same thing. What is the difference between them?

4

next-buffer is a wrapper around switch-to-next-buffer. Since switch-to-next-buffer takes a WINDOW argument (and doesn't have a default key binding), it's more suitable for programmatic use, whereas next-buffer is more suitable for interactive use. Of course nothing prevents you from using switch-to-next-buffer interactively.

  • You can call it interactively,but since it just has interactive as its interactive specification, I don't see how that can do anything different from calling next-buffer – rpluim Sep 13 '18 at 16:04
  • True. I'll amend my answer. – rpluim Sep 14 '18 at 6:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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