From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Peter Heslin Newsgroups: gmane.emacs.devel Subject: Re: Bug 130397 Date: Sat, 8 Jan 2005 22:39:57 +0000 (UTC) Message-ID: References: <28878.1105029010@ichips.intel.com> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1105225972 9807 80.91.229.6 (8 Jan 2005 23:12:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 8 Jan 2005 23:12:52 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 09 00:12:46 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CnPlG-0000bM-00 for ; Sun, 09 Jan 2005 00:12:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CnPwg-0001ZJ-CN for ged-emacs-devel@m.gmane.org; Sat, 08 Jan 2005 18:24:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CnPvP-00011H-O9 for emacs-devel@gnu.org; Sat, 08 Jan 2005 18:23:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CnPvH-0000yG-3r for emacs-devel@gnu.org; Sat, 08 Jan 2005 18:23:07 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CnPvG-0000tB-SY for emacs-devel@gnu.org; Sat, 08 Jan 2005 18:23:06 -0500 Original-Received: from [80.91.229.2] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CnPFd-000603-TU for emacs-devel@gnu.org; Sat, 08 Jan 2005 17:40:06 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CnPFc-0000of-00 for ; Sat, 08 Jan 2005 23:40:04 +0100 Original-Received: from 213-152-32-235.dsl.eclipse.net.uk ([213.152.32.235]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Jan 2005 23:40:04 +0100 Original-Received: from public by 213-152-32-235.dsl.eclipse.net.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Jan 2005 23:40:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 35 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 213-152-32-235.dsl.eclipse.net.uk User-Agent: slrn/0.9.8.0 (Linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32050 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32050 On 2005-01-08, Geoff Kuenning wrote: > For identical, superset, or overlapping alphabets, the problem is > basically insoluable. For example, "fra" is a misspelling in > English but legal in Italian. If it appears in a mixed passage, > which dictionary should it be fed to? The only solution would seem > to be to require the user to mark passages in some way, as is done > in HTML. I have some code, which works with flyspell, that parses the buffer around point, and sets a text-property to indicate the current language. In LaTeX buffers this is done by examining Babel commands that declare the language; in XML buffers it is done by examining the xml:lang attributes. This only works with flyspell, not ispell.el, because flyspell conveniently provides a hook for a function that gets called whenever a word is spell-checked. My function looks at the relevant text-property and the value of ispell-local-dictionary, and if they don't match, it starts a new ispell/aspell process with the correct dictionary for the current text. It would be great if ispell.el itself checked a text-property like this to indicate the language, so that code like mine could work with both flyspell and ispell. Even better would be if ispell.el could be configured to keep multiple ispell/aspell processes running: one for each language. The speed bottleneck in my code is that when you move point from a part of the buffer in one language to a part in another language, I have to kill the old ispell/aspell process and start up a new one. This causes a noticeable delay when moving the cursor. It would be awesome if, for a buffer with text in two languages, you could keep an ispell/aspell process running for each. I suppose its mainly in flyspell that you would see the speed benefit, though. Peter