help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: current directory


From: Eli Zaretskii
Subject: Re: current directory
Date: Thu, 19 Oct 2006 06:25:28 +0200

> From: vb <address@hidden>
> Date: Wed, 18 Oct 2006 16:12:02 -0700
> 
> On Wednesday 18 October 2006 15:32, you wrote:
> > Am 18.10.2006 um 23:52 schrieb address@hidden:
> > > Is there a way to prevent emacs from changing its current directory
> > > when opening a new file or changing between files being visited?
> >
> > Why? For what?
> >
> as I mentioned in the original email:
> 
> > Now, if I start a shell script through call-process, the shell script's
> > current directory is also /g/d/f
> 
> the script finds the ID database in the current directory tree and then looks 
> up a token in the database. If current directory changed to a different tree, 
> the ID database is not seen by the script.

The current directory is different for each buffer.  If you want the
script to do the right thing for the file /a/b/c/file, start the
script from the buffer which visits that file, not from the buffer
that visits /g/d/f/file1.

> I think this is one of the examples when emacs is overdoing its stuff - it 
> should have no business changing user's current directory or at least allow 
> to configure this behavior.

You are wrong: Emacs does _exactly_ what the user expects: all
operations from a buffer that visits a file assume the default
directory is the directory of that file.  This is not a global value,
each buffer has its own setting of the default directory.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]