[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC]: replace-region-contents
From: |
Stefan Monnier |
Subject: |
Re: [RFC]: replace-region-contents |
Date: |
Wed, 06 Feb 2019 09:09:33 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> How would I actually use that version with a replace-fn returning a
> buffer and not a string? It looks to me that I need to do the whole
> ceremony of creating a temporary buffer, setting buffers, and ensuring
> that the temporary buffer is killed even in the case of an abnormal exit
> myself.
Indeed (yet another reason why we should have anonymous buffers, which
can be GC'd without having to go through kill-buffer), but as mentioned
elsewhere I suspect that this use case will be rare, because when the
output wants to be in a buffer rather than a string you will likely be
able to do the replacement "in-place" without using a second buffer (and
hence without needing the diffing machinery of replace-buffer-contents).
Stefan
- Re: [RFC]: replace-region-contents, (continued)
- Re: [RFC]: replace-region-contents, Tassilo Horn, 2019/02/08
- Re: [RFC]: replace-region-contents, Eli Zaretskii, 2019/02/09
- Re: [RFC]: replace-region-contents, Tassilo Horn, 2019/02/09
- Re: [RFC]: replace-region-contents, Stefan Monnier, 2019/02/05
- Re: [RFC]: replace-region-contents, Tassilo Horn, 2019/02/06
- Re: [RFC]: replace-region-contents, Marcin Borkowski, 2019/02/06
- Re: [RFC]: replace-region-contents, Tassilo Horn, 2019/02/06
- Re: [RFC]: replace-region-contents,
Stefan Monnier <=
- Re: [RFC]: replace-region-contents, Eli Zaretskii, 2019/02/05