From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: flyspell-mode and two languages Date: Fri, 17 Oct 2008 14:35:52 -0700 (PDT) Organization: http://groups.google.com Message-ID: <6e14ca71-4096-4a74-82c3-40bbd8fb45b8@w39g2000prb.googlegroups.com> References: <2e5d3831-2580-4369-be7a-7d1d375241e4@v56g2000hsf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1224279696 31904 80.91.229.12 (17 Oct 2008 21:41:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Oct 2008 21:41:36 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 17 23:42:36 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kqx5a-0002dj-R7 for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Oct 2008 23:42:31 +0200 Original-Received: from localhost ([127.0.0.1]:37814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kqx4V-0007Gz-Mf for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Oct 2008 17:41:23 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!w39g2000prb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 95 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1224279352 16666 127.0.0.1 (17 Oct 2008 21:35:52 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 17 Oct 2008 21:35:52 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: w39g2000prb.googlegroups.com; posting-host=24.6.185.159; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:163541 comp.emacs:97202 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58881 Archived-At: On Oct 17, 1:02 pm, Memnon Anon wrote: > Hi! > > I love flyspell-mode. But I often have to edit files containing 2 > languages, in most > cases german and english. I was wondering how you solved this. Is > there a way to > define a main-language, and if the word seems to be misspelled, check > a > secondary-language? > > Any hint appreciated... no answer to your specific question... but last time i tried flyspell and was extremely dissatisfied with it. For primarily 2 reasons, in order of importance: (1) it doesn't let me right click to select from a list of correct spellings. What i have to do is to go to each word and do ispell-word. (2) its vocabulary is extremely small. Words in modern journalism will typically light it up like neolight show. (e.g. try any article from Time mag (e.g. time.com )) I haven't really spend time to dig solutions on these, but basically abandoned it. What i do is to have a keyboard shortcut that open the current buffer in TextWrangle (aka BBEdit Light), press a button then it highlight all unkown words, then right click on each to fix, then save, close, then back to emacs refresh buffer. However, last week i found =E2=80=A2 Batch style spell checker http://www.emacswiki.org/cgi-bin/wiki/S= peckMode by Martin Rudalics. which is really wonderful. It does (1) like most word processors. I'm not sure if it does contain good sized vocabulary yet. With respect to your question, possibly you could give it a try and maybe it allows multiple lang vocabs. (i'm guessing it does. For one thing, you could add the unknown word. However, i'm not sure where is the source file it adds to. Did spent few min on it but didn't find it.) Related, if you are a dictionary buff like me, you might also like: =E2=98=85 http://www.myrkr.in-berlin.de/dictionary/index.html by Torsten Hilbrich=E2=86=97 . Lookup English word definitions in emacs thru online English dictionary server. There are several others but this is one i tried and sufficiently happy with. Also, most or all emacs dicts are interface to open sourced dicts online. Open sourced dicts are low quality when compared to pro ones. If you work with English in some semi-pro capacity, you'll need access to commercial ones. This i do like this: (defun lookup-word-definition-in-w3m () "Look up the word's definition in a emacs-w3m.\n If a region is active (a phrase), lookup that phrase." (interactive) (let (myword myurl) (setq myword (if (and transient-mark-mode mark-active) (buffer-substring-no-properties (region-beginning) (region-end)) (thing-at-point 'symbol))) (setq myword (replace-regexp-in-string " " "%20" myword)) (setq myurl (concat "http://www.answers.com/main/ntquery?s=3D" myword)) (w3m-browse-url myurl) )) The url used above is American Heritage Dict, which i find the best among some 4 or so prof dicts that are available free online. See also: A Review of 3 Dictionaries http://xahlee.org/Periodic_dosage_dir/bangu/dict_review.html in my setup, pressing 0 on the numerical keypad gets me to def of the current word or text selection from open sourced dict using Torsten Hilbrich's dict mode. Pressing Shift-0 gets me to American Heritage thru w3m to a website. Pressing Ctrl+0 gets me to Wikipedia in a browser. Xah =E2=88=91 http://xahlee.org/ =E2=98=84