From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/23078 Path: main.gmane.org!not-for-mail From: Per Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: babelgnus Date: 28 May 1999 21:25:27 +0200 Organization: The Church of Emacs Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035160878 32571 80.91.224.250 (21 Oct 2002 00:41:18 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:41:18 +0000 (UTC) Return-Path: Original-Received: from farabi.math.uh.edu (farabi.math.uh.edu [129.7.128.57]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id PAA08057 for ; Fri, 28 May 1999 15:32:00 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by farabi.math.uh.edu (8.9.1/8.9.1) with ESMTP id OAB17310; Fri, 28 May 1999 14:28:39 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 28 May 1999 14:26:39 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id OAA09999 for ; Fri, 28 May 1999 14:26:29 -0500 (CDT) Original-Received: from sheridan.dina.kvl.dk (sheridan.dina.kvl.dk [130.225.40.227]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id PAA07901 for ; Fri, 28 May 1999 15:25:34 -0400 (EDT) Original-Received: from my.dina.kvl.dk (my.dina.kvl.dk [130.225.40.137]) by sheridan.dina.kvl.dk (8.9.0.Beta5/8.9.0.Beta5) with SMTP id VAA17585; Fri, 28 May 1999 21:25:59 +0200 Original-Received: by my.dina.kvl.dk (SMI-8.6/SMI-SVR4) id VAA20251; Fri, 28 May 1999 21:25:27 +0200 Original-To: ding@gnus.org X-Face: +kRV2]2q}lixHkE{U)mY#+6]{AH=yN~S9@IFiOa@X6?GM|8MBp/ Original-Lines: 38 User-Agent: Gnus/5.070083 (Pterodactyl Gnus v0.83) Emacs/20.3 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:23078 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:23078 Eric Marsden writes: > I just wrote it (I'm in work avoidance mode), so it's hardly been > tested. Download at > > It's cool! Here is a Gnus interface to it. I think it should be added to Gnus with a keybinding and a menu, but that will have to wait until Lars reappears. For now, just add it to your `.gnus', and Type `M-x article-babel RET' in the summary buffer to translate the current message. (defun article-babel-prompt () "Prompt for a babel translation." (require 'babel) (completing-read "Translate from: " babel-translations nil t (car (car babel-translations)) babel-history)) (defun article-babel (translation) "Translate article according to TRANSLATION using babelfish." (interactive (list (article-babel-prompt))) (require 'babel) (save-excursion (set-buffer gnus-article-buffer) (when (article-goto-body) (let* ((buffer-read-only nil) (start (point)) (end (point-max)) (msg (buffer-substring start end))) (delete-region start end) (babel-fetch msg (cdr (assoc translation babel-translations))) (save-restriction (narrow-to-region start (point-max)) (babel-wash))))))