Subject: 30.0.50; ispell-complete-word only suggests proper nouns

From: Dmitry Gutov <[email-masked]>
Date: Wed, 6 Dec 2023 21:57:02 +0200

Testing the new completion function using ispell, I've noticed the
following problem. It's also easily reproducible on my system with
'M-x ispell-complete-word'.

Only proper nouns (words originally capitalized in the dicitonary) are 
suggested.

Examples:

1. Type 'aard', then 'M-x ispell-complete-word'.
2. No completions.

1. Type 'Az', then 'M-x ispell-complete-word'.
2. The full completions list starts with "Azana" and ends with
"Aztlan's", with no "azimuth" in the list. Only geographic names in
there.

The full dictionary does contain the worth "azimuth", btw:

   (member "azimuth" (ispell-lookup-words ""))
   ;; => ("azimuth" "azimuth's" "azimuths" "azure" "azure's" ...

or

   (member "azimuth" (ispell-lookup-words "a*"))
   ;; => ("azimuth" "azimuth's" "azimuths" "azure" "azure's" ...

however:

   (member "azimuth" (ispell-lookup-words "a"))
   ;; => nil

So it looks like the problem is in the use of the "look" program.
/usr/share/dict/words (on my current system, at least) is sorted so that
"a" comes after "Z", not after "A".

Could be a distribution bug (is dict supposed to be generated compatibly
with 'look'?) Otherwise, it seems best to avoid using 'look' altogether.