all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: jonas@bernoul.li, 44128@debbugs.gnu.org, akrl@sdf.org
Subject: bug#44128: [feature/native-comp]
Date: Fri, 16 Apr 2021 09:50:58 +0300	[thread overview]
Message-ID: <83y2diwwml.fsf@gnu.org> (raw)
In-Reply-To: <39a1a9f8-7ea5-b476-85b7-6639ace8d7d5@orcon.net.nz> (message from Phil Sainty on Fri, 16 Apr 2021 09:52:59 +1200)

> Cc: akrl@sdf.org, jonas@bernoul.li, 44128@debbugs.gnu.org, eli@gnu.org
> From: Phil Sainty <psainty@orcon.net.nz>
> Date: Fri, 16 Apr 2021 09:52:59 +1200
> 
> On 16/04/21 2:42 am, Eli Zaretskii wrote:
> >> $ emacs --version
> >> emacs: could not resolve realpath of "emacs": No such file or directory
> >> $ touch emacs
> >> $ emacs --version
> >> emacs: /tmp/../native-lisp/28.0.50-abd7aa58/preloaded/window-0d1b8b93-581f9fcd.eln: cannot open shared object file: No such file or directory
> >
> > That's Emacs trying to see if it is run uninstalled, so I see no
> > problem here.  What exactly do you think is wrong with this, again?
> 
> The first problem is that it's currently not possible to start
> emacs if you're in a directory which contains a file or directory
> called 'emacs'.

That's not relevant to the message above; the failure related to the
presence of a directory or file named 'emacs' is a bug that will be
solved.

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

IOW, Emacs always tries the configured installation directory first;
if the files are not there, it tries relative to the invocation
directory on the assumption that we are running uninstalled.  And that
is why you see the error message above.  There's nothing wrong with
the message per se, and once the problem with finding the files in
your case is solved, the message will disappear.

> In future, once this feature is merged, many people will have
> multiple local installs of various native-comp-enabled versions,
> and might be moving between them and/or working on them.  If
> Emacs then tried to run code for the version in the CWD even if
> the executable that was invoked was for a different install, that
> would be very surprising (and potentially very difficult for the
> user to notice).

The *.eln files include various hashes in their file names that
prevent loading of a mismatched .eln file.  This should support having
several variants of a .eln file, corresponding to several Emacs
binaries, in the same directory.  So I don't quite see the danger that
you have in mind.

> I do see the hashes in the filenames, so maybe that scenario is
> already avoided, if the eln filenames are unique to the version
> of Emacs?

Yes.

> This "looking in the CWD" behaviour still feels wrong to me, though.
> Are there other existing ways in which Emacs changes its behaviour
> based on the CWD?

See above: we were doing that since day one, more or less.





  reply	other threads:[~2021-04-16  6:50 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21 21:58 bug#44128: [feature/native-comp] Jonas Bernoulli
2020-10-22 20:51 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-14 13:48   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-14 17:28     ` Johannes Grødem
2021-04-14 22:22     ` Phil Sainty
2021-04-15  6:52       ` Eli Zaretskii
2021-04-15 12:12         ` Phil Sainty
2021-04-15 12:29           ` Eli Zaretskii
2021-04-15 13:01           ` Phil Sainty
2021-04-15 13:52             ` Eli Zaretskii
2021-04-15 14:05               ` Phil Sainty
2021-04-15 14:42                 ` Eli Zaretskii
2021-04-15 21:52                   ` Phil Sainty
2021-04-16  6:50                     ` Eli Zaretskii [this message]
2021-04-16 12:04                       ` Phil Sainty
2021-04-16 12:20                         ` Eli Zaretskii
2021-04-16 12:59                           ` Phil Sainty
2021-04-16 13:21     ` Jonas Bernoulli
2021-04-16 15:08       ` Eli Zaretskii
2021-04-17 13:58         ` bug#44128: [feature/native-comp] When invoking a symlink to the 'emacs' binary Emacs fails to start Eli Zaretskii
2021-04-17 14:13           ` bug#44128: bug#47800: " Phil Sainty
2021-04-17 14:29             ` Eli Zaretskii
2021-04-17 15:00               ` Phil Sainty
2021-04-17 15:12                 ` Eli Zaretskii
2021-04-17 15:39                   ` bug#44128: " Dario Gjorgjevski
2021-04-17 15:48                     ` Eli Zaretskii
2021-04-17 19:15                       ` wilde
2021-04-17 19:18                         ` Eli Zaretskii
2021-04-17 19:32                           ` wilde
2021-04-18  8:42                             ` Eli Zaretskii
2021-04-18  9:01                               ` Eli Zaretskii
2021-04-18 12:24                                 ` wilde
2021-04-18 13:00                                   ` Eli Zaretskii
2021-04-19 14:37                   ` Jonas Bernoulli
2021-04-19 14:52                     ` Eli Zaretskii
2021-04-18  7:40                 ` Phil Sainty
2021-04-18  8:09                   ` bug#44128: " Eli Zaretskii
2021-04-18  3:40           ` Richard Stallman
2021-04-18  6:58             ` Eli Zaretskii
2021-04-15 10:09 ` bug#44128: symlink problem after applying commit 0c1fc9d Kent Engström
2021-04-18  7:41   ` Kent Engström
2021-04-18 16:04     ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83y2diwwml.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=44128@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=jonas@bernoul.li \
    --cc=psainty@orcon.net.nz \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.