Function: ibuffer-filter-by-file-extension

ibuffer-filter-by-file-extension is an autoloaded, interactive and byte-compiled function defined in ibuf-ext.el.gz.

Signature

(ibuffer-filter-by-file-extension QUALIFIER)

Documentation

Limit current view to buffers with filename extension matching QUALIFIER.

The separator character (typically .) is not part of the pattern. For example, for a buffer associated with file
/a/b/c.d, this matches against d.

Probably introduced at or before Emacs version 26.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/ibuf-ext.el.gz
;;;###autoload (autoload 'ibuffer-filter-by-file-extension "ibuf-ext")
(define-ibuffer-filter file-extension
    "Limit current view to buffers with filename extension matching QUALIFIER.

The separator character (typically `.') is not part of the
pattern.  For example, for a buffer associated with file
`/a/b/c.d', this matches against `d'."
  (:description "filename extension"
   :reader (read-from-minibuffer
            "Filter by filename extension without separator (regex): "))
  (when-let* ((it (with-current-buffer buf (ibuffer-buffer-file-name))))
    (string-match qualifier (or (file-name-extension it) ""))))