From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: flyspell bug Date: Tue, 10 May 2005 03:06:48 +0300 Organization: JURTA Message-ID: <87zmv3rg09.fsf_-_@jurta.org> References: <01c5531e$Blat.v2.4$ea8d9a00@zahav.net.il> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1115691088 25772 80.91.229.2 (10 May 2005 02:11:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 10 May 2005 02:11:28 +0000 (UTC) Cc: public@heslin.eclipse.co.uk, mange@freemail.hu, S.J.Eglen@damtp.cam.ac.uk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 10 04:11:24 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DVKCu-0005bG-64 for ged-emacs-devel@m.gmane.org; Tue, 10 May 2005 04:10:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DVKLL-00085h-L9 for ged-emacs-devel@m.gmane.org; Mon, 09 May 2005 22:19:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DVKKm-0007vG-Vu for emacs-devel@gnu.org; Mon, 09 May 2005 22:18:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DVKKh-0007rm-1P for emacs-devel@gnu.org; Mon, 09 May 2005 22:18:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DVKKg-0007qy-FC for emacs-devel@gnu.org; Mon, 09 May 2005 22:18:50 -0400 Original-Received: from [194.126.101.98] (helo=MXR-1.estpak.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DVKMm-0004Lz-Ia for emacs-devel@gnu.org; Mon, 09 May 2005 22:21:00 -0400 Original-Received: from mail.neti.ee (80-235-33-169-dsl.mus.estpak.ee [80.235.33.169]) by MXR-1.estpak.ee (Postfix) with ESMTP id 09ACB178A40; Tue, 10 May 2005 05:14:40 +0300 (EEST) Original-To: emacs-devel@gnu.org In-Reply-To: <01c5531e$Blat.v2.4$ea8d9a00@zahav.net.il> (Eli Zaretskii's message of "Sat, 07 May 2005 19:06:47 +0300") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/22.0.50 (gnu/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: news.gmane.org gmane.emacs.devel:36924 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36924 >> To: emacs-devel@gnu.org >> From: Magnus Henoch >> Date: Wed, 27 Apr 2005 16:04:45 +0200 >> Subject: Re: flyspell bug >> >> So it seems that the variable ispell-really-aspell is moderately >> useful, as there are three situations: ispell, aspell in ispell >> compatibility mode, and "real" aspell. >> >> The following patch eliminates the middle case. The documentation of >> aspell 0.50.5 claims that it supports the "list" command, but I >> haven't tested it. >> >> - --- orig/lisp/textmodes/ispell.el >> +++ mod/lisp/textmodes/ispell.el >> @@ -301,7 +301,8 @@ >> :type 'integer >> :group 'ispell) >> >> - -(defcustom ispell-program-name "ispell" >> +(defcustom ispell-program-name (or (executable-find "aspell") >> + "ispell") >> "Program invoked by \\[ispell-word] and \\[ispell-region] commands." >> :type 'string >> :group 'ispell) > > Thanks, I installed a slightly different change (using locate-file > instead of executable-find). Now with using a non-default dictionary ispell.el fails with the error message telling that ispell can't find a dictionary in /usr/lib/aspell-0.60/. That's becuase ispell and aspell have different sets of dictionaries with different names. ispell.el shouldn't insist on using "aspell" instead of "ispell" even when aspell executable happens to be in exec-path. Perhaps the following patch will do what was intended to fix the original problem: Index: lisp/textmodes/ispell.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/textmodes/ispell.el,v retrieving revision 1.162 diff -u -r1.162 ispell.el --- lisp/textmodes/ispell.el 7 May 2005 16:04:39 -0000 1.162 +++ lisp/textmodes/ispell.el 10 May 2005 00:05:05 -0000 @@ -302,7 +302,8 @@ :group 'ispell) (defcustom ispell-program-name - (or (locate-file "aspell" exec-path exec-suffixes 'file-executable-p) + (or (and ispell-really-aspell + (locate-file "aspell" exec-path exec-suffixes 'file-executable-p)) "ispell") "Program invoked by \\[ispell-word] and \\[ispell-region] commands." :type 'string @@ -815,7 +816,11 @@ (goto-char (point-min)) (let (case-fold-search) (setq ispell-really-aspell - (and (search-forward "(but really Aspell " nil t) t)))) + (and (search-forward "(but really Aspell " nil t) t)) + (if ispell-really-aspell + (let ((exec (locate-file "aspell" exec-path exec-suffixes + 'file-executable-p))) + (if exec (setq ispell-program-name exec)))))) (kill-buffer (current-buffer))) result)) -- Juri Linkov http://www.jurta.org/emacs/