From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nathan Trapuzzano Newsgroups: gmane.emacs.devel Subject: Re: Compile Mode and "host" Emacs Date: Tue, 29 Oct 2013 08:38:08 -0400 Message-ID: <874n80l0b3.fsf@nbtrap.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1383050331 27988 80.91.229.3 (29 Oct 2013 12:38:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Oct 2013 12:38:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Sebastian Wiesner Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 29 13:38:56 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vb8ZS-0008N9-IL for ged-emacs-devel@m.gmane.org; Tue, 29 Oct 2013 13:38:54 +0100 Original-Received: from localhost ([::1]:46902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vb8ZR-0000O2-Po for ged-emacs-devel@m.gmane.org; Tue, 29 Oct 2013 08:38:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vb8ZI-0000Nu-9B for emacs-devel@gnu.org; Tue, 29 Oct 2013 08:38:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vb8ZB-0005Ce-Bq for emacs-devel@gnu.org; Tue, 29 Oct 2013 08:38:44 -0400 Original-Received: from outbound-ss-1235.hostmonster.com ([67.20.99.188]:40531) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Vb8ZB-0005Bb-1q for emacs-devel@gnu.org; Tue, 29 Oct 2013 08:38:37 -0400 Original-Received: (qmail 21073 invoked by uid 0); 29 Oct 2013 12:38:13 -0000 Original-Received: from unknown (HELO host393.hostmonster.com) (66.147.240.193) by oproxy1.mail.unifiedlayer.com with SMTP; 29 Oct 2013 12:38:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbtrap.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=VfT4fhq1XHBeOCc0t5wuRjZJukMO9EIhG8qK8hQlcIE=; b=Dp3KjHHoXzRIEZKAScx+LFI5a2mDLTHy/4xIY0utXQkCEbhFV5mfvD7wZIqhNCCyF84Ouiv036EvBcJEBC6hxOQygTc1PCbUdLtHKduokU/z+gk7FOpgSJM+kSvZDHeJ; Original-Received: from [50.90.253.209] (port=54460 helo=Nathan-GNU) by host393.hostmonster.com with esmtpsa (TLSv1:CAMELLIA128-SHA:128) (Exim 4.80) (envelope-from ) id 1Vb8Ym-00044x-GP; Tue, 29 Oct 2013 06:38:12 -0600 In-Reply-To: (Sebastian Wiesner's message of "Tue, 29 Oct 2013 10:55:15 +0100") User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) X-Identified-User: {1585:host393.hostmonster.com:nbtrapco:nbtrap.com} {sentby:smtp auth 50.90.253.209 authed with nbtrap@nbtrap.com} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 67.20.99.188 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164618 Archived-At: 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. Nathan Sebastian Wiesner 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