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.bugs Subject: bug#56747: 28.1.90; Char fold search doesn't work Date: Mon, 25 Jul 2022 15:01:31 +0300 Message-ID: <83zggxe6zo.fsf@gnu.org> References: <87y1wi775k.fsf@cassou.me> <835yjmflr1.fsf@gnu.org> <87v8rm70vl.fsf@cassou.me> 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="13674"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56747@debbugs.gnu.org To: Damien Cassou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 25 14:08:23 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1oFwsn-0003N5-Vw for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Jul 2022 14:08:22 +0200 Original-Received: from localhost ([::1]:40792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFwsn-0002PT-03 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Jul 2022 08:08:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFwmg-0006Tz-Mx for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2022 08:02:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59609) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFwmg-0002PK-6i for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2022 08:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oFwmg-0002RY-2j for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2022 08:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Jul 2022 12:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56747 X-GNU-PR-Package: emacs Original-Received: via spool by 56747-submit@debbugs.gnu.org id=B56747.16587504989362 (code B ref 56747); Mon, 25 Jul 2022 12:02:02 +0000 Original-Received: (at 56747) by debbugs.gnu.org; 25 Jul 2022 12:01:38 +0000 Original-Received: from localhost ([127.0.0.1]:49358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFwmI-0002Qv-Et for submit@debbugs.gnu.org; Mon, 25 Jul 2022 08:01:38 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFwmF-0002Qd-2A for 56747@debbugs.gnu.org; Mon, 25 Jul 2022 08:01:37 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFwm9-0002Lz-7Z; Mon, 25 Jul 2022 08:01:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=mVJiBUOUuHo53sgR6wtCvATNeHHDoBVsx0lw5tmJfBM=; b=EOnkqXRLVvfi5Zlb/+bp Is7KZR3u+o+MVLgG2biJiXh/cYF9sr83SHRX/wf5KHXEJGEd5TlFj2Qs6Gn2EvP+Np0R82iSXhusN qdPXzbSfx4FN5hJboKQ2WPbHRV9CkR7K8y3Dj0ZZYn2ULA5h0ThRcnw2MMFKT9RvF+OT+hwZ5wYgg etRskMbmBk2MH0gYqjpOYmTZ8AWsoWDEE8iBnH7TYDqmxP9HfxEAjebnVSTEbeUhgEbsXo9DY9+UW 3/mZYce4qEfpW02rKIxzNXutkZ6reGmyVqANluLpIoFsVKCx/BIU8ZD9Dh02vhA1qKx0zdwrqZCTD IIRugujgP5t0Yw==; Original-Received: from [87.69.77.57] (port=2967 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFwm8-0007DT-K1; Mon, 25 Jul 2022 08:01:28 -0400 In-Reply-To: <87v8rm70vl.fsf@cassou.me> (message from Damien Cassou on Sun, 24 Jul 2022 21:43:10 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:237883 Archived-At: > From: Damien Cassou > Cc: 56747@debbugs.gnu.org > Date: Sun, 24 Jul 2022 21:43:10 +0200 > > Eli Zaretskii writes: > > Which part of the manual led you to expect the above behavior? > > This page (info "(emacs) Lax Search") says: > > In addition, ‘a’ matches other characters that resemble it, or have it > as part of their graphical representation, such as U+249C > PARENTHESIZED LATIN SMALL LETTER A and U+2100 ACCOUNT OF (which looks > like a small ‘a’ over ‘c’) > > Those 2 characters are the ones I tried so I was expecting to make it > work. Ah, you are right. I wasn't reading the text closely enough. > > By default, Emacs only folds "canonically-equivalent" characters, and > > those two aren't equivalent to 'a'. > > Then I don't understand what the manual is saying. Can you please > explain? It's a documentation bug: these 2 pairs are by default not handled as equivalent. The reasons are to some extent heuristics: since the table of the equivalent character sequences is produced mechanically, allowing such "too lax" equivalences would lead to surprising false matches; see bug#20975 for one example. (These surprising results are in part due to the our simplistic implementation, whereby we convert the set of equivalent sequences to a regexp.) So we decided to play it safe, and not allow 'a' to match a character whose Unicode decomposition is "(a)", because 'a' is not the first character of the decomposition. We do allow the sequence "(a)" to match ⒜ (but not vice versa!), and we do allow 'a' to match 'ⓐ' (because 'a' is the only character in the decomposition of the latter). The result of these heuristics is somewhat inconsistent from user POV, which is why we have a facility to customize it. So I've now updated the manual to quote only examples that really work. > By the way, you are doing an amazing job with Emacs! Thank you so much > Eli. Thanks, but please don't forget Lars and others involved in the development.