unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50852: [PATCH] Fix search of the look program.
@ 2021-09-27 18:45 André A. Gomes
  2021-09-27 23:56 ` Stefan Kangas
  2021-09-28  5:54 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 13+ messages in thread
From: André A. Gomes @ 2021-09-27 18:45 UTC (permalink / raw)
  To: 50852

[-- Attachment #1: Type: text/plain, Size: 447 bytes --]

Hi Emacs,

Here's a more robust way to handle the existence of the look program by
ispell.  GNU Guix users will be happy.

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?

Thank you.


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-search-of-the-look-program.patch --]
[-- Type: text/x-patch, Size: 1446 bytes --]

From 5a42784837845fa718bd80fd878c88c09d331a5b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20A=2E=20Gomes?= <andremegafone@gmail.com>
Date: Mon, 27 Sep 2021 21:27:26 +0300
Subject: [PATCH] Fix search of the look program.

Not all distributions follow the FHS standard.  For instance, in GNU
Guix the look program lives at /run/current-system/profile/bin/.

* lisp/textmodes/ispell.el: Fix logic concerning the existence of the
look program.
---
 lisp/textmodes/ispell.el | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index b650ab3871..65da617e07 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -250,16 +250,12 @@ Always stores Fcc copy of message when nil."
 Should probably be \"-Ei\"."
   :type 'string)
 
-(defcustom ispell-look-command
-  (cond ((file-exists-p "/bin/look") "/bin/look")
-	((file-exists-p "/usr/local/bin/look") "/usr/local/bin/look")
-	((file-exists-p "/usr/bin/look") "/usr/bin/look")
-	(t "look"))
+(defcustom ispell-look-command (executable-find "look")
   "Name of the look command for search processes.
 This must be an absolute file name."
   :type 'file)
 
-(defcustom ispell-look-p (file-exists-p ispell-look-command)
+(defcustom ispell-look-p ispell-look-command
   "Non-nil means use `look' rather than `grep'.
 Default is based on whether `look' seems to be available."
   :type 'boolean)
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-09-02 11:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 18:45 bug#50852: [PATCH] Fix search of the look program André A. Gomes
2021-09-27 23:56 ` Stefan Kangas
2021-09-28  6:07   ` Eli Zaretskii
2021-09-28  6:11     ` Lars Ingebrigtsen
2021-09-28  7:15       ` Eli Zaretskii
2021-09-28  8:41         ` André A. Gomes
2021-09-28  9:15           ` Eli Zaretskii
2021-10-30 16:09           ` Stefan Kangas
2021-09-28  8:32   ` André A. Gomes
2021-09-28 11:06     ` Stefan Kangas
2022-09-02 11:35       ` Lars Ingebrigtsen
2021-09-28  5:54 ` Lars Ingebrigtsen
2021-09-28  9:02   ` André A. Gomes

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).