all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Translate-mode
@ 2010-09-06 18:41 Andrea Crotti
  2010-09-06 18:46 ` Translate-mode Lennart Borgman
  0 siblings, 1 reply; 4+ messages in thread
From: Andrea Crotti @ 2010-09-06 18:41 UTC (permalink / raw)
  To: help-gnu-emacs

I would really love to have something like the google translate page but
inside emacs.

The idea is simple, two buffers, one I write and the other is
automatically updated with the translation from and to the languages I
want (using babel.el).

So I think I should remap the command keys that input a space (or tab or
newline) to make them trigger the updating of the second buffer.

How do I make such a keyboard mapping? Still a sparse key with a regular
expression?
Or other ways?

And what's the best way to manage the other buffer, just
with-temp-buffer and keeping read-only and without focus?

Thanks everyone, I hope that it will also be useful for someone else maybe...




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Translate-mode
  2010-09-06 18:41 Translate-mode Andrea Crotti
@ 2010-09-06 18:46 ` Lennart Borgman
  2010-09-07 12:28   ` Translate-mode Andrea Crotti
  0 siblings, 1 reply; 4+ messages in thread
From: Lennart Borgman @ 2010-09-06 18:46 UTC (permalink / raw)
  To: Andrea Crotti; +Cc: help-gnu-emacs

On Mon, Sep 6, 2010 at 8:41 PM, Andrea Crotti <andrea.crotti.0@gmail.com> wrote:
> I would really love to have something like the google translate page but
> inside emacs.
>
> The idea is simple, two buffers, one I write and the other is
> automatically updated with the translation from and to the languages I
> want (using babel.el).
>
> So I think I should remap the command keys that input a space (or tab or
> newline) to make them trigger the updating of the second buffer.
>
> How do I make such a keyboard mapping? Still a sparse key with a regular
> expression?
> Or other ways?
>
> And what's the best way to manage the other buffer, just
> with-temp-buffer and keeping read-only and without focus?
>
> Thanks everyone, I hope that it will also be useful for someone else maybe...

http://www.emacswiki.org/emacs/TextTranslator

But I do not believe in doing the translation on each space char...



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Translate-mode
  2010-09-06 18:46 ` Translate-mode Lennart Borgman
@ 2010-09-07 12:28   ` Andrea Crotti
  2010-09-07 15:17     ` Translate-mode Glauber Alex Dias Prado
  0 siblings, 1 reply; 4+ messages in thread
From: Andrea Crotti @ 2010-09-07 12:28 UTC (permalink / raw)
  To: help-gnu-emacs

Lennart Borgman <lennart.borgman@gmail.com> writes:

>
> http://www.emacswiki.org/emacs/TextTranslator
>
> But I do not believe in doing the translation on each space char...

I think is not exactly what I was looking for, what I would really love
is as I said something auto-updating, not much for real translation of
course but for experimentation.

Even better would be to also have another buffer below which gives the
dictionary definition of the word (even monolingual).
For example I write in X my text in German, I see in y the translation
and in z the definition of every word.

Is something like that doable also?
Any advice on what to use (a minor/major mode, how to map the keyboard etc...)?

| x  | y |
|--------|
|    z   |




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Translate-mode
  2010-09-07 12:28   ` Translate-mode Andrea Crotti
@ 2010-09-07 15:17     ` Glauber Alex Dias Prado
  0 siblings, 0 replies; 4+ messages in thread
From: Glauber Alex Dias Prado @ 2010-09-07 15:17 UTC (permalink / raw)
  To: Andrea Crotti; +Cc: help-gnu-emacs

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> Lennart Borgman <lennart.borgman@gmail.com> writes:
>
>>
>> http://www.emacswiki.org/emacs/TextTranslator
>>
>> But I do not believe in doing the translation on each space char...
>
> I think is not exactly what I was looking for, what I would really love
> is as I said something auto-updating, not much for real translation of
> course but for experimentation.
>
> Even better would be to also have another buffer below which gives the
> dictionary definition of the word (even monolingual).
> For example I write in X my text in German, I see in y the translation
> and in z the definition of every word.
>
> Is something like that doable also?
> Any advice on what to use (a minor/major mode, how to map the keyboard etc...)?
>
> | x  | y |
> |--------|
> |    z   |

I guess you want an asynchronous update of the translated buffer called
on post-command-hook and checking for a space getting the thing at point
every-time to translate, if you want to use google service this is a
nice lib:
http://www.emacswiki.org/emacs/TextTranslator
about minor/major mode i think you will need both but im not a
experienced elisp programmer, minor for the buffer to be translated and
major for the translated content buffer. If i was you i would
concentrate on translation first as the definitions are not that simple
in any language except english i think. 

HTH,
glauber.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-07 15:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-06 18:41 Translate-mode Andrea Crotti
2010-09-06 18:46 ` Translate-mode Lennart Borgman
2010-09-07 12:28   ` Translate-mode Andrea Crotti
2010-09-07 15:17     ` Translate-mode Glauber Alex Dias Prado

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.