From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chris Randle" Subject: RE: run emacs.exe -> point to specific .emacs Date: Mon, 7 Sep 2009 23:40:10 +0100 Message-ID: References: <4AA391D4.5070707@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mkmt2-0006E3-JM for emacs-orgmode@gnu.org; Mon, 07 Sep 2009 18:40:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mkmsy-00068o-4e for emacs-orgmode@gnu.org; Mon, 07 Sep 2009 18:40:36 -0400 Received: from [199.232.76.173] (port=43233 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mkmsy-00068Z-15 for emacs-orgmode@gnu.org; Mon, 07 Sep 2009 18:40:32 -0400 Received: from anchor-post-2.mail.demon.net ([195.173.77.133]:37334) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mkmsx-0006U7-HR for emacs-orgmode@gnu.org; Mon, 07 Sep 2009 18:40:31 -0400 Received: from amlog.demon.co.uk ([80.177.106.135] helo=CUBE) by anchor-post-2.mail.demon.net with esmtp (Exim 4.69) id 1Mkmsr-0004ic-jg for emacs-orgmode@gnu.org; Mon, 07 Sep 2009 22:40:25 +0000 In-Reply-To: <4AA391D4.5070707@fastmail.fm> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Erwin Erwin Panen wrote: > - Is there any command line parameter to point emacs to a specific > /dir/subdir/.emacs_2 file? This would allow me to experiment with > various subsets of .emacs settings? Don't know if this helps at all, but I do the same thing myself. I have a copy of Emacs on a USB stick, and my Org-mode files on a TrueCrypt volume on the same stick. I synchronize the org files with my desktop using Subversion and Tortoise SVN. Works a treat. On the USB stick, I have a batch file called notepad.bat containing the following. The equals signs just delineate the start and end of the file, they're not part of the file: ================== @echo off set OLD-HOME=%HOME% set HOME=%cd% set /p DRIVE_LETTER=Enter drive letter of SD card: %DRIVE_LETTER%:\_Usb\Emacs\bin\runemacs.exe notepad.org set HOME=%OLD-HOME% set OLD-HOME= set DRIVE_LETTER= ==================== Also on the stick, I have a shortcut to the batch file with Target: N:\emacs-data\Notepad.bat Start in: N:\emacs-data Windows seems to be smart (unusual, I know) in that it has no problem with the hard coded drive letter in the shortcut. If drive changes letter on mounting, it copes. But you must create the shortcut with the correct drive letter at that moment. The Start in value designates the current directory which the batch file picks up in the %cd% environment variable and sets HOME to it, so that Emacs knows where to get the .emacs file. Perhaps you could make different shortcuts with different Start in values pointing to folders containing different .emacs files. The complication with %DRIVE_LETTER% is because the USB stick and Emacs itself get mounted with one drive letter and then my org files and .emacs are mounted on the encrypted volume with another drive letter, and the batch file encrypted volume has no way of knowing the drive letter of the USB stick to start Emacs. If you're keeping everything on the one drive letter, you won't need that bit. -- Chris Randle Windows XP Pro SP3 - GNU Emacs 22.1.1 - Org-mode 6.29c