Subject: bug#50852: [PATCH] Fix search of the look program.

From: André A. Gomes <[email-masked]>
Date: Tue, 28 Sep 2021 12:02:35 +0300

Lars Ingebrigtsen <[email-masked]> writes:

> André A. Gomes <[email-masked]> writes:
>
>> Here's a more robust way to handle the existence of the look program by
>> ispell.  GNU Guix users will be happy.
>
> Thanks; applied to Emacs 28 (but I made the ispell-look-p change more
> defensive, in case somebody has set ispell-look-command in their init
> file).

Makes sense.  I was naive.

>> There's another aspect worth discussing.  The look program doesn't have
>> the -r flag (as of today), but ispell handles this case (look at
>> ispell-look-options).  It seems that look was published around 1979.
>> Perhaps it's time to deprecate this flag?
>
> Do you know when the "-r" flag disappeared?

That's a good question.  As mentioned above, look is the same in both
MacOS and GNU/Linux.

The -r flag stands for regexp.  It seems odd that a binary search
program like look would support regexp.

My intuition tells me that once upon a time there was a programme named
look whose behaviour resembles that of grep.  But what does a kid like
me know about Unix and the dinosaurs anyway? :)

I'd deprecate support for this odd flag.  But ispell-lookup-words should
definitely use look, by default, instead of grep.   

-- 
André A. Gomes
"Free Thought, Free World"