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

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

Re: logical not condition in ibuffer config


From: Emanuel Berg
Subject: Re: logical not condition in ibuffer config
Date: Sun, 11 Mar 2018 21:29:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Hikaru Ichijyo wrote:

> I've been setting up ibuffer to group my
> buffer listing into categories.
> I've encountered a situation where I may want
> to make an exception to one of the rules.
> This is my config:
>
>       ibuffer-saved-filter-groups
>       (quote (("Default"
>              ("IRC" (mode . erc-mode))
>              ("Web" (mode . w3m-mode))
>              ("Mail & News" (or
>                       (mode . message-mode)
>                       (mode . mail-mode)
>                       (mode . gnus-group-mode)
>                       (mode . gnus-summary-mode)
>                       (mode . gnus-article-mode)))
>              ("Dired" (mode . dired-mode))
>              ("Text" (mode . text-mode))
>              ("HTML/CSS" (or
>                       (mode . html-mode)
>                       (mode . css-mode)))
>              ("Config" (or
>                       (mode . conf-space-mode)
>                       (mode . conf-unix-mode)
>                       (mode . conf-xdefaults-mode)))
>              ("Shell" (mode . shell-script-mode))
>              ("Perl" (mode . perl-mode))
>              ("Lisp & Emacs" (or
>                       (mode . emacs-lisp-mode)
>                       (mode . bookmark-bmenu-mode)
>                       (name . "^\\*Packages\\*$")))
>              ("Docs" (or
>                       (name . "^\\*info\\*$")
>                       (name . "^\\*Man "))))))
>
> I am finding that the "Lisp & Emacs" group
> catches my bbdb buffer, because it is in
> Emacs-Lisp mode, but I would rather this went
> to Default, since I rarely edit it directly.

This is not exactly Lisp but rather a common
computer data hierarchy that is expressed as
list and then parsed as configuration data by
the Lisp program... whatever.

The easiest way to do what you want is probably
to find out the priority *order* by which the
data structure gets traversed.

Then, first put the general case (all Elisp)
somewhere, only after that explicitly put the
exception/the specific case (bbdb) wherever you
want it instead, so that rule overwrites the
general case rule (which otherwise applies to
both cases).

By the way, this level of perfectionism...
start digging into Elisp today as it'll just
get worse.

-- 
underground experts united
http://user.it.uu.se/~embe8573


reply via email to

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