From: "André A. Gomes" <andremegafone@gmail.com>
To: 50852@debbugs.gnu.org
Subject: bug#50852: [PATCH] Fix search of the look program.
Date: Mon, 27 Sep 2021 21:45:30 +0300 [thread overview]
Message-ID: <87wnn17t85.fsf@gmail.com> (raw)
[-- 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
next reply other threads:[~2021-09-27 18:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-27 18:45 André A. Gomes [this message]
2021-09-27 23:56 ` bug#50852: [PATCH] Fix search of the look program 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wnn17t85.fsf@gmail.com \
--to=andremegafone@gmail.com \
--cc=50852@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).