From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: current directory Date: Thu, 19 Oct 2006 06:25:28 +0200 Message-ID: References: <0MKoyl-1GaJKr1BDE-0000ux@mrelay.perfora.net> <200610181612.02924.help-gnu-emacs@vsbe.com> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1161231955 10906 80.91.229.2 (19 Oct 2006 04:25:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Oct 2006 04:25:55 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 19 06:25:53 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GaPTW-0006Zh-Qo for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Oct 2006 06:25:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GaPTV-0000Q0-38 for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Oct 2006 00:25:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GaPTH-0000PQ-Q7 for help-gnu-emacs@gnu.org; Thu, 19 Oct 2006 00:25:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GaPTG-0000OU-BC for help-gnu-emacs@gnu.org; Thu, 19 Oct 2006 00:25:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GaPTG-0000ON-2T for help-gnu-emacs@gnu.org; Thu, 19 Oct 2006 00:25:30 -0400 Original-Received: from [192.114.186.73] (helo=heller.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GaPTF-0003me-TJ for help-gnu-emacs@gnu.org; Thu, 19 Oct 2006 00:25:30 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-84-229-204-114.inter.net.il [84.229.204.114]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id ATI75202 (AUTH halo1); Thu, 19 Oct 2006 05:25:15 +0200 (IST) Original-To: help-gnu-emacs@gnu.org In-reply-to: <200610181612.02924.help-gnu-emacs@vsbe.com> (message from vb on Wed, 18 Oct 2006 16:12:02 -0700) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:38121 Archived-At: > From: vb > 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 help-gnu-emacs@vsbe.com: > > > 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.