karthink / gptel

A simple LLM client for Emacs
GNU General Public License v3.0
1.04k stars 111 forks source link

Feature request: setup an undo-boundary #235

Open jwr opened 3 months ago

jwr commented 3 months ago

When generating text into a buffer, it would be great if gptel could setup an (undo-boundary), so that one can easily use undo to remove everything that was generated into that buffer.

I'm not submitting a pull request, since this is likely a very small modification and the overhead would probably be bigger than just adding that line of code :-)

Thank you for writing this great tool. It's more useful than every LLM-interfacing Mac app I've tried!

karthink commented 3 months ago

@jwr I originally planned to but it in my testing it did the right thing when undoing anyway - undid everything in one step. Is this not the case for you?

jwr commented 3 months ago

No, for me the undo requires several steps. I just tried with ollama-generated text in a buffer and I had to undo three times to remove all of it.

karthink commented 3 months ago

Thanks, I'll add an undo boundary. I think I need some longer transcripts for running tests!