From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: windows installer Date: Sun, 12 Nov 2017 17:04:39 +0200 Message-ID: <83lgjbmtbs.fsf@gnu.org> References: <795606216.288650.1510476987589@mail.libero.it> <83r2t3n3c8.fsf@gnu.org> <1831176140.285570.1510496865508@mail.libero.it> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1510499091 12515 195.159.176.226 (12 Nov 2017 15:04:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 12 Nov 2017 15:04:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Angelo Graziosi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 12 16:04:43 2017 Return-path: Envelope-to: ged-emacs-devel@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 1eDtoQ-0002nJ-BB for ged-emacs-devel@m.gmane.org; Sun, 12 Nov 2017 16:04:42 +0100 Original-Received: from localhost ([::1]:49632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDtoU-0003EP-M3 for ged-emacs-devel@m.gmane.org; Sun, 12 Nov 2017 10:04:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDtoN-0003E3-Ow for emacs-devel@gnu.org; Sun, 12 Nov 2017 10:04:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDtoK-0007vR-LA for emacs-devel@gnu.org; Sun, 12 Nov 2017 10:04:39 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDtoK-0007vL-I5; Sun, 12 Nov 2017 10:04:36 -0500 Original-Received: from [176.228.60.248] (port=4137 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eDtoK-0003iz-1u; Sun, 12 Nov 2017 10:04:36 -0500 In-reply-to: <1831176140.285570.1510496865508@mail.libero.it> (message from Angelo Graziosi on Sun, 12 Nov 2017 15:27:45 +0100 (CET)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:220094 Archived-At: > Date: Sun, 12 Nov 2017 15:27:45 +0100 (CET) > From: Angelo Graziosi > Cc: emacs-devel@gnu.org > > > > > cat E:/Emacs_portable/bin/runemacs_portable.bat > > > set HOME=%~dp0..\HOME > > > "%~dp0runemacs.exe" %* > > > > That will do The Wrong Thing if the machine already has a home > > directory for the user. > > Hmm.. it redefines HOME only for Emacs so that .emacs.d, .gnupg etc. go there and not in %APPDATA% No, you redefine HOME for every application that Emacs will invoke as well. > > I think a better solution is to set emacs_dir. See its documentation > > in the user manual. > > I have seen it (https://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Misc-Variables) but I didn't understand much. Really defining > > emacs_dir=%~dp0..\ > > in the .bat make .emacs.d go on the portable device? I don't think you need to do that, as Emacs does that automatically. In any case, this is separate from the HOME issue. If Emacs already finds all of its files on the USB, then emacs_dir setting is not needed. Unless you have INFOPATH set on that machine, or one of the other environment variables, like EMACSLOADPATH, that override emacs_dir. As for HOME, I think you should set it only if it is not already set, and you should use setlocal, not set.