0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-12 12:09:55 +00:00
org-mode/examples.org
2009-05-14 07:12:42 -07:00

1.3 KiB

Examples of Litorgy in Action

showing directory sizes

This will work for Linux and Mac users, and could be interesting especially if combined with a nice R graph.

To run place the cursor on the #+begin_src line of the source block labeled directory-pie and press \C-c\C-c.

Downsides

  • will take a while to run, especially for users with large home directories
  • Had to employ some emacs-lisp between the shell and R to clean up the data. (actually those " marks should not have been introduced in the shell output, so this could be simplified somewhat)
du -sc *
(delq nil (mapcar (lambda (el)
                    (let ((size (car el))
                          (name (cadr el)))
                      (setq name (if (string-match "\"\\(.+\\)\"" name)
                                     (match-string 1 name)
                                   name))
                      (unless (or (= size 0)
                                  (string= name "total"))
                        (list size name))))
                  table))
pie(as.vector(t(dirs[1])), labels = as.vector(t(dirs[2])))