help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs as frontend for translate?


From: David Hansen
Subject: Re: emacs as frontend for translate?
Date: Sun, 20 Mar 2005 01:24:10 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

On Sat, 19 Mar 2005 21:28:29 +0100 Raimund Kohl-Fuechsle wrote:

> I use "translate" a lot (Debian Sarge).  Is there a way to use emacs as
> a frontend for translate?

>From my ~/.emacs:

;;;; ding
(defvar dh-ding-file-name "/usr/share/trans/de-en"
  "File name of the ding dictionary.")

(when (file-exists-p dh-ding-file-name)
  (defun dh-ding (&optional query)
    (interactive (list (read-string "Query: " (current-word))))
    (let ((coding-system-for-read 'latin-1)
          (coding-system-for-write 'latin-1))
      (grep (concat "egrep -nHih " query " " dh-ding-file-name))))

  (global-set-key "\C-cw" 'dh-ding))

AFAIK ding and translate are using the same dictionary.

David


reply via email to

[Prev in Thread] Current Thread [Next in Thread]