GNU bug report logs -
#36085
find-dired could handle/avoid octal escapes printed by GNU find -ls for non-ASCII filenames
Previous Next
Full log
View this message in rfc822 format
9 juni 2019 kl. 12.57 skrev Eli Zaretskii <eliz <at> gnu.org>:
>
>> Maybe we can trust -print0 to work everywhere (BSD find has it).
>
> That's orthogonal, isn't it? It is only needed to make sure we don't
> get confused by file names with embedded newlines, AFAIU.
Not quite orthogonal as the -ls quoting also takes care of newlines, but I have no strong opinion on the matter.
>> It's probably a quaint notion, but I wish Emacs were be able to do without the help of external programs for something as basic as listing directories.
>
> We have such capabilities, see directory-files-and-attributes and
> directory-files-recursively. We also have find-lisp.el. I just
> assumed these alternatives will be significantly slower, but maybe
> that's not the case?
You are right, they are slower, but need not be. The directory listing functions are slow because they throw away information, leading to lots of unnecessary syscalls and, on remote file systems, network roundtrips. This is true both on Unix and Windows.
Fixing this is not difficult but the elisp interface design requires care, and this goes beyond the scope of this bug. Your suggestions sound more realistic in the short term.
> One other consideration is that for large directory trees the current
> implementation of find-dired updates the buffer in parallel with
> 'find' still running, whereas the alternatives will not return until
> the whole listing has been generated, which might take a long time.
This concern is definitely valid. I don't know to what extent parallelism is possible in the current thread implementation. Again, improvements in this respect would have benefits beyond find-dired.
This bug report was last modified 3 years and 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.