Skip to content

Instantly share code, notes, and snippets.

@ivey
Created March 29, 2010 03:41
Show Gist options
  • Save ivey/347348 to your computer and use it in GitHub Desktop.
Save ivey/347348 to your computer and use it in GitHub Desktop.
(define-ibuffer-filter filename-or-dired
"Toggle current view to buffers with filename or dired-directory matching QUALIFIER."
(:description "filename-or-dired"
:reader (read-from-minibuffer "Filter by filename (regexp): "))
(or
(ibuffer-awhen (buffer-local-value 'buffer-file-name buf)
(string-match qualifier it))
(ibuffer-awhen (buffer-local-value 'dired-directory buf)
(string-match qualifier it))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment