From: Tassilo Horn <tsdh@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Keeping replace-buffer-contents runtime in bounds
Date: Tue, 26 Feb 2019 07:51:57 +0100 [thread overview]
Message-ID: <87zhqjdotu.fsf@gnu.org> (raw)
In-Reply-To: <jwv7edn1szz.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 25 Feb 2019 16:03:53 -0500")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Well, after reading the docs for `interactive' again, I guess
>> replace-region-contents could be a command with "X" interactive spec
>> (and a check that the user actually typed in a function). Any
>> objections?
>
> I don't see much point in making it a command.
> Is there some actual use-case?
I don't think that anybody would want to type in a lambda at the prompt
but instead would simply create his own command using
replace-region-contents.
But I could see a use-case if REPLACE-FN could also just be a string or
buffer instead of a function returning a string or a buffer. In that
case, it could be used interactively like replace-buffer-contents but
you could omit narrowing yourself. And a string wouldn't be interpreted
as a buffer name but literally which would be handy in the case where
you have the replacement already in your kill-ring. However, the
interactive spec "B" makes it hard to enter a literal string because
space is bound to word completion...
Well, I guess that's not reason enough to make it interactive...
Tassilo
prev parent reply other threads:[~2019-02-26 6:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-16 20:09 Keeping replace-buffer-contents runtime in bounds Tassilo Horn
2019-02-17 15:50 ` Eli Zaretskii
2019-02-17 18:26 ` Tassilo Horn
2019-02-17 18:59 ` Eli Zaretskii
2019-02-24 10:11 ` Tassilo Horn
2019-02-24 16:12 ` Eli Zaretskii
2019-02-24 20:13 ` Philipp Stephani
2019-02-25 6:28 ` Tassilo Horn
2019-02-25 20:16 ` Tassilo Horn
2019-02-25 21:03 ` Stefan Monnier
2019-02-26 6:51 ` Tassilo Horn [this message]
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=87zhqjdotu.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.