From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Agustin Martin Newsgroups: gmane.emacs.bugs Subject: bug#6539: ispell-complete-word looks for wrong file (at least on w32) Date: Mon, 5 Jul 2010 13:30:10 +0200 Message-ID: <20100705113009.GA27776@agmartin.aq.upm.es> References: <20100630103826.GA3847@agmartin.aq.upm.es> <20100630122747.GA20074@agmartin.aq.upm.es> <836310bezc.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1278331197 19730 80.91.229.12 (5 Jul 2010 11:59:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 5 Jul 2010 11:59:57 +0000 (UTC) To: 6539@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 05 13:59:56 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OVkL6-00030g-BW for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jul 2010 13:59:56 +0200 Original-Received: from localhost ([127.0.0.1]:57357 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVkL5-0005bO-Ap for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jul 2010 07:59:55 -0400 Original-Received: from [140.186.70.92] (port=37543 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVkKx-0005b1-L1 for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2010 07:59:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OVkKv-000476-MT for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2010 07:59:47 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36561) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVkKv-000472-Kw for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2010 07:59:45 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OVjt8-00026G-Bd; Mon, 05 Jul 2010 07:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Agustin Martin Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Jul 2010 11:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6539 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6539-submit@debbugs.gnu.org id=B6539.12783294197536 (code B ref 6539); Mon, 05 Jul 2010 11:31:02 +0000 Original-Received: (at 6539) by debbugs.gnu.org; 5 Jul 2010 11:30:19 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVjsR-0001xP-Dr for submit@debbugs.gnu.org; Mon, 05 Jul 2010 07:30:19 -0400 Original-Received: from edison.ccupm.upm.es ([138.100.4.49]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVjsO-0001k2-QW for 6539@debbugs.gnu.org; Mon, 05 Jul 2010 07:30:18 -0400 Original-Received: from agmartin.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 o65BUAXf003653; Mon, 5 Jul 2010 13:30:10 +0200 Original-Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id 1D961463B1; Mon, 5 Jul 2010 13:30:10 +0200 (CEST) Content-Disposition: inline In-Reply-To: <836310bezc.fsf@gnu.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 05 Jul 2010 07:31:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38233 Archived-At: On Wed, Jun 30, 2010 at 08:35:35PM +0300, Eli Zaretskii wrote: > > Date: Wed, 30 Jun 2010 14:27:47 +0200 > > From: Agustin Martin > > Cc: > > > > > > I think that this bug report can be closed or renamed to something like > > > > 'Improve `ispell-alternate-dictionary' docstring'. > > > > > > I think the default for ispell-alternate-dictionary should be changed on w32. > > > > Or, more globally, find a good and not confusing name for default personal > > plain wordlist that can be used in every system, be it w32 or not, so it is > > tried first in `ispell-alternate-dictionary', something like > > > > (expand-file-name "~/.personal.words") > > How will that help, exactly? /usr/dict/words exists on almost every > Posix system, which is why ispell.el has that as the default. But > there's no comparable functionality on Windows, so the only way of > getting this work on Windows is to find or download such a file from > somewhere, and manually install it in some arbitrary directory. How > is Emacs supposed to know whether such a file exists, and where? My initial intention was to provide an out-of-the box default for personal wordlist, useful for both w32 and *X systems. However, as you point out in another message, since this is originally an Ispell feature, I think I should not add an Emacs specific difference. Customizing `ispell-alternate-dictionary' (or `ispell-complete-word-dict') seems the way to go. However, docstrings and error handling for this complete-word stuff needs to be improved, so it provides useful and accurate information. I am currently trying something like attached patch where `ispell-alternate-dictionary' is set to nil if no default is found and checked before use. I find error message too long, but better that before. As usually, suggestions are welcome. It also changes `file-exists-p' to `file-readable-p' in `ispell-alternate-dictionary' definition. I have also noticed that ispell.el uses `ispell-alternate-dictionary' and `ispell-complete-word-dict' in a way that seems to be interchangeable, but confusing. The former was probably used at some time as a real alternate dictionary for spellchecking, but current use seems to be for completion. Have to think a bit more about this. Cheers, -- Agustin