unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* changing directories
@ 2003-03-13 21:07 Michael P. Soulier
  2003-03-13 21:26 ` Christian Odenthal
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Michael P. Soulier @ 2003-03-13 21:07 UTC (permalink / raw)


    Hey people. 

    If I want to change my current directory in emacs so that all future
file-find commands are relative to a new location, how would I do that?

    Thanks,
    Mike

-- 
Michael P. Soulier <msoulier@digitaltorque.ca>, GnuPG pub key: 5BC8BE08
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to Unix
HTML Email Considered Harmful: http://expita.com/nomime.html

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

* Re: changing directories
  2003-03-13 21:07 changing directories Michael P. Soulier
@ 2003-03-13 21:26 ` Christian Odenthal
  2003-03-13 22:26   ` Michael P. Soulier
  2003-03-13 21:35 ` Jesper Harder
  2003-03-13 23:17 ` David Kastrup
  2 siblings, 1 reply; 8+ messages in thread
From: Christian Odenthal @ 2003-03-13 21:26 UTC (permalink / raw)


"Michael P. Soulier" <msoulier@storm.ca._nospam> writes:

> If I want to change my current directory in emacs so that all future
> file-find commands are relative to a new location, how would I do
> that?

(setq default-directory "~/directory") works for me. Nonetheless this
default can an will be changed by some applications. E.g., when trying
to load my .emacs from within gnus the default directory was "~/news".

HTH

Christian

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

* Re: changing directories
  2003-03-13 21:07 changing directories Michael P. Soulier
  2003-03-13 21:26 ` Christian Odenthal
@ 2003-03-13 21:35 ` Jesper Harder
  2003-03-14  8:38   ` Stefan Kamphausen
  2003-03-13 23:17 ` David Kastrup
  2 siblings, 1 reply; 8+ messages in thread
From: Jesper Harder @ 2003-03-13 21:35 UTC (permalink / raw)


"Michael P. Soulier" <msoulier@storm.ca._nospam> writes:

>     If I want to change my current directory in emacs so that all future
> file-find commands are relative to a new location, how would I do that?

`M-x cd RET new/directory/ RET'

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

* Re: changing directories
  2003-03-13 21:26 ` Christian Odenthal
@ 2003-03-13 22:26   ` Michael P. Soulier
  2003-03-13 22:29     ` Michael P. Soulier
  0 siblings, 1 reply; 8+ messages in thread
From: Michael P. Soulier @ 2003-03-13 22:26 UTC (permalink / raw)


On 13 Mar 2003 22:26:17 +0100, Christian Odenthal
<christian.odenthal@ruhr-uni-bochum.de> wrote:
> 
> (setq default-directory "~/directory") works for me. Nonetheless this
> default can an will be changed by some applications. E.g., when trying
> to load my .emacs from within gnus the default directory was "~/news".

    Thanks, I'll try that. Maybe I can code around such apps with a simple
cache of my working directory and a quick restore via a function key or
something. 

    Mike

-- 
Michael P. Soulier <msoulier@digitaltorque.ca>, GnuPG pub key: 5BC8BE08
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to Unix
HTML Email Considered Harmful: http://expita.com/nomime.html

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

* Re: changing directories
  2003-03-13 22:26   ` Michael P. Soulier
@ 2003-03-13 22:29     ` Michael P. Soulier
  2003-03-13 22:32       ` Michael P. Soulier
  0 siblings, 1 reply; 8+ messages in thread
From: Michael P. Soulier @ 2003-03-13 22:29 UTC (permalink / raw)


On 13 Mar 2003 22:26:13 GMT, Michael P. Soulier <msoulier@storm.ca._nospam>
wrote:
> 
>     Thanks, I'll try that. Maybe I can code around such apps with a simple
> cache of my working directory and a quick restore via a function key or
> something. 

    Actually, if I set default-directory to the working directory that I want,
and then try file-find, and use the spacebar for autocompletion, it keeps
complaining that the directory I specified doesn't exist. Something's wrong
there. 

    Mike

-- 
Michael P. Soulier <msoulier@digitaltorque.ca>, GnuPG pub key: 5BC8BE08
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to Unix
HTML Email Considered Harmful: http://expita.com/nomime.html

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

* Re: changing directories
  2003-03-13 22:29     ` Michael P. Soulier
@ 2003-03-13 22:32       ` Michael P. Soulier
  0 siblings, 0 replies; 8+ messages in thread
From: Michael P. Soulier @ 2003-03-13 22:32 UTC (permalink / raw)


On 13 Mar 2003 22:29:59 GMT, Michael P. Soulier <msoulier@storm.ca._nospam>
wrote:
> 
>     Actually, if I set default-directory to the working directory that I want,
> and then try file-find, and use the spacebar for autocompletion, it keeps
> complaining that the directory I specified doesn't exist. Something's wrong
> there. 

    Ah. Amazing things happen when you RTFM, 

default-directory's value is "~/"
Local in buffer *Apropos*; global value is nil

Documentation:
Name of default directory of current buffer.  Should end with slash.
Each buffer has its own value of this variable.  To change the
default directory, use function `cd'.

    Yup. The cd function works fine. 

    Mike

-- 
Michael P. Soulier <msoulier@digitaltorque.ca>, GnuPG pub key: 5BC8BE08
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to Unix
HTML Email Considered Harmful: http://expita.com/nomime.html

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

* Re: changing directories
  2003-03-13 21:07 changing directories Michael P. Soulier
  2003-03-13 21:26 ` Christian Odenthal
  2003-03-13 21:35 ` Jesper Harder
@ 2003-03-13 23:17 ` David Kastrup
  2 siblings, 0 replies; 8+ messages in thread
From: David Kastrup @ 2003-03-13 23:17 UTC (permalink / raw)


"Michael P. Soulier" <msoulier@storm.ca._nospam> writes:

>     Hey people. 
> 
>     If I want to change my current directory in emacs so that all future
> file-find commands are relative to a new location, how would I do that?

M-x cd RET
does not do what you want?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: changing directories
  2003-03-13 21:35 ` Jesper Harder
@ 2003-03-14  8:38   ` Stefan Kamphausen
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Kamphausen @ 2003-03-14  8:38 UTC (permalink / raw)


Jesper Harder <harder@myrealbox.com> wrote in message news:<m365qneyqv.fsf@defun.localdomain>...
> "Michael P. Soulier" <msoulier@storm.ca._nospam> writes:
> 
> >     If I want to change my current directory in emacs so that all future
> > file-find commands are relative to a new location, how would I do that?
> 
> `M-x cd RET new/directory/ RET'

If I may add a shameless self-ad:
you can keep a list of often used directories and access them via M-x
cdargs (aliased to M-x cv, too) when you use my cdargs program which
is located at
http://www.skamphausen.de/software/cdargs
and ships with a file cdargs.el. I'd be happy to receive some feedback
of GNU Emacs users on this.

Thanks for listening ;-)
Stefan Kamphausen

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

end of thread, other threads:[~2003-03-14  8:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-13 21:07 changing directories Michael P. Soulier
2003-03-13 21:26 ` Christian Odenthal
2003-03-13 22:26   ` Michael P. Soulier
2003-03-13 22:29     ` Michael P. Soulier
2003-03-13 22:32       ` Michael P. Soulier
2003-03-13 21:35 ` Jesper Harder
2003-03-14  8:38   ` Stefan Kamphausen
2003-03-13 23:17 ` David Kastrup

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