Hi Prot,
Thanks a lot for substitute.el. I find it particularly handy. Do you think it would be a good thing if the user could get the replacement prompt automatically
filled with the target text? I would find it useful in cases where one needs to apply a very slight modification to a long word throughout the buffer, for
instance.
For example, say I have a `(defun foobar-package-particularly-long-function-name () ...)' and I realise that this particular function is in fact
internal, and it thus needs to be named `foobar-package--particularly-long-function-name'. It would be nice if the replacement prompt were
automatically filled with the function name, so that I could simply add a second dash without having to type the whole name again. Perhaps this could be
triggered with two prefix arguments?
Thanks a lot,
Edgar
> From: Edgar Vincent <e-v@posteo.net>> Date: Sun, 12 Feb 2023 13:10:39 +0000>> Hi Prot,
Hello Edgar,
> Thanks a lot for substitute.el. I find it particularly handy. Do you> think it would be a good thing if the user could get the replacement> prompt automatically filled with the target text? I would find it> useful in cases where one needs to apply a very slight modification to> a long word throughout the buffer, for instance.
If I understand this correctly, it can be achieved by typing M-n at the
prompt. This is a standard for many Emacs prompt that have a default
value.
Otherwise, we can always think of user options, prefix arguments, or
even more commands.
What do you think?
All the best,
Prot
--
Protesilaos Stavrou
https://protesilaos.com
Protesilaos Stavrou <info@protesilaos.com> writes:
> Hello Edgar,>> If I understand this correctly, it can be achieved by typing M-n at the> prompt. This is a standard for many Emacs prompt that have a default> value.>> Otherwise, we can always think of user options, prefix arguments, or> even more commands.>> What do you think?>> All the best,> Prot
Thanks for your reply. That’s perfect! `M-n' achieves exactly that. I didn’t know about “future history”.
I don’t think adding user options would be necessary, given that built in goodness.
Thanks again,
Edgar
> From: Edgar Vincent <e-v@posteo.net>> Date: Sun, 12 Feb 2023 14:33:51 +0000> [... 17 lines elided]> Thanks for your reply. That’s perfect! `M-n' achieves exactly that. I> didn’t know about “future history”. I don’t think adding user options> would be necessary, given that built in goodness.>> Thanks again,
You are welcome!
--
Protesilaos Stavrou
https://protesilaos.com