From: "Daniel Martín" <mardani29@yahoo.es>
To: Galen Boyer <galendboyer@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Dired-like interface for ibuffer?
Date: Thu, 23 Nov 2023 00:59:13 +0100 [thread overview]
Message-ID: <m1cyw1fige.fsf@yahoo.es> (raw)
In-Reply-To: <ecd0dv34wxjtrz.fsf@boyer.boyerenterprises.org> (Galen Boyer's message of "Wed, 22 Nov 2023 17:41:04 -0500")
Galen Boyer <galendboyer@gmail.com> writes:
> Hi all,
>
> My description of "dired-like interface for ibuffer"
>
> Basically, when I go to ibuffer, or, let me call it, dibuffer-mode (ie
> dired-ibuffer) Everything I've opened that has an associated directory
> shows organized by the directories they are in.
>
> Might something like dibuffer-mode already exist? maybe a this could be
> accomplished with some combination of ibuffer slickness.
>
> Maybe there is a repository that has something like this?
>
> --
> Galen Boyer
You could customize ibuffer with a filter group that groups by buffer
directory. Something like this, from
https://emacs.stackexchange.com/questions/10621/how-to-get-ibuffer-to-use-directory-tree-as-filter-groups/17731#17731
(you can test it by pressing / D in ibuffer):
(defun get-all-buffer-directories ()
"Return a list of all directories that have at least one file
being visited."
(interactive)
(let (l)
(dolist (e (sort (mapcar 'file-name-directory
(cl-remove-if-not 'identity
(mapcar 'buffer-file-name
(buffer-list))))
'string<))
(unless (string= (car l) e)
(setq l (cons e l))))
l))
(defun ibuffer-set-filter-groups-by-directory ()
"Set the current filter groups to filter by directory."
(interactive)
(setq ibuffer-filter-groups
(mapcar (lambda (dir)
(cons (format "%s" dir) `((directory . ,dir))))
(get-all-buffer-directories)))
(ibuffer-update nil t))
(define-key ibuffer-mode-map
(kbd "/ D") 'ibuffer-set-filter-groups-by-directory)
next prev parent reply other threads:[~2023-11-22 23:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 22:41 Dired-like interface for ibuffer? Galen Boyer
2023-11-22 23:59 ` Daniel Martín [this message]
2023-11-25 23:31 ` Galen Boyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1cyw1fige.fsf@yahoo.es \
--to=mardani29@yahoo.es \
--cc=galendboyer@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).