emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compile Mode and "host" Emacs


From: Sebastian Wiesner
Subject: Re: Compile Mode and "host" Emacs
Date: Tue, 29 Oct 2013 14:11:13 +0100

2013/10/29 Andreas Schwab <address@hidden>:
> Sebastian Wiesner <address@hidden> writes:
>
>> For instance, assume that I do "M-x compile RET foo.sh", then how can
>> I get the path to the Emacs executable **within foo.sh**.
>
> Why do you need that?  What is the difference to running it outside
> Emacs?

Oh, come on, can we please just assume that I *have* a valid use case?
 Is it so hard not to challenge a question, and just *answer* it?

But since you will insist:  I want to interact with the running Emacs,
obviously.  More precisely, in my "build" script I want to evaluate
some expressions, and probably a complete Emacs Lisp script.

Now, it's not quite uncommon to have multiple Emacs versions
installed.  To give the user the freedom of choice in this case, I
provide an option to select the target Emacs.

Currently I just use the default `emacs` executable, if the user
didn't select a different version.  When running outside Emacs, I have
no other choice, but when running from inside Emacs, I could really
use a more clever default, namely the Emacs, that was used to start
the script.

It's not quite an essential feature, but really convenient, if you use
a "non-default" Emacs, that is, an Emacs, which is not available as
"emacs" in "$PATH".  Which is, by the way, a common case on OS X, if
Emacs is installed from a pre-build App bundle.  In such cases,
"emacs" still points to the OS X system Emacs (a horribly dated
version 22), but the user actually uses a more recent version from an
App bundle, started from the graphical user interface of OS X.

>
> Andreas.
>
> --
> Andreas Schwab, SUSE Labs, address@hidden
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]