[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: google-translate (was: Re: Is it possible to transform text before f
From: |
Emanuel Berg |
Subject: |
Re: google-translate (was: Re: Is it possible to transform text before feeding it to ispell?) |
Date: |
Thu, 10 Sep 2015 02:51:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Andrey Tykhonov <atykhonov@gmail.com> writes:
> Thank you for the bug report! I'll fix it as soon
> as possible!
My pleasure :)
Here is an improvement of the interface I posted the
other day. You might want to use it or do something
similar your way. The idea is to echo the translation,
only with no properties, and not have it stick on the
kill ring.
;; This file: http://user.it.uu.se/~embe8573/conf/emacs-init/translate.el
(require 'w3m-unisearch) ;
http://user.it.uu.se/~embe8573/conf/emacs-init/w3m/w3m-unisearch.el
(require 'google-translate-core-ui)
(defun swedish-to-english (&optional text-noninteractive)
(interactive)
(let ((killed kill-ring)
(text (or text-noninteractive (get-search-string "ord"))) )
(google-translate-translate "Swedish" "English" text 'kill-ring)
(let ((translation (string-make-unibyte (current-kill 0))))
(setq kill-ring-yank-pointer killed)
(if text-noninteractive translation
(message "%s: %s" text translation) ))))
(defalias 'sv 'swedish-to-english)
--
underground experts united
http://user.it.uu.se/~embe8573
- Is it possible to transform text before feeding it to ispell?, Marcin Borkowski, 2015/09/08
- Re: Is it possible to transform text before feeding it to ispell?, Alexis, 2015/09/08
- Re: Is it possible to transform text before feeding it to ispell?, Tassilo Horn, 2015/09/08
- google-translate (was: Re: Is it possible to transform text before feeding it to ispell?), Emanuel Berg, 2015/09/08
- Re: google-translate (was: Re: Is it possible to transform text before feeding it to ispell?), Andrey Tykhonov, 2015/09/09
- Re: google-translate (was: Re: Is it possible to transform text before feeding it to ispell?),
Emanuel Berg <=
- Re: google-translate, Emanuel Berg, 2015/09/15
- Re: google-translate, Alex Kost, 2015/09/16
- Re: google-translate, Emanuel Berg, 2015/09/16
- Re: google-translate, Emanuel Berg, 2015/09/17
- Re: google-translate, Emanuel Berg, 2015/09/18
- Re: google-translate, Ian Zimmerman, 2015/09/19
- Re: google-translate, Emanuel Berg, 2015/09/19
- Re: google-translate, Emanuel Berg, 2015/09/19
Re: Is it possible to transform text before feeding it to ispell?, Michael Heerdegen, 2015/09/08