Elisp for expressing a directory hierarchy in text form

On emacs mailing lists, I saw people insert their directory hierarchy like this:

|-- .yas-make-groups |-- collections | |-- each | `-- ... |-- control structure | |-- forin | `-- ... |-- definitions | `-- ... `-- general `-- ... 

where .yas-make-groups will be a file, and collections will be a directory, etc.

I suppose this is a naive question, but is there some kind of elisp code that no one has told me about what I can use for this, or some kind of package that does this?

+4
source share
3 answers

The tree command line has the correct answer, but if you are also using org-mode (and you should!) Check org-fstree .

+2
source

I do not think it is emacs or lisp, but the tree command. Take a look at http://linux.die.net/man/1/tree

A package containing this is also called a tree. A visit to Google should find a package for your favorite OS.

/// BR, Jens

+4
source

Unverified, fast and dirty. Piggy supports the tree command

 (defun tree (directory) (interactive "D") (save-excursion (let ((b (get-buffer-create "*tree"))) (switch-to-buffer b) (shell-command (concat "/usr/bin/tree " directory) b)))) 
0
source

Source: https://habr.com/ru/post/1346557/


All Articles