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#63398: 28.2; Doc or behavior of replacement commands (e.g. `replace-string') Date: Wed, 10 May 2023 18:27:03 +0300 Message-ID: <83y1lw6wc8.fsf@gnu.org> References: <83fs848fzu.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1244"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63398-done@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 10 17:27:21 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 1pwlir-00006r-8G for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 May 2023 17:27:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pwliZ-0004Wx-2j; Wed, 10 May 2023 11:27:03 -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 1pwliY-0004Wl-HK for bug-gnu-emacs@gnu.org; Wed, 10 May 2023 11:27: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 1pwliY-0007dO-1Y for bug-gnu-emacs@gnu.org; Wed, 10 May 2023 11:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pwliX-0001At-TR for bug-gnu-emacs@gnu.org; Wed, 10 May 2023 11:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 May 2023 15:27: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-done@debbugs.gnu.org id=D63398.16837323674447 (code D ref 63398); Wed, 10 May 2023 15:27:01 +0000 Original-Received: (at 63398-done) by debbugs.gnu.org; 10 May 2023 15:26:07 +0000 Original-Received: from localhost ([127.0.0.1]:48692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwlhe-00019f-L2 for submit@debbugs.gnu.org; Wed, 10 May 2023 11:26:06 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwlhc-000198-Ou for 63398-done@debbugs.gnu.org; Wed, 10 May 2023 11:26:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwlhX-0007HZ-Hh; Wed, 10 May 2023 11:25:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=vU6Xo9UC8TKyk+UnjtyRyKhAHf5SNmLSW3LI8YPEckU=; b=nxZ8OGS9S+1u khzqlOSZxutk2XVTHBAxrg8kZZNYjUzY7PRgCc3jeiYWxXrX7JunR3jFwWgy11xGdDU06lYYRvbCl ij/Cmyu7a7rQEkvz9XbhCdNknvttq+9zDep+YlHvQMl7JafJnAKNLEUhE8jeQ1GiqW8bssdcJ25V8 pD7YbDkF04wMu4JvhCC+K7FflfQ8Ek0Kz/sj+6zorDf9twCSF2MTnkw82zREJrCmNm3EXHe9o81dr vUXDZ3ro98aVO3FYieZMdFErydc7aNcURKE9dwhOE9zSzNA1oHo8YMH+dROGSH7KIqkPNAf8EGF+W tOs+ZbUgH+6o8FJRNfnMag==; Original-Received: from [87.69.77.57] (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 1pwlhW-0006da-0p; Wed, 10 May 2023 11:25:58 -0400 In-Reply-To: (message from Drew Adams on Wed, 10 May 2023 14:20:10 +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:261509 Archived-At: > From: Drew Adams > CC: "63398-done@debbugs.gnu.org" <63398-done@debbugs.gnu.org> > Date: Wed, 10 May 2023 14:20:10 +0000 > > > What you expect will happen > > if the original text doesn't include digits, as in > > > > Testing > > testing > > > > M-x replace-string RET testing RET foobar RET > > Yes, I know. That's why I included the digits - it's > this case that seems not to follow what the doc says. It's too bad you kept silent about that, because it took me some time to discover the reason. Why posting riddles if you already know part of the answer? > Are you perhaps connecting this with your previous > sentence, about success of a "trial" depending on > NEWSTRING being partly or all lower case? Are you > saying that if there are non-letter chars then what > the doc says might not happen because trying doesn't > succeed? Yes. > I guess it's not clear to me whether you're saying > that the behavior isn't what it should be (per the > doc) in this case, but that's unavoidable or OK, or > you're saying that the behavior does follow the doc, > and the doc is trying to say that the behavior > follows what it says only if there are no digits? The latter. > You closed this as fixed, but I still find the doc > - or the behavior - unclear wrt this example. > Could you maybe (e.g. here) explain a bit more how > the behavior fits the description? I don't know what exactly happens and when, and thus cannot say more. Feel free to study the code and find out. Or maybe someone else will be able to describe the behavior in more detail. > > but on my system it is an actual em dash -- a much > > longer character, thus the confusion > > is unlikely. > > How can it be a longer char, if the font is fixed width? The ASCII dash has whitespace around it, which em dash lacks.