unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Browsing a set of dir of files in a single buffer
@ 2024-02-23 20:49 Stefan Monnier via Users list for the GNU Emacs text editor
  2024-02-24  0:22 ` [External] : " Drew Adams
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-02-23 20:49 UTC (permalink / raw)
  To: help-gnu-emacs

Org (and `outline-mode` before it) provide a hierarchical structuring
similar to that of files and directories.  I like that better than
directories, because I usually find it easier to navigate a big file
than several small files in a directory.

But I don't always get to choose, and sometimes I'm stuck browsing
several small files in a directory hierarchy.

Does anyone know a nice Emacs package that lets me view that whole
hierarchy in a single buffer, as if it were something like a big
`outline-mode` file?

It'd be a bit like dired-mode but where you can see (and hopefully edit)
the files directly in the dired buffer simply by "folding/unfolding" them.


        Stefan




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

* RE: [External] : Browsing a set of dir of files in a single buffer
  2024-02-23 20:49 Browsing a set of dir of files in a single buffer Stefan Monnier via Users list for the GNU Emacs text editor
@ 2024-02-24  0:22 ` Drew Adams
  2024-02-24  6:35 ` Yuri Khan
  2024-02-24  6:48 ` Justin Barclay
  2 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2024-02-24  0:22 UTC (permalink / raw)
  To: Stefan Monnier, 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'

[-- Attachment #1: Type: text/plain, Size: 1461 bytes --]

> Does anyone know a nice Emacs package that lets me view that whole
> hierarchy in a single buffer, as if it were something like a big
> `outline-mode` file?
> 
> It'd be a bit like dired-mode but where you can see (and hopefully
> edit)
> the files directly in the dired buffer simply by "folding/unfolding"
> them.

I know there are such packages, but I can't
say what they are off the top of my head.
Hopefully someone else will let you know.
___

With Dired+ you can just use `C-u M-+ M-i'.

You don't get a tree view.  Instead, you get
a Dired buffer with all subdirs inserted,
recursively (i.e., all the way down).  You
can use `C-x C-q' to enter WDired on the
whole buffer - edit to your heart's content.
___

Why the crazy key `C-u M-+ M-i' (you can bind
another of course)?

`i' inserts a subdir (and in Dired+ it takes
you back to the subdir line in the parent).

`M-i' inserts just the marked subdirs (no
recursive descent).

Prefix `M-+' is for recursive-descent.
`M-+ M-i' is the recursive-descent version
of `M-i'.

`C-u' says "Act on ALL files and subdirs"
not those that are marked.

Without a prefix arg the `M-+' commands act
on all marked files and subdirs, and on all
that are marked in existing Dired buffers of
marked subdirs (recursively).
___

Individual inserted subdir listings in Dired
(not just Dired+) can use different switches.
That's one difference from a tree view.
___

HTH.

[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 12983 bytes --]

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

* Re: Browsing a set of dir of files in a single buffer
  2024-02-23 20:49 Browsing a set of dir of files in a single buffer Stefan Monnier via Users list for the GNU Emacs text editor
  2024-02-24  0:22 ` [External] : " Drew Adams
@ 2024-02-24  6:35 ` Yuri Khan
  2024-02-24  6:48 ` Justin Barclay
  2 siblings, 0 replies; 5+ messages in thread
From: Yuri Khan @ 2024-02-24  6:35 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

On Sat, 24 Feb 2024 at 04:22, Stefan Monnier via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:

> […] sometimes I'm stuck browsing
> several small files in a directory hierarchy.
>
> Does anyone know a nice Emacs package that lets me view that whole
> hierarchy in a single buffer, as if it were something like a big
> `outline-mode` file?

Ooh, that’d have the potential to help a lot with Ansible roles. These
consist of YAML files, Jinja templates and sometimes arbitrary files.

Would that be a multiple-major mode though? And what if some files in
the tree are binary?



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

* Re: Browsing a set of dir of files in a single buffer
  2024-02-23 20:49 Browsing a set of dir of files in a single buffer Stefan Monnier via Users list for the GNU Emacs text editor
  2024-02-24  0:22 ` [External] : " Drew Adams
  2024-02-24  6:35 ` Yuri Khan
@ 2024-02-24  6:48 ` Justin Barclay
  2024-02-24 15:22   ` Stefan Monnier via Users list for the GNU Emacs text editor
  2 siblings, 1 reply; 5+ messages in thread
From: Justin Barclay @ 2024-02-24  6:48 UTC (permalink / raw)
  To: help-gnu-emacs


> Org (and `outline-mode` before it) provide a hierarchical structuring
> similar to that of files and directories.  I like that better than
> directories, because I usually find it easier to navigate a big file
> than several small files in a directory.
>
> But I don't always get to choose, and sometimes I'm stuck browsing
> several small files in a directory hierarchy.
>
> Does anyone know a nice Emacs package that lets me view that whole
> hierarchy in a single buffer, as if it were something like a big
> `outline-mode` file?

I think dirvish might do what you want?
https://github.com/alexluigit/dirvish

It's based on dired, but it has a more modern design - including being
able to view a tree of children directories.



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

* Re: Browsing a set of dir of files in a single buffer
  2024-02-24  6:48 ` Justin Barclay
@ 2024-02-24 15:22   ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-02-24 15:22 UTC (permalink / raw)
  To: help-gnu-emacs

> I think dirvish might do what you want?
> https://github.com/alexluigit/dirvish

Thanks, that looks really nice.

It seems to lack the core feature I'm after, which is to bring the
files' contents directly into the directory's buffer, but I'm glad you
brought it to my attention :-)


        Stefan




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

end of thread, other threads:[~2024-02-24 15:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-23 20:49 Browsing a set of dir of files in a single buffer Stefan Monnier via Users list for the GNU Emacs text editor
2024-02-24  0:22 ` [External] : " Drew Adams
2024-02-24  6:35 ` Yuri Khan
2024-02-24  6:48 ` Justin Barclay
2024-02-24 15:22   ` Stefan Monnier via Users list for the GNU Emacs text editor

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