unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* default directory for windows
@ 2008-02-13 14:48 rustom
  2008-02-13 16:05 ` Joost Kremers
  2008-02-13 16:44 ` Drew Adams
  0 siblings, 2 replies; 3+ messages in thread
From: rustom @ 2008-02-13 14:48 UTC (permalink / raw)
  To: help-gnu-emacs

One of the (many) problems I have using emacs under windows is that ti
starts off with the pwd being in the directory where emacs is
installed rather than my home.

So my .emacs has (cd "~") to get around this

But I imagine this is not the proper way to correcting the problem. Is
there not some 'pre-variable' from which default-directory is set?


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

* Re: default directory for windows
  2008-02-13 14:48 default directory for windows rustom
@ 2008-02-13 16:05 ` Joost Kremers
  2008-02-13 16:44 ` Drew Adams
  1 sibling, 0 replies; 3+ messages in thread
From: Joost Kremers @ 2008-02-13 16:05 UTC (permalink / raw)
  To: help-gnu-emacs

rustom wrote:
> One of the (many) problems I have using emacs under windows is that ti
> starts off with the pwd being in the directory where emacs is
> installed rather than my home.
>
> So my .emacs has (cd "~") to get around this
>
> But I imagine this is not the proper way to correcting the problem. Is
> there not some 'pre-variable' from which default-directory is set?

if you right-click on the icon or menu option that starts emacs and select
Properties, you get a window that has an option "Start in directory" or
something similar. you can use it to set the working dir for emacs. you'll
have to do this for every icon/menu option that's used to start emacs,
though, i.e. on the desktop, in the windows menu, and on the task bar, if
you have an emacs icon there.

i don't know if there's a better way to do this, but it works.

-- 
Joost Kremers                                      joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


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

* RE: default directory for windows
  2008-02-13 14:48 default directory for windows rustom
  2008-02-13 16:05 ` Joost Kremers
@ 2008-02-13 16:44 ` Drew Adams
  1 sibling, 0 replies; 3+ messages in thread
From: Drew Adams @ 2008-02-13 16:44 UTC (permalink / raw)
  To: 'rustom', help-gnu-emacs

> One of the (many) problems I have using emacs under windows is that ti
> starts off with the pwd being in the directory where emacs is
> installed rather than my home.
> 
> So my .emacs has (cd "~") to get around this
> 
> But I imagine this is not the proper way to correcting the problem. Is
> there not some 'pre-variable' from which default-directory is set?

Since the subject line mentions Windows... this is what I do:

Create a shortcut to runemacs.exe, and use that to start Emacs. In the
shortcut definition (right-click > Properties), Shortcut tab, field "Start
in:", put the directory where you want Emacs to start. Using the shortcut
then starts Emacs in Dired mode in that directory (which is what I want).

Otherwise, yes, just use `cd' in your init file. Or you can do (setq
default-directory "C:/your/path/to/dir") in your init file. See also
variable `dired-directory-alist', which lets you set the `default-directory'
for different modes.

If you use emacsclient (e.g. if you use EmacsW32), you can also no doubt
specify the startup directory for that. And you can specify a startup
directory on the command line, using option `-f' and a function that cd's to
your directory - see `M-x man RET emacs'.





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

end of thread, other threads:[~2008-02-13 16:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-13 14:48 default directory for windows rustom
2008-02-13 16:05 ` Joost Kremers
2008-02-13 16:44 ` Drew Adams

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