From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#27528: 26.0.50; load-path initialisation is wrong when Emacs is launched in batch mode from a console inside another Emacs Date: Thu, 29 Jun 2017 17:27:32 +0300 Message-ID: <83lgoarhrf.fsf@gnu.org> References: <848tkbkrw2.fsf@AIGLEROYAL> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1498746506 14902 195.159.176.226 (29 Jun 2017 14:28:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 29 Jun 2017 14:28:26 +0000 (UTC) Cc: 27528@debbugs.gnu.org To: vincent.belaiche@gmail.com (Vincent =?UTF-8?Q?Bela=C3=AFche?=) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 29 16:28:19 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQaQZ-0003KK-TV for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Jun 2017 16:28:16 +0200 Original-Received: from localhost ([::1]:39700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQaQf-0002xh-4P for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Jun 2017 10:28:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQaQR-0002wF-Op for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2017 10:28:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQaQM-0003K3-Om for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2017 10:28:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41960) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dQaQM-0003Jx-M0 for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2017 10:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dQaQM-0006Dq-Ga for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2017 10:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2017 14:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27528 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27528-submit@debbugs.gnu.org id=B27528.149874647823908 (code B ref 27528); Thu, 29 Jun 2017 14:28:02 +0000 Original-Received: (at 27528) by debbugs.gnu.org; 29 Jun 2017 14:27:58 +0000 Original-Received: from localhost ([127.0.0.1]:44637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQaQI-0006DX-FV for submit@debbugs.gnu.org; Thu, 29 Jun 2017 10:27:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQaQH-0006DM-Bi for 27528@debbugs.gnu.org; Thu, 29 Jun 2017 10:27:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQaQ7-0003DH-9d for 27528@debbugs.gnu.org; Thu, 29 Jun 2017 10:27:52 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39495) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQaQ7-0003DA-5U; Thu, 29 Jun 2017 10:27:47 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2605 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dQaQ6-0002Ut-Gb; Thu, 29 Jun 2017 10:27:46 -0400 In-reply-to: <848tkbkrw2.fsf@AIGLEROYAL> (vincent.belaiche@gmail.com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:134026 Archived-At: > From: vincent.belaiche@gmail.com (Vincent Belaïche) > Date: Thu, 29 Jun 2017 12:30:37 +0200 > Cc: Vincent Belaïche > > The content of load-path-outside-other-emacs.txt is as follows (all the > content is stdout): > > --8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8---- > (c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/vc c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/url c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/textmodes c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/progmodes c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/play c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/org c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/nxml c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/net c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/mh-e c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/mail c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/leim c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/language c:/Nos_Programmes/GNU/Emacs/share/emacs /26.0.50/lisp/international c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/image c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/gnus c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/eshell c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/erc c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/emulation c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/emacs-lisp c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/cedet c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/calendar c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/calc c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/obsolete)--8<----8<----8<----8<----8<-- end -->8---->8---->8---->8---->8---- > > To me this output is correct. > > 3) From a DOS shell inside emacs-25 instance, launched by `M-x shell', I > launch the following command, that is equivalent to the first one: > > --8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8---- > %EMACS% --batch -Q --eval "(princ load-path)" ^ > > %TEMP%\load-path-inside-emacs-dos.txt 2>&1 > --8<----8<----8<----8<----8<-- end -->8---->8---->8---->8---->8---- > > Then I get the following output: > > --8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8---- > (c:/Nos_Programmes/GNU/Emacs_build20170614/share/emacs/26.0.50/lisp)Warning: arch-dependent data dir 'c:/Nos_Programmes/GNU/Emacs_build20170614/libexec/emacs/26.0.50/i686-pc-mingw32/': Permission denied > Warning: Lisp directory 'c:/Nos_Programmes/GNU/Emacs_build20170614/share/emacs/26.0.50/lisp': Invalid argument > Warning: Could not find simple.el or simple.elc > --8<----8<----8<----8<----8<-- end -->8---->8---->8---->8---->8---- > > The text up to `)' is stdout, and the remainder is stderr. To me this > output is wrong. I think this is because Emacs 25 exports to the environment of the subordinate Emacs its value of emacs_dir, which then points the subordinate Emacs at the directory where Emacs 25 lives. Emacs 26 fixed that problem, AFAIR, so I think if you do it the other way around, i.e. invoke Emacs 25 from inside Emacs 26, you will see the expected behavior.