* winows emacs - portable app
@ 2006-04-19 2:21 Ryan Moszynski
0 siblings, 0 replies; 11+ messages in thread
From: Ryan Moszynski @ 2006-04-19 2:21 UTC (permalink / raw)
i've gotten used to running programs from my thumbdrive, and have
found the work being done at
http://portableapps.com
to be immensely useful to me.
so, i decide dot make my own portable app for emacs, for personal use
if nothing else.
so, i tried just copying over my emacs directory and putting the
binary into pstart(the quick and easy portable app launcher)
http://portableapps.com/apps/utilities/application_menus/pstart
, and it seems like the only thing that is keeping me from having a
"real" portable app is that i don't know how to tell emacs to look for
me .emacs config file on my thumbdrive rather than in the emacs
directory that it usually is in on my windows machine.
so, when emacs starts, it just starts to all the defaults, which
doesn't include the options in my .emacs file i've been customizing
over the last year or so, which makes this situation suboptimal.
the problem i see is that the windows drive name will be different
depending on whatever pc/usb slot combination that you happen to be
using. For example, on my laptop, my usb drive is I:, while the lab
pc i am working on right now, the usb drive i am using is named F:
is there an easy solution to this(to make my .emacs load form my
thumbdrive automatically)?
if so, what is it?
if not, is there a command that i can run, after starting emacs, where
i can point it manually to my .emacs on wherever my thumbdrive is, and
it will run that particular .emacs whenever i tell it to?
on a side note, that would seem to me to be a better way to debug
.emacs', better, at least than my usual way of doing it, which is to
save my .emacs and then restart the program . . .
any help is appreciated, thanks
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: winows emacs - portable app
[not found] <mailman.554.1145413305.9609.help-gnu-emacs@gnu.org>
@ 2006-04-19 6:17 ` Jason Rumney
2006-04-19 8:31 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Jason Rumney @ 2006-04-19 6:17 UTC (permalink / raw)
"Ryan Moszynski" <ryan.m.lists@gmail.com> writes:
> , and it seems like the only thing that is keeping me from having a
> "real" portable app is that i don't know how to tell emacs to look for
> me .emacs config file on my thumbdrive rather than in the emacs
> directory that it usually is in on my windows machine.
Emacs will automatically load site-lisp/site-start.el before your
.emacs, so you can change user-init-file there.
> the problem i see is that the windows drive name will be different
> depending on whatever pc/usb slot combination that you happen to be
> using. For example, on my laptop, my usb drive is I:, while the lab
> pc i am working on right now, the usb drive i am using is named F:
You could try leaving the drive letter off, so it defaults to the
current drive. If that doesn't work, then
(substring command-line-default-directory 0 2) or
(substring (car command-line-args) 0 2) should give you the drive
Emacs is running from.
> if not, is there a command that i can run, after starting emacs, where
> i can point it manually to my .emacs on wherever my thumbdrive is, and
> it will run that particular .emacs whenever i tell it to?
M-x load-file
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: winows emacs - portable app
2006-04-19 6:17 ` Jason Rumney
@ 2006-04-19 8:31 ` Eli Zaretskii
2006-04-19 15:08 ` Drew Adams
0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2006-04-19 8:31 UTC (permalink / raw)
> From: jasonr (Jason Rumney) @ f2s.com
> Date: Wed, 19 Apr 2006 07:17:42 +0100
>
> > if not, is there a command that i can run, after starting emacs, where
> > i can point it manually to my .emacs on wherever my thumbdrive is, and
> > it will run that particular .emacs whenever i tell it to?
>
> M-x load-file
But note that this will not always have the same effect as loading
.emacs as an init file, because Emacs loads the init file half way
through its startup procedure, precisely in time to customize certain
aspects of the appearance before they are set to default. For
example, if your .emacs is setting parameters of the initial frame,
those settings will not work if you load .emacs after startup.
So I think Jason's suggestions to find out the drive letter, if you
put the respective code in site-start.el, are the best solution.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: winows emacs - portable app
@ 2006-04-19 12:10 Ryan Moszynski
2006-04-19 16:27 ` Kevin Rodgers
2006-04-19 17:32 ` Eli Zaretskii
0 siblings, 2 replies; 11+ messages in thread
From: Ryan Moszynski @ 2006-04-19 12:10 UTC (permalink / raw)
> Emacs will automatically load site-lisp/site-start.el before your
> .emacs, so you can change user-init-file there.
i dont have a
C:\emacs\emacs-21.3\site-lisp\site-start.el
file. the only file in
C:\emacs\emacs-21.3\site-lisp\
is
subdirs.el
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: winows emacs - portable app
2006-04-19 8:31 ` Eli Zaretskii
@ 2006-04-19 15:08 ` Drew Adams
2006-04-19 17:47 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Drew Adams @ 2006-04-19 15:08 UTC (permalink / raw)
> M-x load-file
But note that this will not always have the same effect as loading
.emacs as an init file, because Emacs loads the init file half way
through its startup procedure, precisely in time to customize certain
aspects of the appearance before they are set to default. For
example, if your .emacs is setting parameters of the initial frame,
those settings will not work if you load .emacs after startup.
I'm not an expert here, and I don't know how you happen to launch Emacs, but
if you do it from (the equivalent of) a command line, and you use the "-l"
option to load a file, then the same processing that Eli described for
.emacs will take place for that file. At least that's what I find wrt the
initial frame, standalone minibuffer frame etc.
That is, it's true that doing some stuff in .emacs is different from doing
it after you're inside Emacs, but you can do stuff in a file (e.g. your
.emacs or foo.el) that you load explicitly via command-line option -l, and I
believe that gives the same behavior as doing that stuff in your .emacs.
This sound confusing as I re-read it. Anyway, I do this sometimes when I
don't want to mess up my .emacs or even rename it temporarily for some
reason. I just do what I want to do in a file foo.el and use emacs -l
"foo.el" to simulate doing it in .emacs.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: winows emacs - portable app
2006-04-19 12:10 Ryan Moszynski
@ 2006-04-19 16:27 ` Kevin Rodgers
2006-04-19 17:32 ` Eli Zaretskii
1 sibling, 0 replies; 11+ messages in thread
From: Kevin Rodgers @ 2006-04-19 16:27 UTC (permalink / raw)
Ryan Moszynski wrote:
>>Emacs will automatically load site-lisp/site-start.el before your
>>.emacs, so you can change user-init-file there.
>
>
> i dont have a
> C:\emacs\emacs-21.3\site-lisp\site-start.el
>
> file. the only file in
> C:\emacs\emacs-21.3\site-lisp\
>
> is
> subdirs.el
If you create the site-start.el file in that directory, it
will be loaded as documented.
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: winows emacs - portable app
2006-04-19 12:10 Ryan Moszynski
2006-04-19 16:27 ` Kevin Rodgers
@ 2006-04-19 17:32 ` Eli Zaretskii
1 sibling, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2006-04-19 17:32 UTC (permalink / raw)
> Date: Wed, 19 Apr 2006 08:10:39 -0400
> From: "Ryan Moszynski" <ryan.m.lists@gmail.com>
>
> > Emacs will automatically load site-lisp/site-start.el before your
> > .emacs, so you can change user-init-file there.
>
> i dont have a
> C:\emacs\emacs-21.3\site-lisp\site-start.el
>
> file.
Sure, and you also didn't have a .emacs before you created it.
Just create site-start.el at that location, and Emacs will use it.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: winows emacs - portable app
@ 2006-04-19 17:47 Ryan Moszynski
2006-04-19 17:58 ` Eli Zaretskii
2006-04-19 20:48 ` Rasmus Pank Roulund
0 siblings, 2 replies; 11+ messages in thread
From: Ryan Moszynski @ 2006-04-19 17:47 UTC (permalink / raw)
darn, ran into a major problem . . .
this is the first time I've actually tried to use this on a lab
computer(where i don't have administrative rights) for an extended
period of time. After a couple of minutes emacs starts throwing this
error
Creating directory: permission denied, c:/.emacs.d
the error of course, is because i don't have permission to create that
file there. It throws this error 20 or so times when i can just get
rid of it with C-g, but then all of a sudden it does it one too many
times and then crashes. Which means, every time I use emacs, after 5
or 6 minutes i'm saving every five seconds, because i know the program
is getting ready to crash . . .
by the way, once i get this worked out and working, i'm going to
present it to the portable app guys, and if they don't want to host
it, I'm at least going to write a tutorial and publish it, somewhere .
. .
It seems surprising to me that no one else has done this yet, or am i
just missing something?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: winows emacs - portable app
2006-04-19 15:08 ` Drew Adams
@ 2006-04-19 17:47 ` Eli Zaretskii
0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2006-04-19 17:47 UTC (permalink / raw)
> From: "Drew Adams" <drew.adams@oracle.com>
> Date: Wed, 19 Apr 2006 08:08:36 -0700
>
> > M-x load-file
>
> But note that this will not always have the same effect as loading
> .emacs as an init file, because Emacs loads the init file half way
> through its startup procedure, precisely in time to customize certain
> aspects of the appearance before they are set to default. For
> example, if your .emacs is setting parameters of the initial frame,
> those settings will not work if you load .emacs after startup.
>
> I'm not an expert here, and I don't know how you happen to launch Emacs, but
> if you do it from (the equivalent of) a command line, and you use the "-l"
> option to load a file, then the same processing that Eli described for
> .emacs will take place for that file. At least that's what I find wrt the
> initial frame, standalone minibuffer frame etc.
Loading .emacs from the command line is similar, but not identical to
loading it automatically from the user's home directory. For example,
the after-init-hook is run _before_ any files mentioned on the command
line are loaded.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: winows emacs - portable app
2006-04-19 17:47 winows emacs - portable app Ryan Moszynski
@ 2006-04-19 17:58 ` Eli Zaretskii
2006-04-19 20:48 ` Rasmus Pank Roulund
1 sibling, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2006-04-19 17:58 UTC (permalink / raw)
> Date: Wed, 19 Apr 2006 13:47:38 -0400
> From: "Ryan Moszynski" <ryan.m.lists@gmail.com>
>
> this is the first time I've actually tried to use this on a lab
> computer(where i don't have administrative rights) for an extended
> period of time. After a couple of minutes emacs starts throwing this
> error
>
> Creating directory: permission denied, c:/.emacs.d
>
>
> the error of course, is because i don't have permission to create that
> file there.
It tries to create the directory in your HOME directory, so if you set
HOME to a writable place, you should be done.
That directory is the place where Emacs writes files that record the
auto-save files open in your session, so that if Emacs crashes, it
will, when restarted, be able to find out which unsaved edits to
suggest you to recover. You can customize the option
auto-save-list-file-prefix to force Emacs to write those files in a
different place. Or set it to nil to disable the feature (I would
recommend this only as the last resort).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: winows emacs - portable app
2006-04-19 17:47 winows emacs - portable app Ryan Moszynski
2006-04-19 17:58 ` Eli Zaretskii
@ 2006-04-19 20:48 ` Rasmus Pank Roulund
1 sibling, 0 replies; 11+ messages in thread
From: Rasmus Pank Roulund @ 2006-04-19 20:48 UTC (permalink / raw)
Ryan Moszynski skrev:
> by the way, once i get this worked out and working, i'm going to
> present it to the portable app guys, and if they don't want to host
> it, I'm at least going to write a tutorial and publish it, somewhere .
>
> It seems surprising to me that no one else has done this yet, or am i
> just missing something?
I have been trying to make a portable Emacs myself, but I ran into some
of the same problems. It certainly would be nice to have easy-to-use,
customized portable Emacs. I certainly can be done; TLC2 (The LaTeX
Companion, 2nd edition) contains a ready-to-run XEmacs with direct LaTeX
support. I would like to have something similar with Emacs, my .emacs,
AUCTeX, and the LaTeX packages I use.
If you get it to work I, at least, would be very interested in either a
tutorial or a ready made portable Emacs.
Cheers,
Rasmus
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-04-19 20:48 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-19 17:47 winows emacs - portable app Ryan Moszynski
2006-04-19 17:58 ` Eli Zaretskii
2006-04-19 20:48 ` Rasmus Pank Roulund
-- strict thread matches above, loose matches on Subject: below --
2006-04-19 12:10 Ryan Moszynski
2006-04-19 16:27 ` Kevin Rodgers
2006-04-19 17:32 ` Eli Zaretskii
[not found] <mailman.554.1145413305.9609.help-gnu-emacs@gnu.org>
2006-04-19 6:17 ` Jason Rumney
2006-04-19 8:31 ` Eli Zaretskii
2006-04-19 15:08 ` Drew Adams
2006-04-19 17:47 ` Eli Zaretskii
2006-04-19 2:21 Ryan Moszynski
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).