From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: dired-do-find-regexp failure with latin-1 encoding Date: Sat, 28 Nov 2020 20:11:48 +0200 Message-ID: <83k0u5mjvf.fsf@gnu.org> References: <87blfhjr4q.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36628"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stephen Berman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 28 19:12:34 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kj4i1-0009Rq-PW for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Nov 2020 19:12:33 +0100 Original-Received: from localhost ([::1]:52478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kj4i0-0004mQ-SE for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Nov 2020 13:12:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kj4hW-0004Ln-7V for emacs-devel@gnu.org; Sat, 28 Nov 2020 13:12:02 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47535) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kj4hV-0003Ux-Pa; Sat, 28 Nov 2020 13:12:01 -0500 Original-Received: from [176.228.60.248] (port=4200 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kj4hV-0006ZN-2T; Sat, 28 Nov 2020 13:12:01 -0500 In-Reply-To: <87blfhjr4q.fsf@gmx.net> (message from Stephen Berman on Sat, 28 Nov 2020 19:03:17 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:259964 Archived-At: > From: Stephen Berman > 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 ?