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: Fri, 20 Oct 2006 07:49:33 +0200 Message-ID: References: <0MKp2t-1GaQGe0uDw-0000mm@mrelay.perfora.net> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1161366882 16087 80.91.229.2 (20 Oct 2006 17:54:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Oct 2006 17:54:42 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 20 19:54:41 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 1GayZn-0007CD-7i for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Oct 2006 19:54:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GayZm-0000K0-So for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Oct 2006 13:54:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GanG9-0006aT-F7 for help-gnu-emacs@gnu.org; Fri, 20 Oct 2006 01:49:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GanG7-0006X0-L0 for help-gnu-emacs@gnu.org; Fri, 20 Oct 2006 01:49:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GanG7-0006Wl-Ic for help-gnu-emacs@gnu.org; Fri, 20 Oct 2006 01:49:31 -0400 Original-Received: from [192.114.186.73] (helo=heller.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GanG7-0004xV-HO for help-gnu-emacs@gnu.org; Fri, 20 Oct 2006 01:49:31 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-84-229-234-60.inter.net.il [84.229.234.60]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id ATO47468 (AUTH halo1); Fri, 20 Oct 2006 06:49:15 +0200 (IST) Original-To: help-gnu-emacs@gnu.org In-reply-to: <0MKp2t-1GaQGe0uDw-0000mm@mrelay.perfora.net> (help-gnu-emacs@vsbe.com) 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:38143 Archived-At: > From: help-gnu-emacs@vsbe.com > Cc: eliz@gnu.org > Date: Thu, 19 Oct 2006 01:16:32 -0400 > > > 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. > > Eli, thank you, I figured this much. So, if I want to look up a variable which is in /a/b/c/file, but the ID file is in the /g/d/f tree - I am screwed. That is a different situation than the one you described in your original message. The original message said the problem was that Emacs would behave as if the current directory were /g/d/f, which was on another filesystem from /a/b/c, and that the script needed to be run in the /a/b/c tree. Now you are saying something different. Could you please describe the situation more completely? Specifically, how do you invoke the script from the shell's prompt, and from which directory; and how doing that from Emacs screws what you are used to doing outside Emacs? I'm sure there's a simple solution to your problems, but I cannot suggest a solution if the problem keeps changing under my feet. > > 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. > > > > Well, what makes you think that you can speak for all users? Because complaints about the current behavior are extremely rare, if not absent. > I sure don't expect an editor to do it, no other editor I came across in almost 20 years suffers from this malaise. Emacs does many things other editors don't -- this is what makes it so outstandingly good.