From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tak Kunihiro Newsgroups: gmane.emacs.help Subject: Hunspell for Japanese Date: Sat, 17 Feb 2018 22:53:50 +0900 Message-ID: <2D3482A4-0F9A-4D09-86C2-958AB03FA388@misasa.okayama-u.ac.jp> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1518877608 23612 195.159.176.226 (17 Feb 2018 14:26:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 17 Feb 2018 14:26:48 +0000 (UTC) Cc: =?utf-8?B?5Zu95bqD5Y2T5Lmf?= To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 17 15:26:43 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1en3Rd-00053L-2D for geh-help-gnu-emacs@m.gmane.org; Sat, 17 Feb 2018 15:26:29 +0100 Original-Received: from localhost ([::1]:55481 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1en3Tf-0001zO-6A for geh-help-gnu-emacs@m.gmane.org; Sat, 17 Feb 2018 09:28:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1en2vM-0002og-No for help-gnu-emacs@gnu.org; Sat, 17 Feb 2018 08:53:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1en2vH-0007QQ-Qm for help-gnu-emacs@gnu.org; Sat, 17 Feb 2018 08:53:08 -0500 Original-Received: from mail-pl0-x233.google.com ([2607:f8b0:400e:c01::233]:40969) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1en2vH-0007Q7-Kj for help-gnu-emacs@gnu.org; Sat, 17 Feb 2018 08:53:03 -0500 Original-Received: by mail-pl0-x233.google.com with SMTP id k8so3216242pli.8 for ; Sat, 17 Feb 2018 05:53:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:content-transfer-encoding:subject:date:message-id:cc:to :mime-version; bh=V3J1SUHXgJt9HDQhcnfjvdRPF7Gy7c6cyCI0RzyBYKI=; b=PqsvUyVG8XCDGTaXUCPy9SzWbB5/hNhoF4x/q48vE1K2eauOw88BWvpHuHZQe5h7En NeiTp77tlg5M+Aokvzlzor2taUtqsWuSwEmcQEQ77yFAb7lZ72jzeLtNo2bjmpZl6Ums SvGxG8INHKSoyCXjDwWTavO8D4Ckzym4/wWkQrLTtKZV13b4KU3R8Ks5INNmug1VBPEt V+xFV8nOHqepAHEe2mzSYcKzxvwrxnZW4YkNfAV4ehBiRQHITyN/nJsmiv5cBXrmYQtQ VTDv+Elf5D8BWagBSIAC4ZZZ8uMT+04WsVkPTofvGkM+Teex1aVlNELvGUK9dglKCDLk IIww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:content-transfer-encoding:subject :date:message-id:cc:to:mime-version; bh=V3J1SUHXgJt9HDQhcnfjvdRPF7Gy7c6cyCI0RzyBYKI=; b=gosKStNk4BRN/vHEi1y1pKeT2Q/r72XGRnTIRAq1Pmkh6F79sLF5b9umhbNbt7PrSN 4QOmZmZpMfplfK1ZmM56VmqIm9YuMfonqfWDF2erB3p7SvFB/vMeXE5Bz+LG4MUF/EFS Y3K1/z1l02Rdv/EBnNJmzbGXI5P9JGiKp+WjtlhTazTu42GPskYmRLF/qdhO+CxfYCuQ dEE6Z3JVwKkNzC3fs4fPdcsGT28Uj9M92tBFePaWnrzCUI5NOJ9M1h5i96W1hbAe5cGC 4mHZlnriVhbKx1i8uIJ9AzTVUMjtryN3q3qht7NahwD81AZZSDzeiO7r+EmZa7LBD9O8 KYLg== X-Gm-Message-State: APf1xPAB+aNWXD5S/3H/Jz8EGvevGfGDf1xYIDRUhyp5WrgldQXj81GX /oAgQxFCpwIzW1zy64/csc2zXw== X-Google-Smtp-Source: AH8x226oyofPZMne3NXJRw2HGpr5kKYoiSno4IZEMaA8PaNHAKQzHJK0Z3D+n0x2RRgEJ8RXXkoQ5g== X-Received: by 2002:a17:902:1746:: with SMTP id i64-v6mr8806014pli.53.1518875581781; Sat, 17 Feb 2018 05:53:01 -0800 (PST) Original-Received: from [192.168.11.105] (p78059-ipngn200201tottori.tottori.ocn.ne.jp. [114.176.69.59]) by smtp.gmail.com with ESMTPSA id i14sm45573959pgv.40.2018.02.17.05.52.58 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 17 Feb 2018 05:53:00 -0800 (PST) X-Mailer: Apple Mail (2.1878.6) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::233 X-Mailman-Approved-At: Sat, 17 Feb 2018 09:28:01 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:116031 Archived-At: I want to spellcheck English phrases that are mixed in Japanese phrases by `hunspell'. When I call M-x ispell-word, responses from = `aspell' and `hunspell' differ. The difference results in how underlines are drawn = in flyspell-mode. The `hunspell' gives many unnecessary underlines on = Japanese phrases. So I add following to my ~/.emacs.d/inits.el for now. (defun flyspell-ignore-non-ascii (beg end info) "Tell flyspell to ignore non ascii characters. Call this on `flyspell-incorrect-hook'." (string-match "[^!-~]" (buffer-substring beg end))) (add-hook 'flyspell-incorrect-hook 'flyspell-ignore-non-ascii) Is is possible to make `hunspell' behave like `aspell'? GNU Emacs 25.3.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version = 10.9.5 (Build 13F1911)) of 2017-09-19 ## ## Aspell ## $ which aspell /opt/local/bin/aspell $ Emacs -Q M-: (insert "Emacs=E3=81=AF=E6=97=A5=E6=9C=AC=E3=81=A7=E3=81=AF=E3=82=A4=E3= =83=BC=E3=83=9E=E3=83=83=E3=82=AF=E3=82=B9=E3=81=A8=E5=91=BC=E3=81=B0=E3=82= =8C=E3=82=8B") C-a M-: (setq ispell-program-name "aspell") M-x ispell-word X-b *Messages* > Starting new Ispell process /opt/local/bin/aspell with default = dictionary... > Checking spelling of = EMACS=E3=81=AF=E6=97=A5=E6=9C=AC=E8=AA=9E=E3=81=A7=E3=81=AF=E3=82=A4=E3=83= =BC=E3=83=9E=E3=83=83=E3=82=AF=E3=82=B9=E3=81=A8=E5=91=BC=E3=81=B0=E3=82=8C= =E3=82=8B... > EMACS=E3=81=AF=E6=97=A5=E6=9C=AC=E8=AA=9E=E3=81=A7=E3=81=AF=E3=82=A4=E3=83= =BC=E3=83=9E=E3=83=83=E3=82=AF=E3=82=B9=E3=81=A8=E5=91=BC=E3=81=B0=E3=82=8C= =E3=82=8B is correct > You can run the command =E2=80=98ispell-word=E2=80=99 with M-$ ## ## Hunspell ## $ which hunspell /opt/local/bin/hunspell $ hunspell -D ... /opt/local/share/hunspell/en_US LOADED DICTIONARY: /opt/local/share/hunspell/en_US.aff /opt/local/share/hunspell/en_US.dic Hunspell 1.6.2 $ Emacs -Q M-: (insert "Emacs=E3=81=AF=E6=97=A5=E6=9C=AC=E3=81=A7=E3=81=AF=E3=82=A4=E3= =83=BC=E3=83=9E=E3=83=83=E3=82=AF=E3=82=B9=E3=81=A8=E5=91=BC=E3=81=B0=E3=82= =8C=E3=82=8B") C-a M-: (setq ispell-program-name "hunspell") M-x ispell-word X-b *Messages* > Starting new Ispell process hunspell with default dictionary... > Checking spelling of = EMACS=E3=81=AF=E6=97=A5=E6=9C=AC=E8=AA=9E=E3=81=A7=E3=81=AF=E3=82=A4=E3=83= =BC=E3=83=9E=E3=83=83=E3=82=AF=E3=82=B9=E3=81=A8=E5=91=BC=E3=81=B0=E3=82=8C= =E3=82=8B... > ispell-word: Ispell and its process have different character maps