unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: [ELPA] New package: disk-usage
Date: Tue, 19 Feb 2019 10:55:43 -0500	[thread overview]
Message-ID: <beebaccb-02db-b212-a4d5-c775f1c31a52@gmail.com> (raw)
In-Reply-To: <87imxgmacr.fsf@ambrevar.xyz>

On 19/02/2019 03.49, Pierre Neidhardt wrote:
> I'm happy to announce disk-usage.el
> (https://gitlab.com/ambrevar/emacs-disk-usage), a disk analyzer for Emacs!

This looks great!  It works smoothly here.  Thanks for working on this :)

Some questions:
* Out of curiosity, why do you use `find . -type f -exec du -sb {} +` instead of a plain `du -ab`? (Also, wouldn't that save you the extra step of computing disk-usage--total?)
* Could you use the same face for directories as dired uses (rather than the hyperlink face)?  In fact, is there any way that this could be integrated more tightly with dired?  For example, I got bitten by the face that d exits the disk-usage window, instead of marking a file for deletion. 
* Using a visual representation (a sort of progress bar) instead of a percentage could be nice (on graphic terminals only, of course).  You could implement it like this:
  
  (defun disk-usage--make-progress-bar (pct)
    (let ((width 5))
      (concat (propertize " " 'face '(:reverse-video t) 'display `(space :width ,(* width pct)))
              (propertize " " 'display `(space :width ,(* width (- 1 pct)))))))

  (defun disk-usage--refresh (&optional directory)
    …
                      (list file-info (vector (number-to-string (disk-usage--file-info-size file-info))
                                              (disk-usage--make-progress-bar
                                               (/ (float (disk-usage--file-info-size file-info))
                                                  total-size))
    …


Thanks again for the great work!
Clément.

> It displays a tabulated list of files and folders along their size in a select
> directory.
> 
> Features:
> 
> - It's an Emacs buffer, you can use all Emacs facilities (search, multiple
>   buffers, etc.).
> 
> - Results are cached and disk-usage.el should generally be very fast.
> 
> - Directories can be explored up and down, re-using the cache.  (ncdu can not even go "up" without
>   rescanning everything).
> 
> - File listings can be displayed recursively (all files in all subfolders).
> 
> - Toggle "human size" display.
> 
> - Display size statistics by extension.
> 
> - Sort by any column (size, filename, extension, percentage, etc.).
> 
> - Open current entry in Dired/M-x shell/Eshall/<you-name-it>.
> 
> I decided to work on this as an answer to years of frustration with more limited
> tools such as ncdu (my last ncurses application).
> 
> It already has Evil bindings in Evil collection
> (https://github.com/emacs-evil/evil-collection) and a Guix package.
> 
> I'd like to add this item to ELPA as an external.  Let me know if there
> is anything.
> 
> Feedback is more than welcome!
> 
> Cheers!
> 




  reply	other threads:[~2019-02-19 15:55 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19  8:49 [ELPA] New package: disk-usage Pierre Neidhardt
2019-02-19 15:55 ` Clément Pit-Claudel [this message]
2019-02-19 16:17 ` Eli Zaretskii
2019-02-19 16:26   ` Pierre Neidhardt
2019-02-19 17:25     ` Eli Zaretskii
2019-02-19 19:29       ` Pierre Neidhardt
2019-02-19 19:44         ` Eli Zaretskii
2019-02-19 19:55           ` Pierre Neidhardt
2019-02-19 20:21 ` Michael Albinus
2019-02-19 20:26   ` Pierre Neidhardt
2019-02-19 20:39     ` Michael Albinus
2019-02-19 20:58       ` describe-mode bindings (was: [ELPA] New package: disk-usage) Stefan Monnier
2019-02-19 21:29         ` Clément Pit-Claudel
2019-02-19 21:05       ` [ELPA] New package: disk-usage Pierre Neidhardt
2019-02-20  8:08         ` Pierre Neidhardt
2019-02-20 13:28           ` Stefan Monnier
2019-02-24 17:14           ` Pierre Neidhardt
2019-02-24 19:33             ` Pierre Neidhardt
2019-02-24 20:24               ` Stefan Monnier
2019-02-26 11:59             ` Michael Albinus
2019-02-26 15:08               ` Pierre Neidhardt
2019-02-26 15:25                 ` Michael Albinus
2019-03-01 17:51                   ` Pierre Neidhardt
2019-03-01 23:28                     ` Michael Albinus
2019-03-02 13:51                       ` Pierre Neidhardt
2019-03-03 10:28                     ` Michael Albinus

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=beebaccb-02db-b212-a4d5-c775f1c31a52@gmail.com \
    --to=cpitclaudel@gmail.com \
    --cc=emacs-devel@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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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