From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Agustin Martin Newsgroups: gmane.emacs.devel Subject: Re: Adding ispell-multi.el and friends to Emacs Date: Mon, 18 Jun 2007 11:55:06 +0200 Message-ID: <20070618095506.GA4724@agmartin.aq.upm.es> References: <87zm32k7zl.fsf@dur.ac.uk> <87ejkchlh2.fsf@heslin.eclipse.co.uk> <20070617210511.GB5230@agmartin.aq.upm.es> <87645ml132.fsf@jurta.org> <87abuygoqo.fsf@heslin.eclipse.co.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1182160519 30705 80.91.229.12 (18 Jun 2007 09:55:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 18 Jun 2007 09:55:19 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 18 11:55:18 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I0Dx6-00054H-4q for ged-emacs-devel@m.gmane.org; Mon, 18 Jun 2007 11:55:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I0Dx5-0001ZP-Kx for ged-emacs-devel@m.gmane.org; Mon, 18 Jun 2007 05:55:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I0Dx1-0001Xb-EE for emacs-devel@gnu.org; Mon, 18 Jun 2007 05:55:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I0Dx0-0001XP-1y for emacs-devel@gnu.org; Mon, 18 Jun 2007 05:55:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I0Dwz-0001XM-Ul for emacs-devel@gnu.org; Mon, 18 Jun 2007 05:55:09 -0400 Original-Received: from edison.ccupm.upm.es ([138.100.4.49]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I0Dwz-00088M-Eb for emacs-devel@gnu.org; Mon, 18 Jun 2007 05:55:09 -0400 Original-Received: from mala.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by edison.ccupm.upm.es (8.13.8/8.13.8) with ESMTP id l5I9t7aJ027029; Mon, 18 Jun 2007 11:55:07 +0200 Original-Received: by mala.aq.upm.es (Postfix, from userid 1000) id F139B4D450; Mon, 18 Jun 2007 11:55:06 +0200 (CEST) Mail-Followup-To: emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <87abuygoqo.fsf@heslin.eclipse.co.uk> User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: Linux 2.4-2.6 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: news.gmane.org gmane.emacs.devel:73229 Archived-At: On Mon, Jun 18, 2007 at 12:11:59AM +0100, Peter Heslin wrote: > I don't use ispell on its own, so I did not look previously into what it > would take to add this feature to ispell-buffer and friends. I have > taken a quick look now at ispell.el and it seems that ispell-buffer > sends the text of the buffer to the ispell process one line at a time. > This design makes it impossible to switch language in mid-line. > > Perhaps it would be a simple change to modify ispell-process-line so > that it loops over the words in a line and sends each one to ispell > individually, switching processes if the language has changed. Or it > might be hairy to change that function -- I don't know the code well > enough to guess what the complications might be. I think I have read somewhere that current ispell.el ispell-process-line use was made for efficiency, looping over individual words was far slower. Something similar to flyspell-region over large regions. A mixed approach would be to first parse line and loop over words if a language change is detected or active and send lines otherwise. I only looked once at the line handling code to try doing something like that in case of misalignments (doing line per words in case a misalignment is found), but I had no success at all. -- Agustin