4

This question already has an answer here:

windows 10, emacs 26.1

Suppose I open 10 buffers. If I can use prev-buffer (C-x left) / next-buffer (C-x right) to go to prev/next buffers. It's very comfortable.

But I need when I do this to skip some buffers. E.g. buffers whose names start with helm-xxx.

Is it possible?

marked as duplicate by phils, Stefan, Drew, zck, Nsukami _ Sep 18 '18 at 14:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Sure, write a custom command taking this in account. – wasamasa Sep 12 '18 at 17:18
  • 2
    Skipping some buffers is a classic – Nsukami _ Sep 12 '18 at 20:19
4

You can control which buffers next-buffer will consider with the buffer-predicate frame parameter. An example which filters out all buffers that match "helm":

(defun my-buffer-predicate (buffer)
  (if (string-match "helm" (buffer-name buffer))
      nil
    t))
(set-frame-parameter nil 'buffer-predicate 'my-buffer-predicate)

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