-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gts-kill-ring-render saves both input & output #20
Comments
Different This will cause all (both input & output & more) copied to kill ring: (setq gts-default-translator
(gts-translator
:picker (gts-prompt-picker)
:engines (gts-google-engine)
:render (gts-kill-ring-render))) While this will only copy the brief result: (setq gts-default-translator
(gts-translator
:picker (gts-prompt-picker)
:engines (gts-google-engine :parser (gts-google-summary-parser))
:render (gts-kill-ring-render))) |
Thx :) (gts-translate (gts-translator
:picker (gts-prompt-picker)
:engines (gts-google-rpc-engine)
:render (gts-posframe-pop-render)))) is there any way to speak the input in background while its rendering in posframe popup ? |
Same keybinds as in |
i don't wanna use mouse :( ;; A method
(cl-defmethod gts-out ((_ your-render) result)
(deactivate-mark)
(insert result)) and in the README instead of |
Ah got it... (cl-defmethod gts-out ((_ gts-posframe-pop-render) task)
(when-let ((buf (gts-render-buffer gts-posframe-pop-render-buffer task)))
(posframe-refresh buf)
(add-hook 'post-command-hook #'gts-posframe-render-auto-close-handler))
(with-slots (text from engine) task
(gts-tts engine text from))) and i think in README it should be (cl-defmethod gts-out ((_ your-render) task)
(deactivate-mark)
(with-slots (result) task
(insert result))) |
Thanks for correcting. And, with (cl-defmethod gts-out :after ((_ gts-posframe-pop-render) task)
(with-slots (text from engine) task
(gts-tts engine text from))) Also you can write another render instead: (defclass your-posframe-pop-with-tts-render (gts-posframe-pop-render) ())
(cl-defmethod gts-out ((_ your-posframe-pop-with-tts-render) task)
(cl-call-next-method)
(with-slots (text from engine) task
(gts-tts engine text from)))
;; then use `your-posframe-pop-with-tts-render' in your command.
:render (your-posframe-pop-with-tts-render) |
In v1 i think
go-translate-kill-ring-save
only saved the output(target lang)but now
gts-kill-ring-render
saves both input & outputI see an option to create my own render but how do i just get the result of translated text from
result
?The text was updated successfully, but these errors were encountered: