unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* emacs-home variable for Windows
@ 2009-10-14  0:00 ken
  2009-10-14  0:04 ` Lennart Borgman
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: ken @ 2009-10-14  0:00 UTC (permalink / raw)
  To: GNU Emacs List


I carry a USB stick to the job.  It's got emacs installed on it and
there's a link on my desktop that I click (after inserting the stick)
and emacs fires up.  It's nice.  I use it every day.  With the paucity
of decent editors from Windows, I *need* it.

There's a couple minor hassles though that I'd like to dispense with.
One is that I don't know a way to tell emacs what the HOME directory is.
 In the past I've just gone into the registry and change some variable
there.  I don't remember where that is or how to do it though.  Besides,
I prefer to have the variable defined in my .emacs (which is at the
top-level directory on the USB stick).  (After emacs loads, I do "M-x
loadfile RETURN e:/.emacs" and that little task loads up the rest of the
stuff emacs needs to know.  But I don't know how tell emacs to make e:/
the home directory.

Anybody?

tia.

-- 
War is a failure of the imagination.
        --William Blake





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs-home variable for Windows
  2009-10-14  0:00 emacs-home variable for Windows ken
@ 2009-10-14  0:04 ` Lennart Borgman
  2009-10-14  0:05 ` Andreas Politz
       [not found] ` <mailman.8717.1255478707.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 11+ messages in thread
From: Lennart Borgman @ 2009-10-14  0:04 UTC (permalink / raw)
  To: gebser; +Cc: GNU Emacs List

On Wed, Oct 14, 2009 at 2:00 AM, ken <gebser@mousecar.com> wrote:
>
> I carry a USB stick to the job.  It's got emacs installed on it and
> there's a link on my desktop that I click (after inserting the stick)
> and emacs fires up.  It's nice.  I use it every day.  With the paucity
> of decent editors from Windows, I *need* it.
>
> There's a couple minor hassles though that I'd like to dispense with.
> One is that I don't know a way to tell emacs what the HOME directory is.
>  In the past I've just gone into the registry and change some variable
> there.  I don't remember where that is or how to do it though.  Besides,
> I prefer to have the variable defined in my .emacs (which is at the
> top-level directory on the USB stick).  (After emacs loads, I do "M-x
> loadfile RETURN e:/.emacs" and that little task loads up the rest of the
> stuff emacs needs to know.  But I don't know how tell emacs to make e:/
> the home directory.


There is a library usb-setup.el in Emacs+EmacsW32 for this.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs-home variable for Windows
  2009-10-14  0:00 emacs-home variable for Windows ken
  2009-10-14  0:04 ` Lennart Borgman
@ 2009-10-14  0:05 ` Andreas Politz
  2009-10-14  7:45   ` ken
       [not found] ` <mailman.8717.1255478707.2239.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 11+ messages in thread
From: Andreas Politz @ 2009-10-14  0:05 UTC (permalink / raw)
  To: help-gnu-emacs

ken <gebser@mousecar.com> writes:

> But I don't know how tell emacs to make e:/ the home directory.
>
> Anybody?
>
> tia.

I do it with a batch-script.

set HOME=e:
start p:\\ath\\to\\emacs\\bin\\runemacs.exe

-ap





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs-home variable for Windows
       [not found] ` <mailman.8717.1255478707.2239.help-gnu-emacs@gnu.org>
@ 2009-10-14  4:50   ` B. T. Raven
  2009-10-14 16:31     ` Lennart Borgman
       [not found]     ` <mailman.8799.1255537948.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 11+ messages in thread
From: B. T. Raven @ 2009-10-14  4:50 UTC (permalink / raw)
  To: help-gnu-emacs

Lennart Borgman wrote:
> On Wed, Oct 14, 2009 at 2:00 AM, ken <gebser@mousecar.com> wrote:
>> I carry a USB stick to the job.  It's got emacs installed on it and
>> there's a link on my desktop that I click (after inserting the stick)
>> and emacs fires up.  It's nice.  I use it every day.  With the paucity
>> of decent editors from Windows, I *need* it.
>>
>> There's a couple minor hassles though that I'd like to dispense with.
>> One is that I don't know a way to tell emacs what the HOME directory is.
>>  In the past I've just gone into the registry and change some variable
>> there.  I don't remember where that is or how to do it though.  Besides,
>> I prefer to have the variable defined in my .emacs (which is at the
>> top-level directory on the USB stick).  (After emacs loads, I do "M-x
>> loadfile RETURN e:/.emacs" and that little task loads up the rest of the
>> stuff emacs needs to know.  But I don't know how tell emacs to make e:/
>> the home directory.
> 
> 
> There is a library usb-setup.el in Emacs+EmacsW32 for this.
> 
> 


Can this .el file be downloaded separately from EmacsW32 to use with the
standard Emacs w32 build? Is it somewhere in nXhtml 1.97 or has it been
removed?

Thanks,

Ed


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs-home variable for Windows
  2009-10-14  0:05 ` Andreas Politz
@ 2009-10-14  7:45   ` ken
  0 siblings, 0 replies; 11+ messages in thread
From: ken @ 2009-10-14  7:45 UTC (permalink / raw)
  Cc: help-gnu-emacs


On 10/13/2009 08:05 PM Andreas Politz wrote:
> ken <gebser@mousecar.com> writes:
> 
>> But I don't know how tell emacs to make e:/ the home directory.
>>
>> Anybody?
>>
>> tia.
> 
> I do it with a batch-script.
> 
> set HOME=e:
> start p:\\ath\\to\\emacs\\bin\\runemacs.exe

Simple.  To the point.  I like it!

It's been a very long time since I created a batch file, never saw a
"start" command before.

I'm guessing this batch file then can become an iconized .lnk on my
desktop, yes?


Thanks, Andreas.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs-home variable for Windows
  2009-10-14  4:50   ` B. T. Raven
@ 2009-10-14 16:31     ` Lennart Borgman
       [not found]     ` <mailman.8799.1255537948.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 11+ messages in thread
From: Lennart Borgman @ 2009-10-14 16:31 UTC (permalink / raw)
  To: B. T. Raven; +Cc: help-gnu-emacs

On Wed, Oct 14, 2009 at 6:50 AM, B. T. Raven <nihil@nihilo.net> wrote:
> Lennart Borgman wrote:
>> On Wed, Oct 14, 2009 at 2:00 AM, ken <gebser@mousecar.com> wrote:
>>> I carry a USB stick to the job.  It's got emacs installed on it and
>>> there's a link on my desktop that I click (after inserting the stick)
>>> and emacs fires up.  It's nice.  I use it every day.  With the paucity
>>> of decent editors from Windows, I *need* it.
>>>
>>> There's a couple minor hassles though that I'd like to dispense with.
>>> One is that I don't know a way to tell emacs what the HOME directory is.
>>>  In the past I've just gone into the registry and change some variable
>>> there.  I don't remember where that is or how to do it though.  Besides,
>>> I prefer to have the variable defined in my .emacs (which is at the
>>> top-level directory on the USB stick).  (After emacs loads, I do "M-x
>>> loadfile RETURN e:/.emacs" and that little task loads up the rest of the
>>> stuff emacs needs to know.  But I don't know how tell emacs to make e:/
>>> the home directory.
>>
>>
>> There is a library usb-setup.el in Emacs+EmacsW32 for this.
>
>
> Can this .el file be downloaded separately from EmacsW32 to use with the
> standard Emacs w32 build? Is it somewhere in nXhtml 1.97 or has it been
> removed?

No, at the moment it is only in Emacs+EmacsW32 and I have not had time
to setup a repository for that.

However all that file does is to use the ideas from

  http://at-aka.blogspot.com/2006/06/portable-emacs-22050-on-usb.html

and reorganises them a bit. So just look there instead.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs-home variable for Windows
       [not found]     ` <mailman.8799.1255537948.2239.help-gnu-emacs@gnu.org>
@ 2009-10-14 23:49       ` B. T. Raven
  2009-10-15  1:15         ` zugzwang
  0 siblings, 1 reply; 11+ messages in thread
From: B. T. Raven @ 2009-10-14 23:49 UTC (permalink / raw)
  To: help-gnu-emacs

Lennart Borgman wrote:
> On Wed, Oct 14, 2009 at 6:50 AM, B. T. Raven <nihil@nihilo.net> wrote:
>> Lennart Borgman wrote:
>>> On Wed, Oct 14, 2009 at 2:00 AM, ken <gebser@mousecar.com> wrote:
>>>> I carry a USB stick to the job.  It's got emacs installed on it and
>>>> there's a link on my desktop that I click (after inserting the stick)
>>>> and emacs fires up.  It's nice.  I use it every day.  With the paucity
>>>> of decent editors from Windows, I *need* it.
>>>>
>>>> There's a couple minor hassles though that I'd like to dispense with.
>>>> One is that I don't know a way to tell emacs what the HOME directory is.
>>>>  In the past I've just gone into the registry and change some variable
>>>> there.  I don't remember where that is or how to do it though.  Besides,
>>>> I prefer to have the variable defined in my .emacs (which is at the
>>>> top-level directory on the USB stick).  (After emacs loads, I do "M-x
>>>> loadfile RETURN e:/.emacs" and that little task loads up the rest of the
>>>> stuff emacs needs to know.  But I don't know how tell emacs to make e:/
>>>> the home directory.
>>>
>>> There is a library usb-setup.el in Emacs+EmacsW32 for this.
>>
>> Can this .el file be downloaded separately from EmacsW32 to use with the
>> standard Emacs w32 build? Is it somewhere in nXhtml 1.97 or has it been
>> removed?
> 
> No, at the moment it is only in Emacs+EmacsW32 and I have not had time
> to setup a repository for that.
> 
> However all that file does is to use the ideas from
> 
>   http://at-aka.blogspot.com/2006/06/portable-emacs-22050-on-usb.html
> 
> and reorganises them a bit. So just look there instead.
> 
> 

Thanks, Lennart. I almost understand the stuff at that link but I can't
see how the variable 'data-directory refers to the right drive letter
until after Emacs is launched from the flash drive. The drive letter
could be G:\ when plugged in today and H:\ tomorrow.

With GnuW32 utils I got as far as producing:

df -a | tail -1 > usbemacs.bat

with the result:

STORE N GO             4021232   1850100   2171132  47% G:\

I am at a loss as to where I should go from here.

Thanks again,

Ed



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs-home variable for Windows
  2009-10-14 23:49       ` B. T. Raven
@ 2009-10-15  1:15         ` zugzwang
  2009-10-15  9:49           ` Bernardo
  2009-10-15 10:03           ` B. T. Raven
  0 siblings, 2 replies; 11+ messages in thread
From: zugzwang @ 2009-10-15  1:15 UTC (permalink / raw)
  To: help-gnu-emacs

On Oct 14, 4:49 pm, "B. T. Raven" <ni...@nihilo.net> wrote:
> Lennart Borgman wrote:
> > On Wed, Oct 14, 2009 at 6:50 AM, B. T. Raven <ni...@nihilo.net> wrote:
> >> Lennart Borgman wrote:
> >>> On Wed, Oct 14, 2009 at 2:00 AM, ken <geb...@mousecar.com> wrote:
> >>>> I carry a USB stick to the job.  It's got emacs installed on it and
> >>>> there's a link on my desktop that I click (after inserting the stick)
> >>>> and emacs fires up.  It's nice.  I use it every day.  With the paucity
> >>>> of decent editors from Windows, I *need* it.
>
> >>>> There's a couple minor hassles though that I'd like to dispense with.
> >>>> One is that I don't know a way to tell emacs what the HOME directory is.
> >>>>  In the past I've just gone into the registry and change some variable
> >>>> there.  I don't remember where that is or how to do it though.  Besides,
> >>>> I prefer to have the variable defined in my .emacs (which is at the
> >>>> top-level directory on the USB stick).  (After emacs loads, I do "M-x
> >>>> loadfile RETURN e:/.emacs" and that little task loads up the rest of the
> >>>> stuff emacs needs to know.  But I don't know how tell emacs to make e:/
> >>>> the home directory.
>
> >>> There is a library usb-setup.el in Emacs+EmacsW32 for this.
>
> >> Can this .el file be downloaded separately from EmacsW32 to use with the
> >> standard Emacs w32 build? Is it somewhere in nXhtml 1.97 or has it been
> >> removed?
>
> > No, at the moment it is only in Emacs+EmacsW32 and I have not had time
> > to setup a repository for that.
>
> > However all that file does is to use the ideas from
>
> >  http://at-aka.blogspot.com/2006/06/portable-emacs-22050-on-usb.html
>
> > and reorganises them a bit. So just look there instead.
>
> Thanks, Lennart. I almost understand the stuff at that link but I can't
> see how the variable 'data-directory refers to the right drive letter
> until after Emacs is launched from the flash drive. The drive letter
> could be G:\ when plugged in today and H:\ tomorrow.
>
> With GnuW32 utils I got as far as producing:
>
> df -a | tail -1 > usbemacs.bat
>
> with the result:
>
> STORE N GO             4021232   1850100   2171132  47% G:\
>
> I am at a loss as to where I should go from here.
>
> Thanks again,
>
> Ed

I've never used emacs, and my Dos batch-writing skills are rusty, so
all I can offer is a conceptual solution.  Presumably, your emacs
distribution contains a directory not found on any other drive (e.g.
<drive_letter>:\MyEmacsDir\).  Any unique path will do.  Simply have
the desk icon start a batch file that begins as follows:

dir C:\MyEmacsDir\
If error: directory not exist, continue : else set variable_1 to 'C'
and then goto Label_1:

dir D:\MyEmacsDir\
If error: directory not exist, continue : else set variable_1 to 'D'
and then goto Label_1:

dir E:\MyEmacsDir\
If error: directory not exist, continue : else set variable_1 to 'E'
and then goto Label_1:

...

Label_1:
set <Emacs_Home> to %variable_1%<desired_path>
execute %variable_1%:\<desired path_name + executable file_name>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs-home variable for Windows
  2009-10-15  1:15         ` zugzwang
@ 2009-10-15  9:49           ` Bernardo
  2009-10-15 10:03           ` B. T. Raven
  1 sibling, 0 replies; 11+ messages in thread
From: Bernardo @ 2009-10-15  9:49 UTC (permalink / raw)
  To: help-gnu-emacs



zugzwang said the following on 10/15/09 12:15:
> On Oct 14, 4:49 pm, "B. T. Raven" <ni...@nihilo.net> wrote:
>> Lennart Borgman wrote:
>>> On Wed, Oct 14, 2009 at 6:50 AM, B. T. Raven <ni...@nihilo.net> wrote:
>>>> Lennart Borgman wrote:
>>>>> On Wed, Oct 14, 2009 at 2:00 AM, ken <geb...@mousecar.com> wrote:
>>>>>> I carry a USB stick to the job.  It's got emacs installed on it and
>>>>>> there's a link on my desktop that I click (after inserting the stick)
>>>>>> and emacs fires up.  It's nice.  I use it every day.  With the paucity
>>>>>> of decent editors from Windows, I *need* it.
>>>>>> There's a couple minor hassles though that I'd like to dispense with.
>>>>>> One is that I don't know a way to tell emacs what the HOME directory is.
>>>>>>  In the past I've just gone into the registry and change some variable
>>>>>> there.  I don't remember where that is or how to do it though.  Besides,
>>>>>> I prefer to have the variable defined in my .emacs (which is at the
>>>>>> top-level directory on the USB stick).  (After emacs loads, I do "M-x
>>>>>> loadfile RETURN e:/.emacs" and that little task loads up the rest of the
>>>>>> stuff emacs needs to know.  But I don't know how tell emacs to make e:/
>>>>>> the home directory.
>>>>> There is a library usb-setup.el in Emacs+EmacsW32 for this.
>>>> Can this .el file be downloaded separately from EmacsW32 to use with the
>>>> standard Emacs w32 build? Is it somewhere in nXhtml 1.97 or has it been
>>>> removed?
>>> No, at the moment it is only in Emacs+EmacsW32 and I have not had time
>>> to setup a repository for that.
>>> However all that file does is to use the ideas from
>>>  http://at-aka.blogspot.com/2006/06/portable-emacs-22050-on-usb.html
>>> and reorganises them a bit. So just look there instead.
>> Thanks, Lennart. I almost understand the stuff at that link but I can't
>> see how the variable 'data-directory refers to the right drive letter
>> until after Emacs is launched from the flash drive. The drive letter
>> could be G:\ when plugged in today and H:\ tomorrow.
>>
>> With GnuW32 utils I got as far as producing:
>>
>> df -a | tail -1 > usbemacs.bat
>>
>> with the result:
>>
>> STORE N GO             4021232   1850100   2171132  47% G:\
>>
>> I am at a loss as to where I should go from here.
>>
>> Thanks again,
>>
>> Ed
> 
> I've never used emacs, and my Dos batch-writing skills are rusty, so
> all I can offer is a conceptual solution.  Presumably, your emacs
> distribution contains a directory not found on any other drive (e.g.
> <drive_letter>:\MyEmacsDir\).  Any unique path will do.  Simply have
> the desk icon start a batch file that begins as follows:
> 
> dir C:\MyEmacsDir\
> If error: directory not exist, continue : else set variable_1 to 'C'
> and then goto Label_1:
> 
> dir D:\MyEmacsDir\
> If error: directory not exist, continue : else set variable_1 to 'D'
> and then goto Label_1:
> 
> dir E:\MyEmacsDir\
> If error: directory not exist, continue : else set variable_1 to 'E'
> and then goto Label_1:
> 
> ...
> 
> Label_1:
> set <Emacs_Home> to %variable_1%<desired_path>
> execute %variable_1%:\<desired path_name + executable file_name>
> 
> 
it is simpler if you start with Andreas' batch file, copy it to the USB 
drive and modify the first line from:
   set HOME=e:
to
   set HOME=%CD%

double clicking on this batch file should work regardless of the drive 
name letter




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs-home variable for Windows
  2009-10-15  1:15         ` zugzwang
  2009-10-15  9:49           ` Bernardo
@ 2009-10-15 10:03           ` B. T. Raven
  2009-10-19 11:58             ` Henri Fischer
  1 sibling, 1 reply; 11+ messages in thread
From: B. T. Raven @ 2009-10-15 10:03 UTC (permalink / raw)
  To: help-gnu-emacs

zugzwang wrote:
> On Oct 14, 4:49 pm, "B. T. Raven" <ni...@nihilo.net> wrote:
>> Lennart Borgman wrote:
>>> On Wed, Oct 14, 2009 at 6:50 AM, B. T. Raven <ni...@nihilo.net> wrote:
>>>> Lennart Borgman wrote:
>>>>> On Wed, Oct 14, 2009 at 2:00 AM, ken <geb...@mousecar.com> wrote:
>>>>>> I carry a USB stick to the job.  It's got emacs installed on it and
>>>>>> there's a link on my desktop that I click (after inserting the stick)
>>>>>> and emacs fires up.  It's nice.  I use it every day.  With the paucity
>>>>>> of decent editors from Windows, I *need* it.
>>>>>> There's a couple minor hassles though that I'd like to dispense with.
>>>>>> One is that I don't know a way to tell emacs what the HOME directory is.
>>>>>>  In the past I've just gone into the registry and change some variable
>>>>>> there.  I don't remember where that is or how to do it though.  Besides,
>>>>>> I prefer to have the variable defined in my .emacs (which is at the
>>>>>> top-level directory on the USB stick).  (After emacs loads, I do "M-x
>>>>>> loadfile RETURN e:/.emacs" and that little task loads up the rest of the
>>>>>> stuff emacs needs to know.  But I don't know how tell emacs to make e:/
>>>>>> the home directory.
>>>>> There is a library usb-setup.el in Emacs+EmacsW32 for this.
>>>> Can this .el file be downloaded separately from EmacsW32 to use with the
>>>> standard Emacs w32 build? Is it somewhere in nXhtml 1.97 or has it been
>>>> removed?
>>> No, at the moment it is only in Emacs+EmacsW32 and I have not had time
>>> to setup a repository for that.
>>> However all that file does is to use the ideas from
>>>  http://at-aka.blogspot.com/2006/06/portable-emacs-22050-on-usb.html
>>> and reorganises them a bit. So just look there instead.
>> Thanks, Lennart. I almost understand the stuff at that link but I can't
>> see how the variable 'data-directory refers to the right drive letter
>> until after Emacs is launched from the flash drive. The drive letter
>> could be G:\ when plugged in today and H:\ tomorrow.
>>
>> With GnuW32 utils I got as far as producing:
>>
>> df -a | tail -1 > usbemacs.bat
>>
>> with the result:
>>
>> STORE N GO             4021232   1850100   2171132  47% G:\
>>
>> I am at a loss as to where I should go from here.
>>
>> Thanks again,
>>
>> Ed
> 
> I've never used emacs, and my Dos batch-writing skills are rusty, so
> all I can offer is a conceptual solution.  Presumably, your emacs
> distribution contains a directory not found on any other drive (e.g.
> <drive_letter>:\MyEmacsDir\).  Any unique path will do.  Simply have
> the desk icon start a batch file that begins as follows:
> 
> dir C:\MyEmacsDir\
> If error: directory not exist, continue : else set variable_1 to 'C'
> and then goto Label_1:
> 
> dir D:\MyEmacsDir\
> If error: directory not exist, continue : else set variable_1 to 'D'
> and then goto Label_1:
> 
> dir E:\MyEmacsDir\
> If error: directory not exist, continue : else set variable_1 to 'E'
> and then goto Label_1:
> 
> ...
> 
> Label_1:
> set <Emacs_Home> to %variable_1%<desired_path>
> execute %variable_1%:\<desired path_name + executable file_name>
> 

Thanks "forced move." ;-) Newer batch commands allow:

If exist e:\emacs set HOME e:\

but I want to set it to the drive letter of the last device plugged into
a usb port.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: emacs-home variable for Windows
  2009-10-15 10:03           ` B. T. Raven
@ 2009-10-19 11:58             ` Henri Fischer
  0 siblings, 0 replies; 11+ messages in thread
From: Henri Fischer @ 2009-10-19 11:58 UTC (permalink / raw)
  To: help-gnu-emacs

On Oct 15, 3:03 am, "B. T. Raven" <ni...@nihilo.net> wrote:
> zugzwang wrote:
> > On Oct 14, 4:49 pm, "B. T. Raven" <ni...@nihilo.net> wrote:
> >> Lennart Borgman wrote:
> >>> On Wed, Oct 14, 2009 at 6:50 AM, B. T. Raven <ni...@nihilo.net> wrote:
> >>>> Lennart Borgman wrote:
> >>>>> On Wed, Oct 14, 2009 at 2:00 AM, ken <geb...@mousecar.com> wrote:
> >>>>>> I carry a USB stick to the job.  It's got emacs installed on it and
> >>>>>> there's a link on my desktop that I click (after inserting the stick)
> >>>>>> and emacs fires up.  It's nice.  I use it every day.  With the paucity
> >>>>>> of decent editors fromWindows, I *need* it.
> >>>>>> There's a couple minor hassles though that I'd like to dispense with.
> >>>>>> One is that I don't know a way to tell emacs what the HOME directory is.
> >>>>>>  In the past I've just gone into the registry and change somevariable
> >>>>>> there.  I don't remember where that is or how to do it though.  Besides,
> >>>>>> I prefer to have thevariabledefined in my .emacs (which is at the
> >>>>>> top-level directory on the USB stick).  (After emacs loads, I do "M-x
> >>>>>> loadfile RETURN e:/.emacs" and that little task loads up the rest of the
> >>>>>> stuff emacs needs to know.  But I don't know how tell emacs to make e:/
> >>>>>> the home directory.
> >>>>> There is a library usb-setup.el in Emacs+EmacsW32 for this.
> >>>> Can this .el file be downloaded separately from EmacsW32 to use with the
> >>>> standard Emacs w32 build? Is it somewhere in nXhtml 1.97 or has it been
> >>>> removed?
> >>> No, at the moment it is only in Emacs+EmacsW32 and I have not had time
> >>> to setup a repository for that.
> >>> However all that file does is to use the ideas from
> >>>  http://at-aka.blogspot.com/2006/06/portable-emacs-22050-on-usb.html
> >>> and reorganises them a bit. So just look there instead.
> >> Thanks, Lennart. I almost understand the stuff at that link but I can't
> >> see how thevariable'data-directory refers to the right drive letter
> >> until after Emacs is launched from the flash drive. The drive letter
> >> could be G:\ when plugged in today and H:\ tomorrow.
>
> >> With GnuW32 utils I got as far as producing:
>
> >> df -a | tail -1 > usbemacs.bat
>
> >> with the result:
>
> >> STORE N GO             4021232   1850100   2171132  47% G:\
>
> >> I am at a loss as to where I should go from here.
>
> >> Thanks again,
>
> >> Ed
>
> > I've never used emacs, and my Dos batch-writing skills are rusty, so
> > all I can offer is a conceptual solution.  Presumably, your emacs
> > distribution contains a directory not found on any other drive (e.g.
> > <drive_letter>:\MyEmacsDir\).  Any unique path will do.  Simply have
> > the desk icon start a batch file that begins as follows:
>
> > dir C:\MyEmacsDir\
> > If error: directory not exist, continue : else set variable_1 to 'C'
> > and then goto Label_1:
>
> > dir D:\MyEmacsDir\
> > If error: directory not exist, continue : else set variable_1 to 'D'
> > and then goto Label_1:
>
> > dir E:\MyEmacsDir\
> > If error: directory not exist, continue : else set variable_1 to 'E'
> > and then goto Label_1:
>
> > ...
>
> > Label_1:
> > set <Emacs_Home> to %variable_1%<desired_path>
> > execute %variable_1%:\<desired path_name + executable file_name>
>
> Thanks "forced move." ;-) Newer batch commands allow:
>
> If exist e:\emacs set HOME e:\
>
> but I want to set it to the drive letter of the last device plugged into
> a usb port.

To make sure home is on my USB I have the following in site-
lisp>subdirs.el:

(if (and invocation-directory
   (eq (string-match "[a-zA-Z]:" invocation-directory) 0))
  (let ((drive (substring invocation-directory 0 1)))
    (setenv "HOME" (concat drive ":/home"))))

Henri


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-10-19 11:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-14  0:00 emacs-home variable for Windows ken
2009-10-14  0:04 ` Lennart Borgman
2009-10-14  0:05 ` Andreas Politz
2009-10-14  7:45   ` ken
     [not found] ` <mailman.8717.1255478707.2239.help-gnu-emacs@gnu.org>
2009-10-14  4:50   ` B. T. Raven
2009-10-14 16:31     ` Lennart Borgman
     [not found]     ` <mailman.8799.1255537948.2239.help-gnu-emacs@gnu.org>
2009-10-14 23:49       ` B. T. Raven
2009-10-15  1:15         ` zugzwang
2009-10-15  9:49           ` Bernardo
2009-10-15 10:03           ` B. T. Raven
2009-10-19 11:58             ` Henri Fischer

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).