[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dired-do-find-regexp failure with latin-1 encoding
From: |
Eli Zaretskii |
Subject: |
Re: dired-do-find-regexp failure with latin-1 encoding |
Date: |
Sun, 29 Nov 2020 19:18:58 +0200 |
> Cc: stephen.berman@gmx.net, emacs-devel@gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Sun, 29 Nov 2020 18:27:24 +0200
>
> > How can --pre help? It still cannot easily support different
> > encodings in the same command, right?
>
> It can help by calling iconv with different arguments depending on the
> contents of each file. Which is valuable, I think, because we're
> normally not piping file contents to grep (or, potentially, rg), instead
> we pass multiple file names to it using xargs.
>
> That wouldn't be easy, but some script that performs conversion based on
> file contents could work.
It could work in principle, but I think in practice it will not be
faster than doing everything in Emacs Lisp, because each file will
need to be read twice.
> > It would be brittle, unless that program actually reads the entire
> > file (which will be slow).
>
> How does Emacs do it? Does it read until the end of the file?
No, just a small initial part of it. That's one reason why the
results are not guaranteed to be correct.
- Re: dired-do-find-regexp failure with latin-1 encoding, (continued)
- Re: dired-do-find-regexp failure with latin-1 encoding, Stephen Berman, 2020/11/28
- Re: dired-do-find-regexp failure with latin-1 encoding, Dmitry Gutov, 2020/11/28
- Re: dired-do-find-regexp failure with latin-1 encoding, Eli Zaretskii, 2020/11/28
- Re: dired-do-find-regexp failure with latin-1 encoding, Dmitry Gutov, 2020/11/28
- Re: dired-do-find-regexp failure with latin-1 encoding, Dmitry Gutov, 2020/11/28
- Re: dired-do-find-regexp failure with latin-1 encoding, Eli Zaretskii, 2020/11/29
- Re: dired-do-find-regexp failure with latin-1 encoding, Dmitry Gutov, 2020/11/29
- Re: dired-do-find-regexp failure with latin-1 encoding,
Eli Zaretskii <=
- Re: dired-do-find-regexp failure with latin-1 encoding, Dmitry Gutov, 2020/11/29
- Re: dired-do-find-regexp failure with latin-1 encoding, Eli Zaretskii, 2020/11/29
- Re: dired-do-find-regexp failure with latin-1 encoding, Dmitry Gutov, 2020/11/29
- Re: dired-do-find-regexp failure with latin-1 encoding, Eli Zaretskii, 2020/11/29
- Re: dired-do-find-regexp failure with latin-1 encoding, Yuri Khan, 2020/11/29
- Re: dired-do-find-regexp failure with latin-1 encoding, Stephen Berman, 2020/11/29
- Re: dired-do-find-regexp failure with latin-1 encoding, Eli Zaretskii, 2020/11/29
- Re: dired-do-find-regexp failure with latin-1 encoding, Dmitry Gutov, 2020/11/29
- Re: dired-do-find-regexp failure with latin-1 encoding, Eli Zaretskii, 2020/11/29
- Re: dired-do-find-regexp failure with latin-1 encoding, Dmitry Gutov, 2020/11/29