From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: vincent.belaiche@gmail.com (Vincent =?UTF-8?Q?Bela=C3=AFche?=) 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 12:30:37 +0200 Message-ID: <848tkbkrw2.fsf@AIGLEROYAL> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1498732282 7982 195.159.176.226 (29 Jun 2017 10:31:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 29 Jun 2017 10:31:22 +0000 (UTC) Cc: Vincent =?UTF-8?Q?Bela=C3=AFche?= To: 27528@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 29 12:31:14 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 1dQWj6-0001PD-OX for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Jun 2017 12:31:08 +0200 Original-Received: from localhost ([::1]:38207 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQWjB-0005Lk-UX for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Jun 2017 06:31:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQWj3-0005K3-DH for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2017 06:31:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQWj0-00058A-6D for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2017 06:31:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40786) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dQWiz-00057y-Ue for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2017 06:31:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dQWiz-0003G4-MT for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2017 06:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: vincent.belaiche@gmail.com (Vincent =?UTF-8?Q?Bela=C3=AFche?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2017 10:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27528 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.149873224812503 (code B ref -1); Thu, 29 Jun 2017 10:31:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Jun 2017 10:30:48 +0000 Original-Received: from localhost ([127.0.0.1]:43463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQWim-0003Fb-4y for submit@debbugs.gnu.org; Thu, 29 Jun 2017 06:30:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQWik-0003FO-8q for submit@debbugs.gnu.org; Thu, 29 Jun 2017 06:30:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQWid-0004sM-Q5 for submit@debbugs.gnu.org; Thu, 29 Jun 2017 06:30:41 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34772) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dQWid-0004sI-N9 for submit@debbugs.gnu.org; Thu, 29 Jun 2017 06:30:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQWic-0005H5-5q for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2017 06:30:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQWiY-0004pz-UV for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2017 06:30:38 -0400 Original-Received: from smtp06.smtpout.orange.fr ([80.12.242.128]:57720 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dQWiY-0004pT-FU for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2017 06:30:34 -0400 Original-Received: from AIGLEROYAL ([86.214.235.176]) by mwinf5d29 with ME id eaWX1v0193p1sk603aWYVs; Thu, 29 Jun 2017 12:30:32 +0200 X-ME-Helo: AIGLEROYAL X-ME-Auth: dmluY2VudGJlbGFpY2hlQG9yYW5nZS5mcg== X-ME-Date: Thu, 29 Jun 2017 12:30:32 +0200 X-ME-IP: 86.214.235.176 X-Antivirus: Avast (VPS 170628-2, 28/06/2017), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:134020 Archived-At: I consider two Emacs instance 1) instance master : it was built today (2017-06-29) from the HEAD of master branch. Its absolute path is c:/Nos_Programmes/GNU/Emacs/bin/emacs.exe 2) instance emacs-25: it was built on 2017-06-14 from the HEAD of emacs-25 branch. Its absolute path is c:/Nos_Programmes/GNU/Emacs_build20170614/bin/emacs.exe Then I do the following two experiments : 1) The EMACS environment variable points at Emacs instance master, c:/Nos_Programmes/GNU/Emacs/bin/emacs.exe. 2) From an MSYS bash console, outside Emacs, I launch the following command: --8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8---- $EMACS --batch -Q --eval '(princ load-path)' \ > /tmp/load-path-outside-other-emacs.txt 2>&1 --8<----8<----8<----8<----8<-- end -->8---->8---->8---->8---->8---- 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/textm= odes 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/Em= acs/share/emacs/26.0.50/lisp/org c:/Nos_Programmes/GNU/Emacs/share/emacs/26= =2E0.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/lis= p/language c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/internation= al c:/Nos_Programmes/GNU/Emacs/share/emacs/26.0.50/lisp/image c:/Nos_Progra= mmes/GNU/Emacs/share/emacs/26.0.50/lisp/gnus c:/Nos_Programmes/GNU/Emacs/sh= are/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_Prog= rammes/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/obso= lete)--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/libexe= c/emacs/26.0.50/i686-pc-mingw32/': Permission denied Warning: Lisp directory 'c:/Nos_Programmes/GNU/Emacs_build20170614/share/em= acs/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. Please note that this has nothing to do with console being DOS or MSYS, but it has to do with. I did the experiment the other way out (using a DOS console outside Emacs, and an MSYS console inside Emacs). I get the correct output when launching the command from outside Emacs, and the wrong output when launching the command from inside another instance of Emacs. VBR, Vincent. --- L'absence de virus dans ce courrier =C3=A9lectronique a =C3=A9t=C3=A9 v=C3= =A9rifi=C3=A9e par le logiciel antivirus Avast. https://www.avast.com/antivirus