0

On my IBuffer I keep seeing *lsp-log* and *pyls::stderr* files.

[ Default ]
 *% *lsp-log*                516 Fundamental
 *% *pyls::stderr*           264 Special          (pyls stderr open)

Is it possible to prevent these file to be hidden in the Ibuffer or basically hide or remove them.

My approach does not make any change:

(recentf-mode 1)
(setq recentf-max-saved-items 50)
(setq recentf-max-menu-items 50)
(setq recentf-exclude '("*lsp-log*"
                        "pyls::stderr"
                        ))

More general question should be as: how can I prevent some files show up on the Ibuffer list.

1

Is it possible to prevent these file to be hidden in the Ibuffer or basically hide or remove them.

Yes, have a look at the user option ibuffer-never-show-predicates:

ibuffer-never-show-predicates is a variable defined in ‘ibuf-ext.el’.

Its value is nil

  This variable may be risky if used as a file-local variable.
  You can customize this variable.

A list of predicates (a regexp or function) for buffers not to display.
If a regexp, then it will be matched against the buffer’s name.
If a function, it will be called with the buffer as an argument, and
should return non-nil if this buffer should not be shown.

So, you could either customise this user option to include the buffer names *lsp-log* and *pyls::stderr* (using regexp syntax), or you could write something like the following yourself:

(setq ibuffer-never-show-predicates
      (mapcar #'regexp-quote '("*lsp-log*" "*pyls::stderr*")))

My approach does not make any change:

That's to be expected, as recentf and ibuffer are different packages that don't share any common functionality.

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.