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

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

Re: `ibuffer-saved-filter-groups` case sensitive?


From: hector
Subject: Re: `ibuffer-saved-filter-groups` case sensitive?
Date: Fri, 7 Apr 2017 13:06:24 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Apr 07, 2017 at 11:37:15AM +0200, zimoun wrote:
> Dear community,
> 
> Ping.

Pong :-)

On 24 October 2016 at 19:06, zimoun <address@hidden> wrote:
> Dear,
>
> I do not know if this behavior is expected or I perhaps miss a point.
> Ah, I am running Emacs 24.5.1 packaged by Debian (testing) and I have
> not tried Emacs 25 yet.
>
> I would like to filter IBuffer in Gnus-style grouping. Then, I am not
> able to split the buffer names between Upper-case and lower-case.
>
> If I understand well, in this case the regexp is case insensitive.

If it uses string-match it depends on the value of case-fold-search.
Try adding:

(make-local-variable 'case-fold-search)
(setq case-fold-search nil)

> Using this minimal snippet (saved in `ibuf.el`):
>
> (setq ibuffer-saved-filter-groups
>       (quote (("default"
>                ("lower" (name . "[:lower:]"))
>                ("Upper" (name . "[:upper]"))))))
> (add-hook 'ibuffer-mode-hook
>          (lambda ()
>            (ibuffer-switch-to-saved-filter-groups "default")))
>

The regexps are not anchored. "[[:lower:]]" would match any buffer with
a lower case letter.
If I'm not wrong, the right syntax would be: "[[:lower:]]" and "[[:upper:]]".

> Then, running `emacs -Q -l ibuf.el`, for example, the buffer
> *Messages* is in the lower-group.
>
> (note that if you switch the "filters", then *scratch* appears in Upper-group)
>
> To be concrete, I do not know to locally turn `case-fold-search` to
> `nil`, or something in this flavor I guess.
>
>
> Thank you in advance to any suggestion.

I hope that helps.



reply via email to

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