Copy result to clipboard
matheusfillipe opened this issue · 2 comments
matheusfillipe commented
I think it would be nice or desirable to optionally store the translation result to the clipboard. On linux I am currently doing that with this patch:
diff --git a/google-translate-core-ui.el b/google-translate-core-ui.el
index 9752409..17fb193 100644
--- a/google-translate-core-ui.el
+++ b/google-translate-core-ui.el
@@ -813,6 +813,7 @@ http://www.gnu.org/software/emacs/manual/html_node/elisp/The-Echo-Area.html)"
(target-language (gtos-target-language gtos))
(auto-detected-language (gtos-auto-detected-language gtos))
(text (gtos-text gtos)))
+ (gui-set-selection 'CLIPBOARD translation)
(insert
(google-translate--translation-title gtos "Translate from %s to %s:\n")
"\n"
stardiviner commented
- Not just Emacs GUI clipboard support, you might consider also support Emacs clipboard API
clipboard-kill-region
. - Also, I think this might is not just the only function to add support for this.
- I suggest you fork and create Pull Request for your patch. That will be more simpler.
carwin commented
👍 This would be very useful.