From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Andr=C3=A9?= A. Gomes Newsgroups: gmane.emacs.bugs Subject: bug#50852: [PATCH] Fix search of the look program. Date: Mon, 27 Sep 2021 21:45:30 +0300 Message-ID: <87wnn17t85.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24244"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) To: 50852@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 27 20:46:51 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mUveL-0006AL-ST for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Sep 2021 20:46:49 +0200 Original-Received: from localhost ([::1]:38490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUveK-0000pB-Ju for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Sep 2021 14:46:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUvda-0000ok-Kh for bug-gnu-emacs@gnu.org; Mon, 27 Sep 2021 14:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59536) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUvda-0005At-Ck for bug-gnu-emacs@gnu.org; Mon, 27 Sep 2021 14:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mUvda-00011w-9r for bug-gnu-emacs@gnu.org; Mon, 27 Sep 2021 14:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Andr=C3=A9?= A. Gomes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Sep 2021 18:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50852 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16327683433915 (code B ref -1); Mon, 27 Sep 2021 18:46:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Sep 2021 18:45:43 +0000 Original-Received: from localhost ([127.0.0.1]:42846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUvdH-000114-7x for submit@debbugs.gnu.org; Mon, 27 Sep 2021 14:45:43 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:41884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUvdF-00010x-Fj for submit@debbugs.gnu.org; Mon, 27 Sep 2021 14:45:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUvd9-0000k0-23 for bug-gnu-emacs@gnu.org; Mon, 27 Sep 2021 14:45:41 -0400 Original-Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]:35494) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUvd7-0004mo-1o for bug-gnu-emacs@gnu.org; Mon, 27 Sep 2021 14:45:34 -0400 Original-Received: by mail-lf1-x12d.google.com with SMTP id m3so81856069lfu.2 for ; Mon, 27 Sep 2021 11:45:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:user-agent:mime-version; bh=tpJC3VstqlSYbrtBl9IExkzWpv3E72IwCauSHbN7LlU=; b=eEz7SSXdVobv3/5p1A3VqYfQgSuBlqms4yhDnG1SEtmYSvkKAAcuddKuo9xjonrmMu xW/dxsC5uMZz8lLANlhFnp3uBiJ3L4QSALOXj9slOr1g8sn918IXgcWrah5/86BG3hX/ UTjRJ8xNJoxZYJY9CruyWJOoQigclZQ9DPssjjixtZSXKsCz7LaeP3Zwe367rJxf6L4v xAlzf+qRlgHZTmYoZ+LOwLQm15ytN0Pd1XchByJpA1tY+/WzfqMdiNrRlLnyrMxXu5vd DCPOAqdSJxX/oiqRijY5q4OAlstDHfiIZrLjT7CNONgylyOtso9cnM1Vrqkix2zw34hY bjHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=tpJC3VstqlSYbrtBl9IExkzWpv3E72IwCauSHbN7LlU=; b=gT/H2Mp3doAXL8UkvwwQoxiKMDqXg5AkVUxYzN2F50Czp5040yeYE3Sz6+SAddyaNW IR1u8MyTX/CAC/g+k2fdGcRDOUqsbMyU5YecPO3xUtSJVnZfBTiTWRhF4GQe0Go8b4PO RM9CCfs8Q3CZDMJlbO/fkM1ytbA3+qVOhjsN2sugs4oJMinuxCxiDSCd8FMeK39m6K2l ceS2Ave8rRszQnJcEHi+Hq7UPNeWzXsN3bUOJZI55HEKWtKZyEcV69wHOar2O1pp7noA 9wtrM3sMivcVH7scTLN9E/Ik4TAjbj39AUD82JobB/6TXA6wS73cpEavnQEnemupg+rf ZD5A== X-Gm-Message-State: AOAM531ZD21/a+E1JipXi6u2jCKgyFU4EJfwHXGfSoSgxG+oDxpMllGE anPhUpdYYPBjkvanoulPWrszgC0CdHo= X-Google-Smtp-Source: ABdhPJxeEnzarPs7YrfnL9piCM5VkEcJwzVAuwAxdS8mhcZJUidSCa4iiSKoK3Cy3/D+/j+t4UYfYQ== X-Received: by 2002:a05:6512:33cc:: with SMTP id d12mr1349382lfg.96.1632768331221; Mon, 27 Sep 2021 11:45:31 -0700 (PDT) Original-Received: from guix-xps13 (95-29-46-147.broadband.corbina.ru. [95.29.46.147]) by smtp.gmail.com with ESMTPSA id w2sm1674529lfl.155.2021.09.27.11.45.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 11:45:30 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=andremegafone@gmail.com; helo=mail-lf1-x12d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:215697 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=C3=A9 A. Gomes "Free Thought, Free World" --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-search-of-the-look-program.patch >From 5a42784837845fa718bd80fd878c88c09d331a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20A=2E=20Gomes?= 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 --=-=-=--