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 13:50:10 +0100

2013/10/29 Nathan Trapuzzano <address@hidden>:
> Your best bet is probably:
>
> (concat (file-name-as-directory invocation-directory) invocation-name)
>
> You can wrap that in (file-truename ...) if you want the true name.

Uhm, you misunderstood me.  I didn't ask how to get the path to the
Emacs executable within the running Emacs instance itself.

Rather, I wanted to know how to get the path to the Emacs executable
**from within a running subprocess**, started by `M-x compile`.

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

I have "$EMACS" and "$INSIDE_EMACS", but the values of these variables
are pretty much useless.

>
> Nathan
>
> Sebastian Wiesner <address@hidden> writes:
>
>> Hello,
>>
>> how can a compilation process obtain the path to the Emacs executable
>> which started it?
>>
>> I know that Emacs sets $EMACS and $INSIDE_EMACS in the environment of
>> compile processes, but the values of these variables aren't exactly
>> helpful and I didn't see any other environment variables in the
>> compile code.  So apparently environment variables can't help me.
>>
>> Is there any way to find out the path to the "host" Emacs executable?
>> Preferably with not too much trickery?
>>
>> Sincerely,
>> Sebastian Wiesner



reply via email to

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