unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Kangas <stefan@marxist.se>
Cc: andremegafone@gmail.com, 50852@debbugs.gnu.org
Subject: bug#50852: [PATCH] Fix search of the look program.
Date: Tue, 28 Sep 2021 09:07:26 +0300	[thread overview]
Message-ID: <8335ppkzc1.fsf@gnu.org> (raw)
In-Reply-To: <CADwFkm=OuR95+V8Z36cgOK2d9mdL3p3ZZ071E_kgJZ3y8MoOrg@mail.gmail.com> (message from Stefan Kangas on Mon, 27 Sep 2021 16:56:14 -0700)

> From: Stefan Kangas <stefan@marxist.se>
> Date: Mon, 27 Sep 2021 16:56:14 -0700
> Cc: 50852@debbugs.gnu.org
> 
> André A. Gomes <andremegafone@gmail.com> 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...

Careful: that will subtly change the behavior.  For starters,
executable-find looks in exec-path, which includes Emacs-specific
directories.  It also has its own ideas about which files are
executable and whether to try some extensions.  And finally,
executable-find could return nil, whereas the original value was never
nil, which could cause some code to signal an error, and requires the
user to redefine the value when a program was originally absent, but
is then installed without restarting Emacs.

I'm not saying these differences are for the worse, but they need to
be carefully considered when making such "innocent" changes, as they
could introduce subtle bugs and misfeatures, at least potentially.

In this case, why not simply have the value as "look" with no leading
directories?  If the program is installed, it will be found when it's
invoked, and if it isn't installed, the user gets an error message at
that time.





  reply	other threads:[~2021-09-28  6:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=8335ppkzc1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=50852@debbugs.gnu.org \
    --cc=andremegafone@gmail.com \
    --cc=stefan@marxist.se \
    /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).