GNU bug report logs - #63398
28.2; Doc or behavior of replacement commands (e.g. `replace-string')

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Tue, 9 May 2023 20:14:01 UTC

Severity: normal

Found in version 28.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 63398-done <at> debbugs.gnu.org
Subject: bug#63398: 28.2; Doc or behavior of replacement commands (e.g. `replace-string')
Date: Wed, 10 May 2023 18:27:03 +0300
> From: Drew Adams <drew.adams <at> oracle.com>
> CC: "63398-done <at> debbugs.gnu.org" <63398-done <at> 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.




This bug report was last modified 2 years and 12 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.