GNU bug report logs - #6847
23.2; ibuffer-filter-by-filename ignores buffer directory names

Previous Next

Package: emacs;

Reported by: Damyan Pepper <damyanp <at> gmail.com>

Date: Thu, 12 Aug 2010 10:17:02 UTC

Severity: normal

Tags: patch

Found in version 23.2

Fixed in version 26.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


Message #10 received at control <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Damyan Pepper <damyanp <at> gmail.com>
Cc: 6847 <at> debbugs.gnu.org
Subject: Re: bug#6847: 23.2; ibuffer-filter-by-filename ignores buffer
 directory names
Date: Sun, 4 Aug 2019 19:41:16 +0200
[Message part 1 (text/plain, inline)]
tags 6847 + patch
quit

Damyan Pepper <damyanp <at> gmail.com> writes:

> When using ibuffer.el if I set it to filter by filename then dired
> buffers visiting directories are not included in the filter.  This is
> inconsistent with the way that ibuffer displays the buffers.
>
> For example, if I start with emacs -Q, open a few buffers and run M-x ibuffer:
>
> MR Name                    Size Mode             Filename/Process
> -- ----                    ---- ----             ----------------
> [ Default ]
>    README                  5276 Fundamental      c:/emacs-23.2/README
>  % emacs-23.2               857 Dired by name    c:/emacs-23.2/
>  % etc                     5627 Dired by name    c:/emacs-23.2/etc/
>  % bin                     1299 Dired by name    c:/emacs-23.2/bin/
>    *scratch*                191 Lisp Interaction
> *  *Messages*               131 Fundamental
>
>    6 buffers              13381                  4 files, no processes
>
> and then press "/ f emacs" I get:
>
> MR Name                    Size Mode             Filename/Process
> -- ----                    ---- ----             ----------------
> [ Default ]
>    README                  5276 Fundamental      c:/emacs-23.2/README
>
>    1 buffer                5276                  1 file, no processes
>
>
> Note that the emacs-23.2, etc and bin buffers all have an entry in the
> "Filename/Process" column that is ignored by the filter.

I think this use case should be mostly covered by the recently added
ibuffer-filter-by-directory command:

    commit 35aaa6b6aa9a2e7b42465603fb32355a009c510f
    Author: Christopher Genovese <genovese <at> cmu.edu>
    Date:   Tue Dec 20 17:41:56 2016 +0900

        ibuffer: New filters and commands

But it would seem that this command never got a key binding.  This is an
excerpt from C-h f ibuffer-mode:

    Filtering commands:

      ‘M-x ibuffer-filter-chosen-by-completion’ - Select and apply
filter chosen by completion.
      ‘/ RET’ - Add a filter by any major mode.
      ‘/ m’ - Add a filter by a major mode now in use.
      ‘/ M’ - Add a filter by derived mode.
      ‘/ n’ - Add a filter by buffer name.
      ‘/ c’ - Add a filter by buffer content.
      ‘/ b’ - Add a filter by basename.
      ‘M-x ibuffer-filter-by-directory’ - Add a filter by directory name.
      ‘/ f’ - Add a filter by filename.
      ‘/ .’ - Add a filter by file extension.

I suggest to add the keybinding "/ F" for ibuffer-filter-by-directory
and "/ SPC" for ibuffer-filter-chosen-by-completion.  Perhaps "/ d" or
"/ D" would be more natural for the directory case, but alas they are
already taken.

Please see the attached patch.

Thanks,
Stefan Kangas
[0001-Add-key-bindings-for-ibuffer-filter-commands.patch (application/x-patch, attachment)]

This bug report was last modified 5 years and 244 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.