unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: grindeg@yandex.ru, 36085@debbugs.gnu.org
Subject: bug#36085: 26.2; find-dired octal escapes instead of Cyrillic text
Date: Sun, 9 Jun 2019 14:39:32 +0200	[thread overview]
Message-ID: <377032D3-8461-4E82-9CB5-319DE2E9C1F6@acm.org> (raw)
In-Reply-To: <83pnnnauvy.fsf@gnu.org>

9 juni 2019 kl. 12.57 skrev Eli Zaretskii <eliz@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.






  reply	other threads:[~2019-06-09 12:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04  3:43 bug#36085: 26.2; find-dired octal escapes instead of Cyrillic text Nikita
2019-06-04 11:44 ` bug#36085: Screenshots for th bug Никита Никита
2019-06-08 12:20 ` bug#36085: 26.2; find-dired octal escapes instead of Cyrillic text Eli Zaretskii
2019-06-09 12:34   ` Tomas Nordin
2019-06-09 12:51     ` Eli Zaretskii
2019-06-08 15:14 ` Mattias Engdegård
2019-06-08 15:34   ` Eli Zaretskii
2019-06-09  5:22     ` Eli Zaretskii
2019-06-09  9:08       ` Mattias Engdegård
2019-06-09 10:57         ` Eli Zaretskii
2019-06-09 12:39           ` Mattias Engdegård [this message]
2019-06-09 12:49             ` Eli Zaretskii
2022-03-13  6:05     ` Visuwesh

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=377032D3-8461-4E82-9CB5-319DE2E9C1F6@acm.org \
    --to=mattiase@acm.org \
    --cc=36085@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=grindeg@yandex.ru \
    /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).