all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: mattiase@acm.org, rpluim@gmail.com, emacs-devel@gnu.org,
	john@yates-sheets.org
Subject: RE: master 583cb26 2/3: Improve accuracy in string-replace description (bug#43598)
Date: Mon, 28 Sep 2020 10:11:55 -0700 (PDT)	[thread overview]
Message-ID: <dba8b280-a1e1-4174-8944-ddc41756b626@default> (raw)
In-Reply-To: <83o8lplu2v.fsf@gnu.org>

> > > Okay.  Then how about
> > >
> > > Return a string equal to @var{instring} with every occurence of
> > > @var{fromstring} replaced by @var{tostring}.
> >
> > Return a new string equal...
> 
> The "equal" part is extremely confusing, IMNSHO.  Why do we need it
> here?

What do you find extremely confusing about it?

I'm not the one who proposed that "equal" part, but
I'd say that it helps if we draw _some_ relation
between the returned string to INSTRING.

And the relation needs to express that (1) they
don't share structure and (2) they're equal except
for the specified diffs.

What do we mean by "equal", there?  Predicate `equal'
(or `string-equal', if you prefer - they amount to
the same thing here).

We don't want to say "replace" presumably, as that
can suggest modification.

You can say "Return a string obtained by copying
INSTRING and replacing each occurrence of FROMSTRING
in that copy by TOSTRING" (which is long but can be
split).  Mentioning copying means you don't have to
say "new".

Or you can say something else.  But the point is:

(1) The returned string is obtained from INSTRING.
(2) The returned string is a new string (INSTRING
    isn't modified).
(3) The returned string is equal to INSTRING, except
    for the indicated differences.



  reply	other threads:[~2020-09-28 17:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200927124520.25321.62354@vcs0.savannah.gnu.org>
     [not found] ` <20200927124522.BA20F207E0@vcs0.savannah.gnu.org>
2020-09-28  9:42   ` master 583cb26 2/3: Improve accuracy in string-replace description (bug#43598) Robert Pluim
2020-09-28  9:59     ` Mattias Engdegård
2020-09-28 11:09       ` Robert Pluim
     [not found]         ` <CAJnXXojjUAcRVmsZNWQ2j9rSDv76Y0od4yWfVg11k-Q2tf4NYA@mail.gmail.com>
2020-09-28 13:50           ` Robert Pluim
2020-09-28 16:36             ` John Yates
2020-09-28 16:49               ` Drew Adams
2020-09-28 16:55                 ` Eli Zaretskii
2020-09-28 17:11                   ` Drew Adams [this message]
2020-09-28 18:11                     ` Eli Zaretskii
2020-09-28 22:36                       ` John Yates
2020-09-28 22:47                         ` Drew Adams
2020-09-29  2:35                           ` Eli Zaretskii
2020-09-29  4:28                             ` Drew Adams
2020-09-29  5:30                               ` Eli Zaretskii
2020-09-29 15:28                                 ` Drew Adams
2020-09-29  2:37                         ` Eli Zaretskii
2020-09-29  7:12                           ` Robert Pluim
2020-09-29 14:26                             ` Eli Zaretskii
2020-09-29 15:23                               ` Robert Pluim
2020-09-29 16:02                                 ` Eli Zaretskii
2020-09-28 17:44                 ` John Yates
2020-09-29 13:40                   ` Lars Ingebrigtsen
2020-09-29 14:08                     ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dba8b280-a1e1-4174-8944-ddc41756b626@default \
    --to=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=john@yates-sheets.org \
    --cc=mattiase@acm.org \
    --cc=rpluim@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.