GNU bug report logs - #50852
[PATCH] Fix search of the look program.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: André A. Gomes <andremegafone@HIDDEN>; Keywords: patch moreinfo; dated Mon, 27 Sep 2021 18:46:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 50852 <at> debbugs.gnu.org:


Received: (at 50852) by debbugs.gnu.org; 28 Sep 2021 05:54:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 01:54:22 2021
Received: from localhost ([127.0.0.1]:43491 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mV64M-0005QE-Nb
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 01:54:22 -0400
Received: from quimby.gnus.org ([95.216.78.240]:41258)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mV64K-0005Pz-HF
 for 50852 <at> debbugs.gnu.org; Tue, 28 Sep 2021 01:54:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
 :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=20tQ2F0ZkaofObuRgurK503px1xoMd6FtlPi3zMYX4E=; b=FX2W8sVTR5mEpeNca19pUuS4y7
 VzgcEWo0jfWnIQvYpjTD6+/GovZslOS4mxSIB59xJCTCYcF8sD1OVknjdYRkK0hLzCpefqbAG4iyS
 sVBpGK/krnvON6eXNH3JdJ/q2J0tNhcsxlvHEztj2Z3GdDr6Bf9jrpJp+xz4kwfv1vVM=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mV64B-0007ri-ET; Tue, 28 Sep 2021 07:54:14 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: =?utf-8?Q?Andr=C3=A9?= A. Gomes <andremegafone@HIDDEN>
Subject: Re: bug#50852: [PATCH] Fix search of the look program.
References: <87wnn17t85.fsf@HIDDEN>
X-Now-Playing: Lost Girls's _Menneskekollektivet_: "Menneskekollektivet"
Date: Tue, 28 Sep 2021 07:54:07 +0200
In-Reply-To: <87wnn17t85.fsf@HIDDEN> (=?utf-8?Q?=22Andr=C3=A9?= A.
 Gomes"'s message of "Mon, 27 Sep 2021 21:45:30 +0300")
Message-ID: <87zgrxfdog.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  André A. Gomes <andremegafone@HIDDEN> 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). 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50852
Cc: 50852 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Andr=C3=A9 A. Gomes <andremegafone@HIDDEN> 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).

> 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?

--=20
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50852; Package emacs. Full text available.

Message received at 50852 <at> debbugs.gnu.org:


Received: (at 50852) by debbugs.gnu.org; 27 Sep 2021 23:56:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 27 19:56:22 2021
Received: from localhost ([127.0.0.1]:43171 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mV0Tu-0004ko-E4
	for submit <at> debbugs.gnu.org; Mon, 27 Sep 2021 19:56:22 -0400
Received: from mail-pg1-f177.google.com ([209.85.215.177]:39754)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1mV0Ts-0004kb-DW
 for 50852 <at> debbugs.gnu.org; Mon, 27 Sep 2021 19:56:20 -0400
Received: by mail-pg1-f177.google.com with SMTP id g184so19338597pgc.6
 for <50852 <at> debbugs.gnu.org>; Mon, 27 Sep 2021 16:56:20 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:in-reply-to:references:user-agent
 :mime-version:date:message-id:subject:to:cc
 :content-transfer-encoding;
 bh=iT5LaTeprhJEYAs0yuQHaiQUsB5DGh8Xw251F+iBgvo=;
 b=oatUH9HvLTVXo1dmL8XaZfxufKj3Jz4CEh5MEUMLCj/ZBSkGmezb41trz8S8RwtH86
 Lm7hiJr2U8ShSpVt9l7yOYn4GlrjkDnd43FssMUJze+ifzHaqK/Irnz42Yf/nJRcVnZQ
 dPzY/X1CWP9EDEO5c9VLYLf1/LpGCV1jw+wFOAgtH9A5/ZwD3PQoPcf1IrFb/n3s2jkm
 nB+T40ddShiwnT7VEaYjEILux+fuyeuyzPe0qYvfB8+eWAA24DAq3de/zRHl+g9WRso+
 PjM0MiI9ODKjU6LD1uDeN7yOJVpgBpeEr9sHHZDan9ZGfSiHAt5fYmK6s00D6/PxsjO4
 LLFg==
X-Gm-Message-State: AOAM530vWDDzBztgMpf9FbXsdC40nHfhEv2sejLnUNbRlP/oZ36evoYH
 18mYpKQ1WqifjRnNodEHCjbbKpFmsy1h+itAVMU=
X-Google-Smtp-Source: ABdhPJyhHLaHz9N7aO3blmqRAecmaYHwn6bvKOacxHaXm4cy38WqOAmJ/oCTmFjn4KkD38IZRqRI/K1T4eDCkCfrFoo=
X-Received: by 2002:a63:4717:: with SMTP id u23mr1923075pga.359.1632786974618; 
 Mon, 27 Sep 2021 16:56:14 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Mon, 27 Sep 2021 16:56:14 -0700
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: =?UTF-8?B?PDg3d25uMTd0ODUuZnNmQGdtYWlsLmNvbT4gKCJBbmRyw6kgQS4gR29tZXMiJ3Mg?=
 =?UTF-8?B?bWVzc2FnZSBvZiAiTW9uLCAyNyBTZXAgMjAyMSAyMTo0NTozMCArMDMwMCIp?=
References: <87wnn17t85.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Date: Mon, 27 Sep 2021 16:56:14 -0700
Message-ID: <CADwFkm=OuR95+V8Z36cgOK2d9mdL3p3ZZ071E_kgJZ3y8MoOrg@HIDDEN>
Subject: Re: bug#50852: [PATCH] Fix search of the look program.
To: =?UTF-8?B?QW5kcsOpIEEuIEdvbWVz?= <andremegafone@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 50852
Cc: 50852 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Andr=C3=A9 A. Gomes <andremegafone@HIDDEN> writes:

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

LGTM.  I do wonder if this shouldn't be done in many more places...

> 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?

Does that apply to all versions of look or just the GNU one?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50852; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Sep 2021 18:45:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 27 14:45:43 2021
Received: from localhost ([127.0.0.1]:42846 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mUvdH-000114-7x
	for submit <at> debbugs.gnu.org; Mon, 27 Sep 2021 14:45:43 -0400
Received: from lists.gnu.org ([209.51.188.17]:41884)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andremegafone@HIDDEN>) id 1mUvdF-00010x-Fj
 for submit <at> debbugs.gnu.org; Mon, 27 Sep 2021 14:45:41 -0400
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 <andremegafone@HIDDEN>)
 id 1mUvd9-0000k0-23
 for bug-gnu-emacs@HIDDEN; Mon, 27 Sep 2021 14:45:41 -0400
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 <andremegafone@HIDDEN>)
 id 1mUvd7-0004mo-1o
 for bug-gnu-emacs@HIDDEN; Mon, 27 Sep 2021 14:45:34 -0400
Received: by mail-lf1-x12d.google.com with SMTP id m3so81856069lfu.2
 for <bug-gnu-emacs@HIDDEN>; 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)
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 <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 27 Sep 2021 11:45:30 -0700 (PDT)
From: =?utf-8?Q?Andr=C3=A9_A=2E_Gomes?= <andremegafone@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Fix search of the look program.
Date: Mon, 27 Sep 2021 21:45:30 +0300
Message-ID: <87wnn17t85.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=2a00:1450:4864:20::12d;
 envelope-from=andremegafone@HIDDEN; 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-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--=-=-=
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?= <andremegafone@HIDDEN>
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


--=-=-=--




Acknowledgement sent to André A. Gomes <andremegafone@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#50852; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 28 Sep 2021 06:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.