Subject: Re: bug#33007: 27.0.50; Proposal for function to edit and return string

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 25 Apr 2022 09:50:41 +0200

Michael Heerdegen <[email-masked]> writes:

> One thing I found: at the end of `string-edit', you have
>
> #+begin_src emacs-lisp
> (message "%S" (substitute-command-keys
>                  "Type `C-c C-c' when you've finished editing"))
> #+end_src
>
> That should be "%s" - we don't want a quoted, `read'able string
> messaged.

Yup; fixed now (and I made it use the \[...] thing at the same time).

> Second: I find the name of `read-string-from-buffer' a bit misleading -
> what about `edit-string-in-buffer'?  The emphasis should be on "edit",
> because a string is already present, the function doesn't just prompt
> for a (new) string.

Yes, I was waffling between various names while I was typing the file,
and renamed the function to read-string-from-buffer while writing the
documentation.  :-)  I thought it might make sense from a discovery
point of view to have something that people who looked for `read-string'
would find easily (and could plug into existing functions easily).

But this function will probably mostly be used for editing strings, as
you point out, so `edit-string-in-buffer' sounds like a good idea to me.
Anybody have any further opinions before I rename?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no