* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
@ 2010-06-30 9:18 Lennart Borgman
2010-06-30 10:38 ` Agustin Martin
0 siblings, 1 reply; 32+ messages in thread
From: Lennart Borgman @ 2010-06-30 9:18 UTC (permalink / raw)
To: 6539
Calling ispell-complete-word on w32 gives the error
grep error: grep: /usr/dict/words: No such file or directory
This is wrong for w32.
I am using aspell. It also seems like the function above does not know
about aspell.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-06-30 9:18 bug#6539: ispell-complete-word looks for wrong file (at least on w32) Lennart Borgman
@ 2010-06-30 10:38 ` Agustin Martin
2010-06-30 11:45 ` Lennart Borgman
2010-07-01 1:34 ` Stefan Monnier
0 siblings, 2 replies; 32+ messages in thread
From: Agustin Martin @ 2010-06-30 10:38 UTC (permalink / raw)
To: Lennart Borgman, 6539
On Wed, Jun 30, 2010 at 11:18:17AM +0200, Lennart Borgman wrote:
> Calling ispell-complete-word on w32 gives the error
>
> grep error: grep: /usr/dict/words: No such file or directory
>
> This is wrong for w32.
>
> I am using aspell. It also seems like the function above does not know
> about aspell.
Hi, Lennart,
`ispell-complete-word' does not use spellchecking dictionaries but
plain wordlists to guess completions, so it does not depend on spellchecking
engines. Plain wordlist to use can be customized by means of
`ispell-alternate-dictionary' variable.
Do you have a plain wordlist installed? It has been considered a nearly
standard part of any UNIX-like system (at least a minimal american wordlist)
whose default location is currently /usr/share/dict/words (or previously
/usr/dict/words). While this does not apply to w32, any plain wordlist at
any of the locations tried in `ispell-alternate-dictionary' should work, as
well as in any other location as long as `ispell-alternate-dictionary' is
modified.
See `lookup-words' along with `ispell-complete-word' for more info.
`ispell-alternate-dictionary' docstring speaks about 'dictionary' instead
of word-list dictionary as `lookup-words' does. Cannot commit now but will
try to put this more clear soon.
I think that this bug report can be closed or renamed to something like
'Improve `ispell-alternate-dictionary' docstring'.
Cheers,
--
Agustin
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-06-30 10:38 ` Agustin Martin
@ 2010-06-30 11:45 ` Lennart Borgman
2010-06-30 12:27 ` Agustin Martin
2010-06-30 17:31 ` Eli Zaretskii
2010-07-01 1:34 ` Stefan Monnier
1 sibling, 2 replies; 32+ messages in thread
From: Lennart Borgman @ 2010-06-30 11:45 UTC (permalink / raw)
To: Agustin Martin; +Cc: 6539
On Wed, Jun 30, 2010 at 12:38 PM, Agustin Martin
<agustin6martin@gmail.com> wrote:
> On Wed, Jun 30, 2010 at 11:18:17AM +0200, Lennart Borgman wrote:
>> Calling ispell-complete-word on w32 gives the error
>>
>> grep error: grep: /usr/dict/words: No such file or directory
>>
>> This is wrong for w32.
>>
>> I am using aspell. It also seems like the function above does not know
>> about aspell.
>
> Hi, Lennart,
Hi Agustin, thanks for replying.
> `ispell-complete-word' does not use spellchecking dictionaries but
> plain wordlists to guess completions, so it does not depend on spellchecking
> engines. Plain wordlist to use can be customized by means of
> `ispell-alternate-dictionary' variable.
OK, thanks. The default for ispell-alternate-dictionary is not a full
path on w32 so that is a bug.
> Do you have a plain wordlist installed? It has been considered a nearly
> standard part of any UNIX-like system (at least a minimal american wordlist)
> whose default location is currently /usr/share/dict/words (or previously
> /usr/dict/words).
Does not such plain wordlists come with ispell or aspell?
> 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.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-06-30 11:45 ` Lennart Borgman
@ 2010-06-30 12:27 ` Agustin Martin
2010-06-30 17:35 ` Eli Zaretskii
2010-06-30 18:07 ` Lennart Borgman
2010-06-30 17:31 ` Eli Zaretskii
1 sibling, 2 replies; 32+ messages in thread
From: Agustin Martin @ 2010-06-30 12:27 UTC (permalink / raw)
To: Lennart Borgman, 6539
> On Wed, Jun 30, 2010 at 01:45:56PM +0200, Lennart Borgman wrote:
>
> Does not such plain wordlists come with ispell or aspell?
Hi,
No, both ispell and aspell use hashed tables derived from affix rules and
affix-compressed word lists and usually only that hash and affix files are
shipped. Since hashes are endianess-dependent, sometimes (e.g. Debian)
compressed affix-compressed wordlists are shipped along with the affix
file and the hash is built on the fly on installation, but full expanded
wordlist is not shipped.
myspell/hunspell use plain affix-compressed word lists together with the
associated affix rules file. In a limit case, myspell and hunspell could
use plain wordlists along with an affix rules file with no affix rules,
but that means huge wordlists and reduced efficiency, thus affix
compression is generally used.
> > 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")
Not sure if that syntax works well in w32. Suggestions are welcome.
Cheers,
--
Agustin
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-06-30 11:45 ` Lennart Borgman
2010-06-30 12:27 ` Agustin Martin
@ 2010-06-30 17:31 ` Eli Zaretskii
2010-06-30 18:13 ` Lennart Borgman
1 sibling, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2010-06-30 17:31 UTC (permalink / raw)
To: Lennart Borgman; +Cc: 6539, agustin6martin
> From: Lennart Borgman <lennart.borgman@gmail.com>
> Date: Wed, 30 Jun 2010 13:45:56 +0200
> Cc: 6539@debbugs.gnu.org
>
> OK, thanks. The default for ispell-alternate-dictionary is not a full
> path on w32 so that is a bug.
How would you suggest to fix this "bug"? I see only 2 possibilities
(besides leaving this as they are and letting w32 users customize the
value, as I did): either (a) signal an error, or (b) search the entire
hard disk storage for a file named `words'.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-06-30 12:27 ` Agustin Martin
@ 2010-06-30 17:35 ` Eli Zaretskii
2010-07-05 11:30 ` Agustin Martin
2010-07-05 11:52 ` Agustin Martin
2010-06-30 18:07 ` Lennart Borgman
1 sibling, 2 replies; 32+ messages in thread
From: Eli Zaretskii @ 2010-06-30 17:35 UTC (permalink / raw)
To: Agustin Martin; +Cc: 6539
> Date: Wed, 30 Jun 2010 14:27:47 +0200
> From: Agustin Martin <agustin.martin@hispalinux.es>
> 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?
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-06-30 12:27 ` Agustin Martin
2010-06-30 17:35 ` Eli Zaretskii
@ 2010-06-30 18:07 ` Lennart Borgman
1 sibling, 0 replies; 32+ messages in thread
From: Lennart Borgman @ 2010-06-30 18:07 UTC (permalink / raw)
To: Agustin Martin; +Cc: 6539
On Wed, Jun 30, 2010 at 2:27 PM, Agustin Martin
<agustin.martin@hispalinux.es> wrote:
>> On Wed, Jun 30, 2010 at 01:45:56PM +0200, Lennart Borgman wrote:
>>
>> Does not such plain wordlists come with ispell or aspell?
>
> Hi,
>
> No, both ispell and aspell use hashed tables derived from affix rules and ...
Thanks for the explanations.
Perhaps it would be possible to rewrite ispell-complete-word to use
those tables instead?
>> 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")
>
> Not sure if that syntax works well in w32. Suggestions are welcome.
It works well on w32. The location seems good too, but maybe it should
be in ~/.emacs.d/.
Maybe the name should remind more about ispell though?
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-06-30 17:31 ` Eli Zaretskii
@ 2010-06-30 18:13 ` Lennart Borgman
2010-06-30 20:55 ` Eli Zaretskii
0 siblings, 1 reply; 32+ messages in thread
From: Lennart Borgman @ 2010-06-30 18:13 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 6539, agustin6martin
On Wed, Jun 30, 2010 at 7:31 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Lennart Borgman <lennart.borgman@gmail.com>
>> Date: Wed, 30 Jun 2010 13:45:56 +0200
>> Cc: 6539@debbugs.gnu.org
>>
>> OK, thanks. The default for ispell-alternate-dictionary is not a full
>> path on w32 so that is a bug.
>
> How would you suggest to fix this "bug"? I see only 2 possibilities
> (besides leaving this as they are and letting w32 users customize the
> value, as I did): either (a) signal an error, or (b) search the entire
> hard disk storage for a file named `words'.
I would perhaps suggest leaving it as nil on w32. That would make it
more clear that this is not a left over from unix systems, but rather
something a user must setup on w32 systems to make it work.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-06-30 18:13 ` Lennart Borgman
@ 2010-06-30 20:55 ` Eli Zaretskii
2010-06-30 21:04 ` Lennart Borgman
0 siblings, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2010-06-30 20:55 UTC (permalink / raw)
To: Lennart Borgman; +Cc: 6539, agustin6martin
> From: Lennart Borgman <lennart.borgman@gmail.com>
> Date: Wed, 30 Jun 2010 20:13:42 +0200
> Cc: agustin6martin@gmail.com, 6539@debbugs.gnu.org
>
> On Wed, Jun 30, 2010 at 7:31 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> >> From: Lennart Borgman <lennart.borgman@gmail.com>
> >> Date: Wed, 30 Jun 2010 13:45:56 +0200
> >> Cc: 6539@debbugs.gnu.org
> >>
> >> OK, thanks. The default for ispell-alternate-dictionary is not a full
> >> path on w32 so that is a bug.
> >
> > How would you suggest to fix this "bug"? I see only 2 possibilities
> > (besides leaving this as they are and letting w32 users customize the
> > value, as I did): either (a) signal an error, or (b) search the entire
> > hard disk storage for a file named `words'.
>
> I would perhaps suggest leaving it as nil on w32. That would make it
> more clear that this is not a left over from unix systems, but rather
> something a user must setup on w32 systems to make it work.
Then you'd see
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
Is that really better?
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-06-30 20:55 ` Eli Zaretskii
@ 2010-06-30 21:04 ` Lennart Borgman
2010-07-01 3:16 ` Eli Zaretskii
0 siblings, 1 reply; 32+ messages in thread
From: Lennart Borgman @ 2010-06-30 21:04 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 6539, agustin6martin
On Wed, Jun 30, 2010 at 10:55 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Lennart Borgman <lennart.borgman@gmail.com>
>> Date: Wed, 30 Jun 2010 20:13:42 +0200
>> Cc: agustin6martin@gmail.com, 6539@debbugs.gnu.org
>>
>> On Wed, Jun 30, 2010 at 7:31 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> >> From: Lennart Borgman <lennart.borgman@gmail.com>
>> >> Date: Wed, 30 Jun 2010 13:45:56 +0200
>> >> Cc: 6539@debbugs.gnu.org
>> >>
>> >> OK, thanks. The default for ispell-alternate-dictionary is not a full
>> >> path on w32 so that is a bug.
>> >
>> > How would you suggest to fix this "bug"? I see only 2 possibilities
>> > (besides leaving this as they are and letting w32 users customize the
>> > value, as I did): either (a) signal an error, or (b) search the entire
>> > hard disk storage for a file named `words'.
>>
>> I would perhaps suggest leaving it as nil on w32. That would make it
>> more clear that this is not a left over from unix systems, but rather
>> something a user must setup on w32 systems to make it work.
>
> Then you'd see
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>
> Is that really better?
Hm, maybe not. Then perhaps a suitable file name for w32 is better?
An accompanying explanatory message would of course be even better.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-06-30 10:38 ` Agustin Martin
2010-06-30 11:45 ` Lennart Borgman
@ 2010-07-01 1:34 ` Stefan Monnier
2010-07-01 3:17 ` Eli Zaretskii
1 sibling, 1 reply; 32+ messages in thread
From: Stefan Monnier @ 2010-07-01 1:34 UTC (permalink / raw)
To: Agustin Martin; +Cc: 6539
> `ispell-complete-word' does not use spellchecking dictionaries but
> plain wordlists to guess completions, so it does not depend on spellchecking
> engines. Plain wordlist to use can be customized by means of
> `ispell-alternate-dictionary' variable.
FWIW, I find it really confusing that ispell-complete-word does not
use ispell. It should probably be moved out of ispell.el (unless we
can somehow make it use some ispell/aspell/hunspell functionality).
Stefan
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-06-30 21:04 ` Lennart Borgman
@ 2010-07-01 3:16 ` Eli Zaretskii
2010-07-01 9:45 ` Lennart Borgman
0 siblings, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2010-07-01 3:16 UTC (permalink / raw)
To: Lennart Borgman; +Cc: 6539, agustin6martin
> From: Lennart Borgman <lennart.borgman@gmail.com>
> Date: Wed, 30 Jun 2010 23:04:11 +0200
> Cc: agustin6martin@gmail.com, 6539@debbugs.gnu.org
>
> > Then you'd see
> >
> > Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> >
> > Is that really better?
>
> Hm, maybe not. Then perhaps a suitable file name for w32 is better?
Then you'd have the same error message as we do now, just with a w32
formatted absolute file name. How is this better than the current
state of affairs?
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-01 1:34 ` Stefan Monnier
@ 2010-07-01 3:17 ` Eli Zaretskii
2010-07-23 15:32 ` Stefan Monnier
0 siblings, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2010-07-01 3:17 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 6539, agustin6martin
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Thu, 01 Jul 2010 03:34:53 +0200
> Cc: 6539@debbugs.gnu.org
>
> FWIW, I find it really confusing that ispell-complete-word does not
> use ispell. It should probably be moved out of ispell.el (unless we
> can somehow make it use some ispell/aspell/hunspell functionality).
It's there because it's an Ispell feature, present also in the
stand-alone version of the speller.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-01 3:16 ` Eli Zaretskii
@ 2010-07-01 9:45 ` Lennart Borgman
2010-07-01 16:54 ` Eli Zaretskii
0 siblings, 1 reply; 32+ messages in thread
From: Lennart Borgman @ 2010-07-01 9:45 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 6539, agustin6martin
On Thu, Jul 1, 2010 at 5:16 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Lennart Borgman <lennart.borgman@gmail.com>
>> Date: Wed, 30 Jun 2010 23:04:11 +0200
>> Cc: agustin6martin@gmail.com, 6539@debbugs.gnu.org
>>
>> > Then you'd see
>> >
>> > Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>> >
>> > Is that really better?
>>
>> Hm, maybe not. Then perhaps a suitable file name for w32 is better?
>
> Then you'd have the same error message as we do now, just with a w32
> formatted absolute file name. How is this better than the current
> state of affairs?
As I said earlier it would be less confusing. Then the user will know
that this is not just something that no one has cared about on w32.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-01 9:45 ` Lennart Borgman
@ 2010-07-01 16:54 ` Eli Zaretskii
2010-07-01 17:01 ` Lennart Borgman
2011-07-13 23:42 ` Lars Magne Ingebrigtsen
0 siblings, 2 replies; 32+ messages in thread
From: Eli Zaretskii @ 2010-07-01 16:54 UTC (permalink / raw)
To: Lennart Borgman; +Cc: 6539, agustin6martin
> From: Lennart Borgman <lennart.borgman@gmail.com>
> Date: Thu, 1 Jul 2010 11:45:51 +0200
> Cc: agustin6martin@gmail.com, 6539@debbugs.gnu.org
>
> On Thu, Jul 1, 2010 at 5:16 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> >> From: Lennart Borgman <lennart.borgman@gmail.com>
> >> Date: Wed, 30 Jun 2010 23:04:11 +0200
> >> Cc: agustin6martin@gmail.com, 6539@debbugs.gnu.org
> >>
> >> > Then you'd see
> >> >
> >> > Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> >> >
> >> > Is that really better?
> >>
> >> Hm, maybe not. Then perhaps a suitable file name for w32 is better?
> >
> > Then you'd have the same error message as we do now, just with a w32
> > formatted absolute file name. How is this better than the current
> > state of affairs?
>
> As I said earlier it would be less confusing.
I don't see how.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-01 16:54 ` Eli Zaretskii
@ 2010-07-01 17:01 ` Lennart Borgman
2011-07-13 23:42 ` Lars Magne Ingebrigtsen
1 sibling, 0 replies; 32+ messages in thread
From: Lennart Borgman @ 2010-07-01 17:01 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 6539, agustin6martin
On Thu, Jul 1, 2010 at 6:54 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Lennart Borgman <lennart.borgman@gmail.com>
>> Date: Thu, 1 Jul 2010 11:45:51 +0200
>> Cc: agustin6martin@gmail.com, 6539@debbugs.gnu.org
>>
>> On Thu, Jul 1, 2010 at 5:16 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> >> From: Lennart Borgman <lennart.borgman@gmail.com>
>> >> Date: Wed, 30 Jun 2010 23:04:11 +0200
>> >> Cc: agustin6martin@gmail.com, 6539@debbugs.gnu.org
>> >>
>> >> > Then you'd see
>> >> >
>> >> > Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>> >> >
>> >> > Is that really better?
>> >>
>> >> Hm, maybe not. Then perhaps a suitable file name for w32 is better?
>> >
>> > Then you'd have the same error message as we do now, just with a w32
>> > formatted absolute file name. How is this better than the current
>> > state of affairs?
>>
>> As I said earlier it would be less confusing.
>
> I don't see how.
If Emacs says that it can not find a file with a path that is clearly
not a w32 path, but a unix style path, is not that more confusing to
you? Don't you get the impression that this is not yet working on w32
because no has fixed the file name? And in such a case don't you get
the impression that there might be more things involved that are not
OS independent?
After seeing many such cases at least I get that impression.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-06-30 17:35 ` Eli Zaretskii
@ 2010-07-05 11:30 ` Agustin Martin
2010-07-05 11:52 ` Agustin Martin
1 sibling, 0 replies; 32+ messages in thread
From: Agustin Martin @ 2010-07-05 11:30 UTC (permalink / raw)
To: 6539
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 <agustin.martin@hispalinux.es>
> > 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
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-06-30 17:35 ` Eli Zaretskii
2010-07-05 11:30 ` Agustin Martin
@ 2010-07-05 11:52 ` Agustin Martin
2010-07-05 12:27 ` Lennart Borgman
2010-07-05 17:23 ` Eli Zaretskii
1 sibling, 2 replies; 32+ messages in thread
From: Agustin Martin @ 2010-07-05 11:52 UTC (permalink / raw)
To: 6539
[-- Attachment #1: Type: text/plain, Size: 2333 bytes --]
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 <agustin.martin@hispalinux.es>
> > 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?
[Really attaching diff]
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
[-- Attachment #2: ispell.el_complete-word-2.diff --]
[-- Type: text/x-diff, Size: 2056 bytes --]
--- ispell.el.orig 2010-07-05 11:31:21.000000000 +0200
+++ ispell.el 2010-07-05 13:25:03.000000000 +0200
@@ -357,21 +357,20 @@
:group 'ispell)
(defcustom ispell-alternate-dictionary
- (cond ((file-exists-p "/usr/dict/web2") "/usr/dict/web2")
- ((file-exists-p "/usr/share/dict/web2") "/usr/share/dict/web2")
- ((file-exists-p "/usr/dict/words") "/usr/dict/words")
- ((file-exists-p "/usr/lib/dict/words") "/usr/lib/dict/words")
- ((file-exists-p "/usr/share/dict/words") "/usr/share/dict/words")
- ((file-exists-p "/usr/share/lib/dict/words")
+ (cond ((file-readable-p "/usr/dict/web2") "/usr/dict/web2")
+ ((file-readable-p "/usr/share/dict/web2") "/usr/share/dict/web2")
+ ((file-readable-p "/usr/dict/words") "/usr/dict/words")
+ ((file-readable-p "/usr/lib/dict/words") "/usr/lib/dict/words")
+ ((file-readable-p "/usr/share/dict/words") "/usr/share/dict/words")
+ ((file-readable-p "/usr/share/lib/dict/words")
"/usr/share/lib/dict/words")
- ((file-exists-p "/sys/dict") "/sys/dict")
- (t "/usr/dict/words"))
- "*Alternate dictionary for spelling help."
+ ((file-readable-p "/sys/dict") "/sys/dict"))
+ "*Alternate plain word-list dictionary for spelling help."
:type '(choice file (const :tag "None" nil))
:group 'ispell)
(defcustom ispell-complete-word-dict ispell-alternate-dictionary
- "*Dictionary used for word completion."
+ "*Plain word-list dictionary used for word completion."
:type '(choice file (const :tag "None" nil))
:group 'ispell)
@@ -2273,6 +2272,12 @@
(if (null lookup-dict)
(setq lookup-dict ispell-alternate-dictionary))
+ (if lookup-dict
+ (unless (file-readable-p lookup-dict)
+ (error "lookup-words error: Unreadable or missing plain word-list %s."
+ lookup-dict))
+ (error "lookup-words error: No plain word-list found at system default locations. Customize `ispell-alternate-dictionary' to set yours."))
+
(let* ((process-connection-type ispell-use-ptys-p)
(wild-p (string-match "\\*" word))
(look-p (and ispell-look-p ; Only use look for an exact match.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-05 11:52 ` Agustin Martin
@ 2010-07-05 12:27 ` Lennart Borgman
2010-07-05 17:23 ` Eli Zaretskii
1 sibling, 0 replies; 32+ messages in thread
From: Lennart Borgman @ 2010-07-05 12:27 UTC (permalink / raw)
To: Agustin Martin; +Cc: 6539
On Mon, Jul 5, 2010 at 1:52 PM, Agustin Martin
<agustin.martin@hispalinux.es> wrote:
>> >
>> > 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?
>
> [Really attaching diff]
>
> 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.
Thanks Agustin, but I still think it is a very bad idea to have
unix-style file names as default for other systems.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-05 11:52 ` Agustin Martin
2010-07-05 12:27 ` Lennart Borgman
@ 2010-07-05 17:23 ` Eli Zaretskii
2010-07-05 17:32 ` Lennart Borgman
2010-07-06 15:12 ` Agustin Martin
1 sibling, 2 replies; 32+ messages in thread
From: Eli Zaretskii @ 2010-07-05 17:23 UTC (permalink / raw)
To: Agustin Martin; +Cc: 6539
> Date: Mon, 5 Jul 2010 13:52:22 +0200
> From: Agustin Martin <agustin.martin@hispalinux.es>
> Cc:
>
> 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.
For the error message, just put 2 spaces between the sentences, as we
do everywhere in Emacs.
For the rest, the patch looks fine, but why not test /usr/dict/words
with file-readable-p as well? Then, if it does not exist, the
defcustom will evaluate to nil, and the error message will be even
more to the point.
Thanks.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-05 17:23 ` Eli Zaretskii
@ 2010-07-05 17:32 ` Lennart Borgman
2010-07-05 17:39 ` Eli Zaretskii
2010-07-06 15:12 ` Agustin Martin
1 sibling, 1 reply; 32+ messages in thread
From: Lennart Borgman @ 2010-07-05 17:32 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Agustin Martin, 6539
On Mon, Jul 5, 2010 at 7:23 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Mon, 5 Jul 2010 13:52:22 +0200
>> From: Agustin Martin <agustin.martin@hispalinux.es>
>> Cc:
>>
>> 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.
>
> For the error message, just put 2 spaces between the sentences, as we
> do everywhere in Emacs.
>
> For the rest, the patch looks fine, but why not test /usr/dict/words
> with file-readable-p as well? Then, if it does not exist, the
> defcustom will evaluate to nil, and the error message will be even
> more to the point.
Such a test will make things even worse with unix style file names on
w32 since they with these paths Emacs will look on the current drive.
That does not have to be the same drive next time the library is
loaded.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-05 17:32 ` Lennart Borgman
@ 2010-07-05 17:39 ` Eli Zaretskii
2010-07-05 17:55 ` Lennart Borgman
0 siblings, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2010-07-05 17:39 UTC (permalink / raw)
To: Lennart Borgman; +Cc: agustin.martin, 6539
> From: Lennart Borgman <lennart.borgman@gmail.com>
> Date: Mon, 5 Jul 2010 19:32:33 +0200
> Cc: Agustin Martin <agustin.martin@hispalinux.es>, 6539@debbugs.gnu.org
>
> > For the rest, the patch looks fine, but why not test /usr/dict/words
> > with file-readable-p as well? Then, if it does not exist, the
> > defcustom will evaluate to nil, and the error message will be even
> > more to the point.
>
>
> Such a test will make things even worse with unix style file names on
> w32 since they with these paths Emacs will look on the current drive.
> That does not have to be the same drive next time the library is
> loaded.
Why does it matter which file names are tried, if the net result will
be the same: to fail?
Read my lips: the _ONLY_ way to make this feature work on Windows is
to customize the value of ispell-complete-word-dict or that of
ispell-alternate-dictionary. Unless you do that, this feature will
_ALWAYS_ fail on Windows; the only thing we can do is make the error
message more helpful. And if the option _is_ customized, I trust the
user to include the drive letter in the value.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-05 17:39 ` Eli Zaretskii
@ 2010-07-05 17:55 ` Lennart Borgman
2010-07-05 18:23 ` Eli Zaretskii
0 siblings, 1 reply; 32+ messages in thread
From: Lennart Borgman @ 2010-07-05 17:55 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: agustin.martin, 6539
On Mon, Jul 5, 2010 at 7:39 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Lennart Borgman <lennart.borgman@gmail.com>
>> Date: Mon, 5 Jul 2010 19:32:33 +0200
>> Cc: Agustin Martin <agustin.martin@hispalinux.es>, 6539@debbugs.gnu.org
>>
>> > For the rest, the patch looks fine, but why not test /usr/dict/words
>> > with file-readable-p as well? Then, if it does not exist, the
>> > defcustom will evaluate to nil, and the error message will be even
>> > more to the point.
>>
>>
>> Such a test will make things even worse with unix style file names on
>> w32 since they with these paths Emacs will look on the current drive.
>> That does not have to be the same drive next time the library is
>> loaded.
>
> Why does it matter which file names are tried, if the net result will
> be the same: to fail?
I thought I did explain that above. The unix style file names can
happen to work on the current default drive if the user did place the
required files there. What is unclear?
> Read my lips: the _ONLY_ way to make this feature work on Windows is
> to customize the value of ispell-complete-word-dict or that of
> ispell-alternate-dictionary. Unless you do that, this feature will
> _ALWAYS_ fail on Windows; the only thing we can do is make the error
> message more helpful. And if the option _is_ customized, I trust the
> user to include the drive letter in the value.
>
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-05 17:55 ` Lennart Borgman
@ 2010-07-05 18:23 ` Eli Zaretskii
2010-07-05 19:50 ` Lennart Borgman
0 siblings, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2010-07-05 18:23 UTC (permalink / raw)
To: Lennart Borgman; +Cc: agustin.martin, 6539
> From: Lennart Borgman <lennart.borgman@gmail.com>
> Date: Mon, 5 Jul 2010 19:55:28 +0200
> Cc: agustin.martin@hispalinux.es, 6539@debbugs.gnu.org
>
> > Why does it matter which file names are tried, if the net result will
> > be the same: to fail?
>
> I thought I did explain that above. The unix style file names can
> happen to work on the current default drive if the user did place the
> required files there.
The chances of the user accidentally putting the file in the same
directory where Ispell looks for it, which doesn't exist on Windows
and needs to be created, are slim. The chances of doing that without
looking at ispell.el and discovering the defcustom and its default
value are even more slim.
So I think your fears are entirely imaginary, and the problem you
describe does not exist in practice.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-05 18:23 ` Eli Zaretskii
@ 2010-07-05 19:50 ` Lennart Borgman
2010-07-06 13:48 ` Agustin Martin
0 siblings, 1 reply; 32+ messages in thread
From: Lennart Borgman @ 2010-07-05 19:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: agustin.martin, 6539
On Mon, Jul 5, 2010 at 8:23 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Lennart Borgman <lennart.borgman@gmail.com>
>> Date: Mon, 5 Jul 2010 19:55:28 +0200
>> Cc: agustin.martin@hispalinux.es, 6539@debbugs.gnu.org
>>
>> > Why does it matter which file names are tried, if the net result will
>> > be the same: to fail?
>>
>> I thought I did explain that above. The unix style file names can
>> happen to work on the current default drive if the user did place the
>> required files there.
>
> The chances of the user accidentally putting the file in the same
> directory where Ispell looks for it, which doesn't exist on Windows
> and needs to be created, are slim. The chances of doing that without
> looking at ispell.el and discovering the defcustom and its default
> value are even more slim.
This can rather easily happen. Just imagine a user getting the error
message and then putting the files there on the current drive.
> So I think your fears are entirely imaginary, and the problem you
> describe does not exist in practice.
It is less imaginary than a matter of imagination and logic.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-05 19:50 ` Lennart Borgman
@ 2010-07-06 13:48 ` Agustin Martin
0 siblings, 0 replies; 32+ messages in thread
From: Agustin Martin @ 2010-07-06 13:48 UTC (permalink / raw)
To: 6539
On Mon, Jul 05, 2010 at 09:50:35PM +0200, Lennart Borgman wrote:
> On Mon, Jul 5, 2010 at 8:23 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> >> From: Lennart Borgman <lennart.borgman@gmail.com>
> >> Date: Mon, 5 Jul 2010 19:55:28 +0200
> >> Cc: agustin.martin@hispalinux.es, 6539@debbugs.gnu.org
> >>
> >> > Why does it matter which file names are tried, if the net result will
> >> > be the same: to fail?
> >>
> >> I thought I did explain that above. The unix style file names can
> >> happen to work on the current default drive if the user did place the
> >> required files there.
> >
> > The chances of the user accidentally putting the file in the same
> > directory where Ispell looks for it, which doesn't exist on Windows
> > and needs to be created, are slim. The chances of doing that without
> > looking at ispell.el and discovering the defcustom and its default
> > value are even more slim.
>
> This can rather easily happen. Just imagine a user getting the error
> message and then putting the files there on the current drive.
Note that proposed new error message does not point to an specific
location (just uses 'standard default locations'), but to customize
`ispell-alternate-dictionary'.
--
Agustin
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-05 17:23 ` Eli Zaretskii
2010-07-05 17:32 ` Lennart Borgman
@ 2010-07-06 15:12 ` Agustin Martin
2010-07-06 18:26 ` Eli Zaretskii
1 sibling, 1 reply; 32+ messages in thread
From: Agustin Martin @ 2010-07-06 15:12 UTC (permalink / raw)
To: 6539
[-- Attachment #1: Type: text/plain, Size: 1817 bytes --]
On Mon, Jul 05, 2010 at 08:23:49PM +0300, Eli Zaretskii wrote:
> > Date: Mon, 5 Jul 2010 13:52:22 +0200
> > From: Agustin Martin <agustin.martin@hispalinux.es>
> > Cc:
> >
> > 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.
>
> For the error message, just put 2 spaces between the sentences, as we
> do everywhere in Emacs.
Thanks, that is the kind of things casual contributors like me usually
forget.
> For the rest, the patch looks fine, but why not test /usr/dict/words
> with file-readable-p as well? Then, if it does not exist, the
> defcustom will evaluate to nil, and the error message will be even
> more to the point.
Seems already checked. Last /usr/dict/words was originally the return value
when nothing is found and has been removed.
Regarding the `ispell-alternate-dictionary'/`ispell-complete-word-dict'
duality I am modifying `ispell-complete-word-dict' default value to nil and
using
(or ispell-complete-word-dict
ispell-alternate-dictionary))
for previous standalone calls of any of both variables. That way
`ispell-complete-word-dict' is only used if explicitly set and
`ispell-alternate-dictionary' is used otherwise. If they are ever used
for something different this should not disturb and leave things ready.
For those curious, I am attaching a diff with my current changes. Will check
a bit more and if no further problems are found will commit to trunk
tomorrow to allow for wider checking of changes.
--
Agustin
[-- Attachment #2: ispell.el_complete-word-3.diff --]
[-- Type: text/x-diff, Size: 3453 bytes --]
--- ispell.el.orig 2010-07-05 11:31:21.000000000 +0200
+++ ispell.el 2010-07-06 16:24:00.000000000 +0200
@@ -357,21 +357,21 @@
:group 'ispell)
(defcustom ispell-alternate-dictionary
- (cond ((file-exists-p "/usr/dict/web2") "/usr/dict/web2")
- ((file-exists-p "/usr/share/dict/web2") "/usr/share/dict/web2")
- ((file-exists-p "/usr/dict/words") "/usr/dict/words")
- ((file-exists-p "/usr/lib/dict/words") "/usr/lib/dict/words")
- ((file-exists-p "/usr/share/dict/words") "/usr/share/dict/words")
- ((file-exists-p "/usr/share/lib/dict/words")
+ (cond ((file-readable-p "/usr/dict/web2") "/usr/dict/web2")
+ ((file-readable-p "/usr/share/dict/web2") "/usr/share/dict/web2")
+ ((file-readable-p "/usr/dict/words") "/usr/dict/words")
+ ((file-readable-p "/usr/lib/dict/words") "/usr/lib/dict/words")
+ ((file-readable-p "/usr/share/dict/words") "/usr/share/dict/words")
+ ((file-readable-p "/usr/share/lib/dict/words")
"/usr/share/lib/dict/words")
- ((file-exists-p "/sys/dict") "/sys/dict")
- (t "/usr/dict/words"))
- "*Alternate dictionary for spelling help."
+ ((file-readable-p "/sys/dict") "/sys/dict"))
+ "*Alternate plain word-list dictionary for spelling help."
:type '(choice file (const :tag "None" nil))
:group 'ispell)
-(defcustom ispell-complete-word-dict ispell-alternate-dictionary
- "*Dictionary used for word completion."
+(defcustom ispell-complete-word-dict nil
+ "*Plain word-list dictionary used for word completion if
+different from `ispell-alternate-dictionary'."
:type '(choice file (const :tag "None" nil))
:group 'ispell)
@@ -2049,10 +2049,11 @@
(erase-buffer)
(setq count ?0
skipped 0
- mode-line-format
+ mode-line-format ;; setup the *Choices* buffer with valid data.
(concat "-- %b -- word: " new-word
- " -- dict: "
- ispell-alternate-dictionary)
+ " -- word-list: "
+ (or ispell-complete-word-dict
+ ispell-alternate-dictionary))
miss (lookup-words new-word)
choices miss
line ispell-choices-win-default-height)
@@ -2267,11 +2268,20 @@
search for the words (usually egrep).
Optional second argument contains the dictionary to use; the default is
-`ispell-alternate-dictionary'."
+`ispell-alternate-dictionary', overriden by `ispell-complete-word-dict'
+if defined."
;; We don't use the filter for this function, rather the result is written
;; into a buffer. Hence there is no need to save the filter values.
(if (null lookup-dict)
- (setq lookup-dict ispell-alternate-dictionary))
+ (setq lookup-dict (or ispell-complete-word-dict
+ ispell-alternate-dictionary)))
+
+ (if lookup-dict
+ (unless (file-readable-p lookup-dict)
+ (error "lookup-words error: Unreadable or missing plain word-list %s."
+ lookup-dict))
+ (error (concat "lookup-words error: No plain word-list found at system default "
+ "locations. Customize `ispell-alternate-dictionary' to set yours.")))
(let* ((process-connection-type ispell-use-ptys-p)
(wild-p (string-match "\\*" word))
@@ -3342,7 +3352,8 @@
(lookup-words (concat (and interior-frag "*") word
(if (or interior-frag (null ispell-look-p))
"*"))
- ispell-complete-word-dict)))
+ (or ispell-complete-word-dict
+ ispell-alternate-dictionary))))
(cond ((eq possibilities t)
(message "No word to complete"))
((null possibilities)
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-06 15:12 ` Agustin Martin
@ 2010-07-06 18:26 ` Eli Zaretskii
0 siblings, 0 replies; 32+ messages in thread
From: Eli Zaretskii @ 2010-07-06 18:26 UTC (permalink / raw)
To: Agustin Martin; +Cc: 6539
> Date: Tue, 6 Jul 2010 17:12:45 +0200
> From: Agustin Martin <agustin.martin@hispalinux.es>
> Cc:
>
> > For the rest, the patch looks fine, but why not test /usr/dict/words
> > with file-readable-p as well? Then, if it does not exist, the
> > defcustom will evaluate to nil, and the error message will be even
> > more to the point.
>
> Seems already checked. Last /usr/dict/words was originally the return value
> when nothing is found and has been removed.
You are right, I've misread the diffs. Sorry.
> For those curious, I am attaching a diff with my current changes. Will check
> a bit more and if no further problems are found will commit to trunk
> tomorrow to allow for wider checking of changes.
Looks okay to me, thanks.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-01 3:17 ` Eli Zaretskii
@ 2010-07-23 15:32 ` Stefan Monnier
2010-07-23 16:47 ` Agustin Martin
2010-07-23 18:01 ` Eli Zaretskii
0 siblings, 2 replies; 32+ messages in thread
From: Stefan Monnier @ 2010-07-23 15:32 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 6539, agustin6martin
>> FWIW, I find it really confusing that ispell-complete-word does not
>> use ispell. It should probably be moved out of ispell.el (unless we
>> can somehow make it use some ispell/aspell/hunspell functionality).
> It's there because it's an Ispell feature, present also in the
> stand-alone version of the speller.
I must be missing something:
Does ispell-complete-word use Ispell? If not, then it shouldn't be in
ispell.el (even if it provides a feature which Ispell also provides).
Stefan
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-23 15:32 ` Stefan Monnier
@ 2010-07-23 16:47 ` Agustin Martin
2010-07-23 18:01 ` Eli Zaretskii
1 sibling, 0 replies; 32+ messages in thread
From: Agustin Martin @ 2010-07-23 16:47 UTC (permalink / raw)
To: 6539
On Fri, Jul 23, 2010 at 05:32:09PM +0200, Stefan Monnier wrote:
> >> FWIW, I find it really confusing that ispell-complete-word does not
> >> use ispell. It should probably be moved out of ispell.el (unless we
> >> can somehow make it use some ispell/aspell/hunspell functionality).
>
> > It's there because it's an Ispell feature, present also in the
> > stand-alone version of the speller.
>
> I must be missing something:
> Does ispell-complete-word use Ispell? If not, then it shouldn't be in
> ispell.el (even if it provides a feature which Ispell also provides).
I see it as related to spell-checking (word-completion is often useful
for that), so ispell.el is not at all a bad place. I guess that is this
relation to spell-checking what makes this feature be provided by Ispell.
Cheers,
--
Agustin
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-23 15:32 ` Stefan Monnier
2010-07-23 16:47 ` Agustin Martin
@ 2010-07-23 18:01 ` Eli Zaretskii
1 sibling, 0 replies; 32+ messages in thread
From: Eli Zaretskii @ 2010-07-23 18:01 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 6539, agustin6martin
> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: agustin6martin@gmail.com, 6539@debbugs.gnu.org
> Date: Fri, 23 Jul 2010 17:32:09 +0200
>
> >> FWIW, I find it really confusing that ispell-complete-word does not
> >> use ispell. It should probably be moved out of ispell.el (unless we
> >> can somehow make it use some ispell/aspell/hunspell functionality).
>
> > It's there because it's an Ispell feature, present also in the
> > stand-alone version of the speller.
>
> I must be missing something:
> Does ispell-complete-word use Ispell?
No.
> If not, then it shouldn't be in ispell.el (even if it provides a
> feature which Ispell also provides).
It was there to begin with, and it saves words into the same personal
dictionary that the rest of ispell.el uses. So I see no point to
remove it from ispell.el, even though it doesn't run Ispell the
program.
^ permalink raw reply [flat|nested] 32+ messages in thread
* bug#6539: ispell-complete-word looks for wrong file (at least on w32)
2010-07-01 16:54 ` Eli Zaretskii
2010-07-01 17:01 ` Lennart Borgman
@ 2011-07-13 23:42 ` Lars Magne Ingebrigtsen
1 sibling, 0 replies; 32+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-13 23:42 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 6539, agustin6martin
Eli Zaretskii <eliz@gnu.org> writes:
>> > Then you'd have the same error message as we do now, just with a w32
>> > formatted absolute file name. How is this better than the current
>> > state of affairs?
>>
>> As I said earlier it would be less confusing.
>
> I don't see how.
Me neither, so I think the current state of the default here is as good
as we're going to get. I'm closing this report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 32+ messages in thread
end of thread, other threads:[~2011-07-13 23:42 UTC | newest]
Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-30 9:18 bug#6539: ispell-complete-word looks for wrong file (at least on w32) Lennart Borgman
2010-06-30 10:38 ` Agustin Martin
2010-06-30 11:45 ` Lennart Borgman
2010-06-30 12:27 ` Agustin Martin
2010-06-30 17:35 ` Eli Zaretskii
2010-07-05 11:30 ` Agustin Martin
2010-07-05 11:52 ` Agustin Martin
2010-07-05 12:27 ` Lennart Borgman
2010-07-05 17:23 ` Eli Zaretskii
2010-07-05 17:32 ` Lennart Borgman
2010-07-05 17:39 ` Eli Zaretskii
2010-07-05 17:55 ` Lennart Borgman
2010-07-05 18:23 ` Eli Zaretskii
2010-07-05 19:50 ` Lennart Borgman
2010-07-06 13:48 ` Agustin Martin
2010-07-06 15:12 ` Agustin Martin
2010-07-06 18:26 ` Eli Zaretskii
2010-06-30 18:07 ` Lennart Borgman
2010-06-30 17:31 ` Eli Zaretskii
2010-06-30 18:13 ` Lennart Borgman
2010-06-30 20:55 ` Eli Zaretskii
2010-06-30 21:04 ` Lennart Borgman
2010-07-01 3:16 ` Eli Zaretskii
2010-07-01 9:45 ` Lennart Borgman
2010-07-01 16:54 ` Eli Zaretskii
2010-07-01 17:01 ` Lennart Borgman
2011-07-13 23:42 ` Lars Magne Ingebrigtsen
2010-07-01 1:34 ` Stefan Monnier
2010-07-01 3:17 ` Eli Zaretskii
2010-07-23 15:32 ` Stefan Monnier
2010-07-23 16:47 ` Agustin Martin
2010-07-23 18:01 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.