From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#20330: Do not capture build-time $PATH in 'emacs' binary Date: Thu, 16 Apr 2015 15:25:10 -0400 Message-ID: References: <87twwjexmg.fsf@gnu.org> <87d235yy39.fsf@gnu.org> <7woamom6cx.fsf@fencepost.gnu.org> <8338409iq6.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1429212377 2194 80.91.229.3 (16 Apr 2015 19:26:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Apr 2015 19:26:17 +0000 (UTC) Cc: ludo@gnu.org, 20330@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 16 21:26:09 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1YipQO-0000wS-LO for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Apr 2015 21:26:08 +0200 Original-Received: from localhost ([::1]:38340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YipQN-0007Bc-Mv for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Apr 2015 15:26:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YipQJ-00078T-Hz for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2015 15:26:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YipQI-0005UQ-NY for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2015 15:26:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YipQI-0005UK-Bo for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2015 15:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YipQH-00040D-VQ for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2015 15:26:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87twwjexmg.fsf@gnu.org> Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Apr 2015 19:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20330 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20330-submit@debbugs.gnu.org id=B20330.142921231515307 (code B ref 20330); Thu, 16 Apr 2015 19:26:01 +0000 Original-Received: (at 20330) by debbugs.gnu.org; 16 Apr 2015 19:25:15 +0000 Original-Received: from localhost ([127.0.0.1]:58340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YipPX-0003yo-Bv for submit@debbugs.gnu.org; Thu, 16 Apr 2015 15:25:15 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:48723 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YipPV-0003ye-FK for 20330@debbugs.gnu.org; Thu, 16 Apr 2015 15:25:13 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YipPT-0007uW-3j; Thu, 16 Apr 2015 15:25:11 -0400 X-Spook: beanpole USCODE sweep analyzer UOP Israel undercover 9/11 X-Ran: }&K%w)$prx-Z-Pw=,TnsiD_stGe+X{NH[1W3$.k7ob_IHi]Q1dg)ON:|C`N;Om8G#1$UPm X-Hue: green X-Attribution: GM User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:101595 Archived-At: Eli Zaretskii wrote: > That'd need to be platform-dependent. No, it wouldn't. I'm only concerned with providing a syntactically valid value, rather than nil. It doesn't actually do anything. But, it has long bugged me that exec-path always shows up in customize-rogue output. The following patch takes care of that, and means I have no problem with setting exec-path to nil in loadup, since it really does become about nothing more than keeping the build-time value out of the binary. (The callproc part is because I noticed that running uninstalled puts the eventual installation directory's libexec into exec-path, which is wrong.) --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -169,7 +169,12 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of (shell-file-name execute file) (exec-path execute (repeat (choice (const :tag "default directory" nil) - (directory :format "%v")))) + (directory :format "%v"))) + nil + :standard + (mapcar 'directory-file-name + (append (parse-colon-path (getenv "PATH")) + (list exec-directory)))) (exec-suffixes execute (repeat string)) ;; charset.c (charset-map-path installation diff --git a/src/callproc.c b/src/callproc.c index e1fe8ed..8c1f910 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -1595,12 +1595,12 @@ init_callproc (void) #ifdef HAVE_NS const char *path_exec = ns_exec_path (); #endif + /* Running uninstalled, so default to tem rather than PATH_EXEC. */ Vexec_path = decode_env_path ("EMACSPATH", #ifdef HAVE_NS path_exec ? path_exec : #endif - PATH_EXEC, 0); - Vexec_path = Fcons (tem, Vexec_path); + SSDATA (tem), 0); Vexec_path = nconc2 (decode_env_path ("PATH", "", 0), Vexec_path); }