GNU bug report logs - #44128
[feature/native-comp]; When invoking a symlink to the 'emacs' binary Emacs fails to start

Previous Next

Package: emacs;

Reported by: Jonas Bernoulli <jonas <at> bernoul.li>

Date: Wed, 21 Oct 2020 22:00:02 UTC

Severity: normal

Merged with 47801

Found in version 28.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #64 received at 44128 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: jonas <at> bernoul.li, 44128 <at> debbugs.gnu.org, akrl <at> sdf.org
Subject: Re: bug#44128: [feature/native-comp]
Date: Fri, 16 Apr 2021 15:20:13 +0300
> Cc: jonas <at> bernoul.li, 44128 <at> debbugs.gnu.org, akrl <at> sdf.org
> From: Phil Sainty <psainty <at> orcon.net.nz>
> Date: Sat, 17 Apr 2021 00:04:12 +1200
> 
> >> The second problem is that this type of behaviour feels rather
> >> like something you mentioned earlier: having "." in your PATH,
> >> which is widely considered a bad idea.
> > 
> > But that ship has sailed long, long, LONG ago: Emacs was always
> > looking for its Lisp files in the directory "../lisp" relative to
> > where it was invoked since about forever.  How else can we support
> > both installed and uninstalled invocations?  When Emacs is run
> > uninstalled, the Lisp files can be anywhere on the system.  The only
> > difference is that now we _also_ look for the *.eln files in a similar
> > fashion.
> 
> For clarity, by the directory "where it was invoked" do you mean
> the arbitrary directory from which the user runs "emacs", or do
> you mean the directory containing the (real) emacs executable?

The latter, of course.

> If we are able to successfully establish where the (real) emacs
> executable is (and your recent patch looked like it achieved this),
> then surely that can account for the "uninstalled invocations"
> cases as well?

No, because if Emacs is invoked as just "emacs" (or, more generally,
any string without directory separators), then we don't know whether
Emacs was run installed or uninstalled.

> My only concern is that looking for particular filenames in the
> user's arbitrary CWD will be prone to false-positives; so if this
> *is* happening, and there's a better solution at hand, perhaps
> there's no longer any need to do it.

We never look in CWD, unless it happens to be invocation-directory.




This bug report was last modified 4 years and 31 days ago.

Previous Next


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