bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18694: 25.0.50; `ibuffer(-saved)-filter-groups', `ibuffer-saved-filt


From: Alexis
Subject: bug#18694: 25.0.50; `ibuffer(-saved)-filter-groups', `ibuffer-saved-filters'
Date: Sun, 12 Oct 2014 14:06:59 +1100

Drew Adams writes:

> As introduction, here is one user's attempt to understand the structure
> of `ibuffer-saved-filter-groups':
> http://emacs.stackexchange.com/q/2087/105
>
> The user says: "I'm guessing at the predicate bit as I can't find any
> examples or documentation. What should it really look like?"

Fwiw, here's part of the value for `ibuffer-saved-filter-groups`, from
my config file:

---BEGIN---
  (setq ibuffer-saved-filter-groups
        '(("Home"
           ("Recent" (predicate buffer-is-recent-buffer-p (current-buffer)))
           ("Helm" (name . "\*helm.+"))
           ("Dev" (or (filename . ".+\.css$")
                      (filename . ".+\.html?$")
                      (mode . android-mode)
                      (mode . clojure-mode)
                      (mode . compilation-mode)                   
                      (mode . cperl-mode)
                      (mode . emacs-lisp-mode)
                      (mode . ert-results-mode)
                      (mode . perl-mode)
                      (name . "\*Backtrace.*")
                      (name . "\*cider-repl.+")
                      (name . "\*magit.+")
                      (name . "\*scratch.+")))
           ("Docs" (or (mode . doc-view-mode)
                       (mode . Info-mode)
                       (mode . irfc-mode)
           ...
---END---

`buffer-is-recent-p` is a function i've defined elsewhere in my config -
it returns `t` if the buffer was one of the last 5 buffers accessed. It
took some guessing to learn how `predicate` could be used in this
context ....


Alexis.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]