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 20:11:48 +0200

> From: Stephen Berman <stephen.berman@gmx.net>
> Date: Sat, 28 Nov 2020 19:03:17 +0100
> 
> 0. echo aä > /tmp/test
> 1. emacs -Q /tmp/test ; the file encoding is utf-8
> 2. Type `C-x d RET', mark the file 'test', type `A a RET'
> => *xref* displays the line 'aä'
> 3. In buffer 'test' type `C-x RET f iso-8859-1 RET' and then `C-x C-s'
> 4. Repeat step 2
> => user-error: No matches for: a
> 
> dired-do-find-regexp calls xref-matches-in-files and that calls grep,
> and that's where the failure happens, so strictly speaking this isn't an
> Emacs bug, but it is a problem for users of dired-do-find-regexp
> (dired-do-search and occur, for example, don't have this problem).  One
> workaround is to add the -a option to the grep invocation in
> xref-matches-in-files; then the search succeeds and the *xref* buffer
> displays 'a\344'.  But this doesn't work if 'ä' is the search term.

Does it work for ä if you say

  C-x RET c latin-1 RET A ä RET

?



reply via email to

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