Closed oatmealm closed 1 year ago
where will the text end up when done if you switched buffers in the meantime?
At the original point position of the original buffer, when whisper-run or whisper-file was called.
The position is stored as a marker object which not only stores point but also the buffer info. As an added benefit, the marker is a "live" object, meaning if the original buffer is updated, then the marker position is also automatically updated by Emacs, so the relative position of where you wanted to insert the text originally always remains consistent. I haven't tested that extensively though.
I ran whisper-file while the active buffer was read-only, so it couldn't yank to transcription.
Yeah that's another case I hadn't considered. I think a warning and early exit is the simplest and consistent thing to do as people expect text to be inserted at point, rather than in a new buffer. Maybe even a prompt about disabling read-only mode on user's behalf, though that's a little intrusive. I will implement at least the warning and early exit later, once I understand the tricks involved. Because iirc it's not just whole buffer that can be read-only, but also like some portions of the text in it (marked using text property).
My workflow is longer transcriptions I like to dump into a document and process later, so insert at point is less relevant, but I understand why it's the default.
Read only buffers are now checked for (and bailed out) in a pre-processing hook.
Inserting under point is now optional. If you want a new buffer to be displayed with transcribed text, set whisper-insert-text-at-point
to nil.
I ran
whisper-file
while the active buffer was read-only, so it couldn't yank to transcription. I guess it'd be better to check and warn the user, or maybe simply create a new buffer? Also, since it's async, where will the text end up when done if you switched buffers in the meantime?