From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#63398: 28.2; Doc or behavior of replacement commands (e.g. `replace-string') Date: Thu, 11 May 2023 09:23:00 +0300 Organization: LINKOV.NET Message-ID: <861qjnbd4r.fsf@mail.linkov.net> References: <83fs848fzu.fsf@gnu.org> <83y1lw6wc8.fsf@gnu.org> <86ttwkgmms.fsf@mail.linkov.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="26670"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , "63398@debbugs.gnu.org" <63398@debbugs.gnu.org> To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 11 08:31:27 2023 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 1pwzpm-0006pW-Ik for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 May 2023 08:31:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pwzpQ-0001HM-IH; Thu, 11 May 2023 02:31:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwzpO-0001H5-Rd for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 02:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pwzpO-0000ms-FN for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 02:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pwzpN-0002iU-UO for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 02:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 May 2023 06:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63398 X-GNU-PR-Package: emacs Original-Received: via spool by 63398-submit@debbugs.gnu.org id=B63398.168378661910381 (code B ref 63398); Thu, 11 May 2023 06:31:01 +0000 Original-Received: (at 63398) by debbugs.gnu.org; 11 May 2023 06:30:19 +0000 Original-Received: from localhost ([127.0.0.1]:49536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwzoh-0002hM-Hd for submit@debbugs.gnu.org; Thu, 11 May 2023 02:30:19 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:48619) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwzoa-0002fi-W4 for 63398@debbugs.gnu.org; Thu, 11 May 2023 02:30:17 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 0EF00C0004; Thu, 11 May 2023 06:30:05 +0000 (UTC) In-Reply-To: (Drew Adams's message of "Wed, 10 May 2023 17:03:57 +0000") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261545 Archived-At: >> The rules of replacement case-folding are more complex than documented. >> `replace-match' checks if the initial is a caseless word constituent >> like "0", and treats that like a lowercase initial. >> >> So "test a → test b" replaces "Test A" with "Test B", >> but "test 0 → test 1" replaces "Test 0" with "test 1". > > Can we fix this? Should the behavior be changed? I guess the default should never change. But maybe the rules could be customized. > Should the behavior remain like this and the doc > be changed? The current implementation of rules is quite complex. No sure if all details can be documented succinctly.