Skip to content

Instantly share code, notes, and snippets.

@glucas
Created September 27, 2013 15:45
Show Gist options
  • Save glucas/6730692 to your computer and use it in GitHub Desktop.
Save glucas/6730692 to your computer and use it in GitHub Desktop.
Elisp snippets for defining ibuffer filter groups for all known projectile projects.
(defun my/define-projectile-filter-groups ()
(when (boundp 'projectile-known-projects)
(setq my/project-filter-groups
(--map (list
(concat "Project: " (file-name-nondirectory (directory-file-name it)))
`(filename . ,it))
projectile-known-projects))))
(setq ibuffer-saved-filter-groups
(list
(cons "default"
(append
(if (fboundp 'my/define-projectile-filter-groups)
(my/define-projectile-filter-groups))
'(("Org" (or (mode . org-mode)
(mode . diary-mode)
(mode . org-agenda-mode)))
;; etc
)))))
@cies
Copy link

cies commented May 30, 2014

using it and loving it -- thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment