emacs-devel
[Top][All Lists]
Advanced

[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: Sat, 28 Nov 2020 21:13:20 +0200

> From: Stephen Berman <stephen.berman@gmx.net>
> Cc: emacs-devel@gnu.org
> Date: Sat, 28 Nov 2020 19:46:18 +0100
> 
> > Does it work for ä if you say
> >
> >   C-x RET c latin-1 RET A ä RET
> >
> > ?
> 
> Yes (with -a added to the grep invocation, but not without it).  And
> then with either 'a' or 'ä' as the search term, *xref* displays 'aä'.
> So this seems to be the best workaround, though inconvenient for
> frequent uses

I really don't see any other way, especially if different files in the
directory have different encodings.  Grep looks for bytes, not
characters, and is agnostic to encoding.  And even if we'd do this in
Emacs Lisp, we'd still need to trust Emacs to guess/detect the correct
encoding of each file.

> Do you then agree to adding -a to the grep invocation in
> xref-matches-in-files?  Or could that have undesirable consequences?

Adding -a probably cannot do any harm, but its support should be
detected, since I don't think it's portable enough (it isn't in the
latest Posix spec, at least).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]