emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Chris Randle" <chris@amlog.co.uk>
To: emacs-orgmode@gnu.org
Subject: RE: run emacs.exe -> point to specific .emacs
Date: Mon, 7 Sep 2009 23:40:10 +0100	[thread overview]
Message-ID: <C1455E848E244A1593CB68A75CCC1267@CUBE> (raw)
In-Reply-To: <4AA391D4.5070707@fastmail.fm>

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

      reply	other threads:[~2009-09-07 22:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-06 10:41 run emacs.exe -> point to specific .emacs Erwin Panen
2009-09-07 22:40 ` Chris Randle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C1455E848E244A1593CB68A75CCC1267@CUBE \
    --to=chris@amlog.co.uk \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).