all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to set default directory in .emacs init file?
@ 2006-12-11 17:03 Endless Story
  2006-12-11 17:47 ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Endless Story @ 2006-12-11 17:03 UTC (permalink / raw)


I don't have this problem running emacs on my Linux desktop - I start
out in the scratch buffer and when I use Find File, it starts looking
in my home directory. I'm OK with that.

But I've just installed gnu emacs for Windows on my XP desktop, and
annoyingly, the Find File command starts looking in the install
directory for emacs! I'd like it to start in my data directory, which
is in a totally separate partition.

Supposedly this is controlled by a variable called default-directory.
However I didn't bring my lisp book with me to where I'm staying at
present, and googling has not produced anything helpful. Is there a
simple way to set this in my .emacs file that will actually work?

I've already tried using Windows itself to set a value for HOME in
System > Advanced > Environmental Variables as my data directory. But
this doesn't work - it just tells emacs where to look for the init
file, not the value of the default directory.

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

* RE: How to set default directory in .emacs init file?
  2006-12-11 17:03 How to set default directory in .emacs init file? Endless Story
@ 2006-12-11 17:47 ` Drew Adams
  2006-12-11 18:17   ` Lennart Borgman
       [not found]   ` <mailman.1763.1165861030.2155.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Drew Adams @ 2006-12-11 17:47 UTC (permalink / raw)


> But I've just installed gnu emacs for Windows on my XP desktop, and
> annoyingly, the Find File command starts looking in the install
> directory for emacs! I'd like it to start in my data directory, which
> is in a totally separate partition.

There may be a better way, but I just specify the starting directory in the
Windows shortcut I use to start emacs. Right-click the shortcut that has
this as target: C:\your\path\to\runemacs.exe, and put the folder you want in
the "Start in:" field - e.g. C:\your\directory.

I also provide the same directory to runemacs.exe, so that I start Emacs in
Dired: C:\your\path\to\runemacs.exe "C:\your\directory".  HTH.

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

* Re: How to set default directory in .emacs init file?
  2006-12-11 17:47 ` Drew Adams
@ 2006-12-11 18:17   ` Lennart Borgman
       [not found]   ` <mailman.1763.1165861030.2155.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Lennart Borgman @ 2006-12-11 18:17 UTC (permalink / raw)
  Cc: help-gnu-emacs

Drew Adams wrote:
>> But I've just installed gnu emacs for Windows on my XP desktop, and
>> annoyingly, the Find File command starts looking in the install
>> directory for emacs! I'd like it to start in my data directory, which
>> is in a totally separate partition.
>>     
>
> There may be a better way, but I just specify the starting directory in the
> Windows shortcut I use to start emacs. Right-click the shortcut that has
> this as target: C:\your\path\to\runemacs.exe, and put the folder you want in
> the "Start in:" field - e.g. C:\your\directory.
>
> I also provide the same directory to runemacs.exe, so that I start Emacs in
> Dired: C:\your\path\to\runemacs.exe "C:\your\directory".  HTH.
>   

If you start Emacs in another way (for example through emacsclient) you 
can just add something like

   (setq default-directory "c:/my/data/path/")

to your .emacs

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

* Re: How to set default directory in .emacs init file?
       [not found]   ` <mailman.1763.1165861030.2155.help-gnu-emacs@gnu.org>
@ 2006-12-11 18:26     ` Endless Story
  0 siblings, 0 replies; 4+ messages in thread
From: Endless Story @ 2006-12-11 18:26 UTC (permalink / raw)


> If you start Emacs in another way (for example through emacsclient) you
> can just add something like
>
>    (setq default-directory "c:/my/data/path/")
> 
> to your .emacs

That works exactly the way I want - thanks.

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

end of thread, other threads:[~2006-12-11 18:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-11 17:03 How to set default directory in .emacs init file? Endless Story
2006-12-11 17:47 ` Drew Adams
2006-12-11 18:17   ` Lennart Borgman
     [not found]   ` <mailman.1763.1165861030.2155.help-gnu-emacs@gnu.org>
2006-12-11 18:26     ` Endless Story

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.