5

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?

Drew
  • 77,472
  • 10
  • 114
  • 243
a_subscriber
  • 4,062
  • 1
  • 18
  • 56

1 Answers1

6

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)
rpluim
  • 5,245
  • 11
  • 25