unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Dired-like interface for ibuffer?
@ 2023-11-22 22:41 Galen Boyer
  2023-11-22 23:59 ` Daniel Martín
  0 siblings, 1 reply; 3+ messages in thread
From: Galen Boyer @ 2023-11-22 22:41 UTC (permalink / raw)
  To: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Dired-like interface for ibuffer?
  2023-11-22 22:41 Dired-like interface for ibuffer? Galen Boyer
@ 2023-11-22 23:59 ` Daniel Martín
  2023-11-25 23:31   ` Galen Boyer
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Martín @ 2023-11-22 23:59 UTC (permalink / raw)
  To: Galen Boyer; +Cc: help-gnu-emacs

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)            



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Dired-like interface for ibuffer?
  2023-11-22 23:59 ` Daniel Martín
@ 2023-11-25 23:31   ` Galen Boyer
  0 siblings, 0 replies; 3+ messages in thread
From: Galen Boyer @ 2023-11-25 23:31 UTC (permalink / raw)
  To: help-gnu-emacs

Thanks!!!  Looks quite promising!!!

This is my ibuffer collapsed:

    [ c:/Users/boyer/.emacs.d/ ... ]
    [ c:/Users/boyer/ ... ]
    [ c:/GITHUB/broad/ ... ]
    [ c:/GITHUB/EDM/main/Datasets/OIH/Tables/ ... ]
    [ c:/GITHUB/EDM/main/Datasets/Broad_OIH/Views/ ... ]
    [ c:/GITHUB/EDM/MERGETHEM/EDM-1911-Fix-LKP_EARS_ALF_WEIGHTED_PERCENT_VW/Datasets/Release/EDM-1911/ ... ]
    [ c:/Bin/Emacs/emacs-27.2/share/emacs/27.2/lisp/ ... ]
    [ Default ... ]

--
Galen Boyer




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-25 23:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-22 22:41 Dired-like interface for ibuffer? Galen Boyer
2023-11-22 23:59 ` Daniel Martín
2023-11-25 23:31   ` Galen Boyer

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).