From: Michael Albinus <michael.albinus@gmx.de>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: [ELPA] New package: disk-usage
Date: Sun, 03 Mar 2019 11:28:38 +0100 [thread overview]
Message-ID: <87ef7oqmjt.fsf@gmx.de> (raw)
In-Reply-To: <87va12eb4y.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Fri, 01 Mar 2019 18:51:25 +0100")
[-- Attachment #1: Type: text/plain, Size: 1188 bytes --]
Pierre Neidhardt <mail@ambrevar.xyz> writes:
> Hi Michael,
Hi Pierre,
> I've pushed your suggestions.
Thanks.
> - Regarding the TRAMP issue, I fail to test with "/sudo::", probably because
> `find/du` cannot run there. Let me know if it works for you on
> remote machines.
I did need to apply further changes to let it run sufficiently on /sudo::
* In disk-usage--list-recursively, the (concat (file-remote-p ...) trick
must be applied earlier.
* In disk-usage--list-recursively and disk-usage--list I needed to adapt
the directory-files-and-attributes call; otherwise also /. and
/.. would be reported.
If the remote case still doesn't work for you, set tramp-verbose to 6,
and rerun the test. Show the resulting Tramp debug buffer.
> - Regarding the optimization, local tests show no difference. Let me know if
> you notice a significant improvement remotely.
I have no figures, but it feels faster.
One other point worth to fix: Pls don't run
disk-usage-toggle-recursive globally. It shall affect only the current
buffer; I don't want to have a recursive disk-usage report for every
remote directory. It takes too much time.
> Cheers!
Best regards, Michael.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 3026 bytes --]
*** /tmp/ediffhiunfK 2019-03-03 11:26:50.677462619 +0100
--- /home/albinus/src/elpa/packages/disk-usage/disk-usage.el 2019-03-03 10:59:27.620803344 +0100
***************
*** 263,269 ****
(and (file-accessible-directory-p directory)
(directory-files-and-attributes
directory
! 'full nil 'nosort)))))
(or (cl-loop for l in listing
for attributes = (cl-rest l)
for path = (cl-first l)
--- 263,270 ----
(and (file-accessible-directory-p directory)
(directory-files-and-attributes
directory
! 'full directory-files-no-dot-files-regexp
! 'nosort)))))
(or (cl-loop for l in listing
for attributes = (cl-rest l)
for path = (cl-first l)
***************
*** 280,288 ****
:name path
:size (file-attribute-size attributes))
;; Folders
! else if (and (eq t (file-attribute-type attributes))
! (not (string= "." (file-name-base path)))
! (not (string= ".." (file-name-base path))))
collect
(disk-usage--file-info-make
:name path
--- 281,287 ----
:name path
:size (file-attribute-size attributes))
;; Folders
! else if (eq t (file-attribute-type attributes))
collect
(disk-usage--file-info-make
:name path
***************
*** 305,313 ****
"-type" "d")
(buffer-string))
"\n" 'omit-nulls)))
! (cl-loop for dir in subdirs
! append (cl-loop for file in (directory-files-and-attributes dir 'full nil 'nosort)
! for name = (concat (file-remote-p directory) (car file))
for attributes = (cdr file)
when (and attributes
(not (file-attribute-type attributes))
--- 304,317 ----
"-type" "d")
(buffer-string))
"\n" 'omit-nulls)))
! (cl-loop for dir in (mapcar (lambda (item)
! (concat (file-remote-p directory) item))
! subdirs)
! append (cl-loop for file in (directory-files-and-attributes
! dir 'full
! directory-files-no-dot-files-regexp
! 'nosort)
! for name = (car file)
for attributes = (cdr file)
when (and attributes
(not (file-attribute-type attributes))
prev parent reply other threads:[~2019-03-03 10:28 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
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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ef7oqmjt.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=emacs-devel@gnu.org \
--cc=mail@ambrevar.xyz \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.