Closed mbork closed 3 years ago
This looks very useful.
But the keybindings are also very awkward. Especially because stepping forward and backward multiple times in a row is probably the most common usage.
I think the Emacs macro keybindings are ideal for such asituation: After
pressing C-x e
once to run the macro, you can just keep pressing e
to run
the same macro again and again. Pressing any other key has the normal effect,
but it also makes the magic disappear and e
behaves normally again.
The default mpv keybindings for frame stepping are .
(step forward) and ,
(step backward). C-f .
and C-f ,
could do a frame step, and pressing .
and
,
again would keep stepping until any other key is pressed.
That would be the best behaviour I can think of, but I have no idea how complicated this would be to implement.
Great idea! Though I assume you meant C-c C-f ,
and C-c C-f .
. I implemented your suggestion – it is perhaps not the cleanest possible implementation (I'll ask on the Emacs mailing list and make it better if some suggestion comes up), but it works fine. (Btw, I had to look up how to use transient keymaps – never did that before – but it is not difficult, since – as you've noticed – Emacs already has some support for that.)
Great idea! Though I assume you meant
C-c C-f ,
andC-c C-f .
.
Yes, sorry, that's what I meant. Thank you.
I'm getting this error when I start Emacs:
Error (use-package): subed/:catch: Symbol’s value as variable is void: subed-mpv-frame-step-map
Can you reproduce that?
Of course, stupid me. Please delete the branch and pull it again – I fixed that mistake and rebased.
That works nicely. Great work. Thanks!
Again, I'm open to suggestions re: keybindings. This feature is useful when you want the subtitle to appear (or hide) at some exact moment, e.g. when some text appears on the screen.