From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jeffrey Spencer Newsgroups: gmane.emacs.help Subject: Re: Getting Hunspell working properly in Linux Date: Sun, 04 Sep 2011 13:39:02 +1000 Message-ID: <4E62F2D6.9030708@gmail.com> References: <4E625F6A.3000307@gmail.com> <87obz1tmy2.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1315107565 11640 80.91.229.12 (4 Sep 2011 03:39:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 4 Sep 2011 03:39:25 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Rasmus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 04 05:39:21 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R03YH-000614-IR for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Sep 2011 05:39:21 +0200 Original-Received: from localhost ([::1]:53414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R03YH-0002tK-0w for geh-help-gnu-emacs@m.gmane.org; Sat, 03 Sep 2011 23:39:21 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:53191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R03YC-0002tD-Vx for help-gnu-emacs@gnu.org; Sat, 03 Sep 2011 23:39:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R03YC-0004uo-21 for help-gnu-emacs@gnu.org; Sat, 03 Sep 2011 23:39:16 -0400 Original-Received: from mail-pz0-f44.google.com ([209.85.210.44]:53819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R03YB-0004ub-Sh for help-gnu-emacs@gnu.org; Sat, 03 Sep 2011 23:39:16 -0400 Original-Received: by pzk36 with SMTP id 36so7331946pzk.17 for ; Sat, 03 Sep 2011 20:39:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=m+ufvcfeeznUnpwbis4haMilP5V1dYfOMAwIuU+qZs8=; b=yCuUAZ7ENGzwtCs6vXcT77nwckR2MA3bqGk5WfXRuZnCjpTlzhYOdxZn1oj8vVOA78 d0O8ZbtBU0BayOgDkAwhNPGE6ZzMI+5VdzPvjuwzFq971O519YN9m9nDdUw03Bfyc/GD 7OdVfADkkSN1aKgpllgcnOtUj5MjlTyqPkwPQ= Original-Received: by 10.68.10.4 with SMTP id e4mr4868021pbb.516.1315107554732; Sat, 03 Sep 2011 20:39:14 -0700 (PDT) Original-Received: from [128.250.61.144] ([128.250.61.144]) by mx.google.com with ESMTPS id e8sm10919482pbc.8.2011.09.03.20.39.12 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 03 Sep 2011 20:39:13 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110628 Thunderbird/5.0 In-Reply-To: <87obz1tmy2.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.44 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82138 Archived-At: Updated to the newest emacs 23.3 from 23.1 and seems hunspell is working just fine. I may try getting wcheck going later but now I only need the english US dictionary. Cheers for the recommendation though. On 09/04/2011 06:01 AM, Rasmus wrote: > I use wcheck > > ** Spelling (Wcheck) > This will load wcheck using hunspell and add global hotkey. Default > language is english > > #+begin_src emacs-lisp > > (setq ispell-really-hunspell t) > > ;; Wcheck > (autoload 'wcheck-mode "wcheck-mode" "Toggle wcheck-mode." t) > (autoload 'wcheck-change-language "wcheck-mode" "Switch wcheck-mode languages." t) > (autoload 'wcheck-spelling-suggestions "wcheck-mode" "Spelling suggestions." t) > (setq wcheck-timer-idle .1) > > > (setq-default > wcheck-language "English" > wcheck-language-data '(("English" > (program . "/usr/bin/enchant") > (args . ("-l" "-t" "-d" "en")) > (suggestion-program . "/usr/bin/enchant") > (suggestion-args . ("-a" "-d" "en_US")) > (suggestion-parser > . wcheck-parse-suggestions-ispell)) > ("Danish" > (program . "/usr/bin/enchant") > (args . ("-l" "-d" "da_DK")) > (suggestion-program . "/usr/bin/hunspell") > (suggestion-args . ( "-t" "-m" "-a" "-d" "da_DK" "-i" "utf-8")) > (suggestion-parser > . wcheck-parse-suggestions-ispell)) > ("German" > (program . "/usr/bin/enchant") > (args . ("-l" "-d" "da_DK")) > (suggestion-program . "/usr/bin/hunspell") > (suggestion-args . ( "-t" "-m" "-a" "-d" "de_DE" "-i" "utf-8")) > (suggestion-parser > . wcheck-parse-suggestions-ispell)) > )) > > > ;; toggle between Danish and English easily > > (defun wcheck-set-danish () > "switch wcheck language to English" > (interactive) > (wcheck-change-language "Danish")) > > (defun wcheck-set-english () > "switch ispell language to English" > (interactive) > (wcheck-change-language "English")) > > (defvar toggle-wcheck-english-danish t > "state of english/danish toggle. nil means English, t means Danish") > > (make-variable-buffer-local 'toggle-ispell-english-danish) > > (defun wcheck-toggle-language () > "Toggle ispell-language between English and Danish" > (interactive) > (if (eq toggle-wcheck-english-danish t) > (progn > ; (set (make-local-variable 'foo) "value") > (set (make-local-variable 'toggle-wcheck-english-danish) nil) > (wcheck-set-danish) > (message "wcheck set to Danish")) > (progn > (set (make-local-variable 'toggle-wcheck-english-danish) t) > (wcheck-set-english) > (message "wcheck set to English")))) > > ;; keys > (define-key global-map [f5] 'wcheck-mode) > (define-key global-map [S-f5] 'wcheck-toggle-language) > > > (global-set-key "\M-n" 'wcheck-spelling-suggestions) > #+end_src > > –Rasmus >