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?

1 Answer 1

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.

2
  • 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
    Commented Sep 13, 2018 at 16:04
  • True. I'll amend my answer.
    – rpluim
    Commented Sep 14, 2018 at 6:48

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.