all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
[parent not found: <mailman.74.1161208352.2130.help-gnu-emacs@gnu.org>]
* Re: current directory
@ 2006-10-19  5:16 help-gnu-emacs
  2006-10-20  5:49 ` Eli Zaretskii
  0 siblings, 1 reply; 28+ messages in thread
From: help-gnu-emacs @ 2006-10-19  5:16 UTC (permalink / raw)



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

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

Well, what makes you think that you can speak for all users? Am I not a user?  I sure don't expect an editor to do it, no other editor I came across in almost 20 years suffers from this malaise. If someone thinks this behavior is a benefit - at the very least leave the backdoor open to those ho doesn't.

cheers,
/vb

> 
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>

^ permalink raw reply	[flat|nested] 28+ messages in thread
* current directory
@ 2006-10-18 21:52 help-gnu-emacs
  2006-10-18 22:32 ` Peter Dyballa
  0 siblings, 1 reply; 28+ messages in thread
From: help-gnu-emacs @ 2006-10-18 21:52 UTC (permalink / raw)



This is about unix-like environment.

Say I start emacs with a file in a certain directory, say /a/b/c:

cd ~
emacs /a/b/c/file

then, while in emacs, I open another file, say /g/d/f/file1.

It looks like after this emacs moves its "current directory" to /g/d/f. Now, if I start a shell script through call-process, the shell script's current directory is also /g/d/f, but it depends on being run somewhere in /a/b/c tree.
In fact, it looks like emacs changes its internal 'current directory' each time I switch to a file in a different directory, even a previously opened file.

Is there a way to prevent emacs from changing its current directory when opening a new file or changing between files being visited?

TIA,
/vb

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

end of thread, other threads:[~2006-10-24  5:24 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.83.1161235004.2130.help-gnu-emacs@gnu.org>
2006-10-19 16:01 ` current directory Fang lun gang
2006-10-19 16:52   ` vb
2006-10-20  6:22     ` Eli Zaretskii
     [not found]   ` <mailman.100.1161276782.2130.help-gnu-emacs@gnu.org>
2006-10-19 19:22     ` rgb
2006-10-19 21:00       ` vb
2006-10-21 18:38     ` don provan
2006-10-23 17:24       ` vb
2006-10-23 19:17         ` John Sullivan
2006-10-23 19:57         ` Eli Zaretskii
2006-10-23 20:36           ` vb
2006-10-23 21:47             ` Dieter Wilhelm
2006-10-24  4:26               ` Eli Zaretskii
2006-10-24  5:24                 ` Dieter Wilhelm
     [not found]           ` <mailman.178.1161635783.27805.help-gnu-emacs@gnu.org>
2006-10-23 21:52             ` Maarten Bergvelt
2006-10-23 20:32         ` Kevin Rodgers
2006-10-23 20:59           ` vb
     [not found]       ` <mailman.166.1161624291.27805.help-gnu-emacs@gnu.org>
2006-10-23 17:48         ` David Kastrup
2006-10-23 20:03           ` Eli Zaretskii
2006-10-23 18:33         ` Colin S. Miller
2006-10-23 18:58           ` vb
     [not found]           ` <mailman.169.1161629903.27805.help-gnu-emacs@gnu.org>
2006-10-23 19:46             ` Peter Boettcher
     [not found] <mailman.74.1161208352.2130.help-gnu-emacs@gnu.org>
2006-10-20 16:46 ` Sam Peterson
2006-10-19  5:16 help-gnu-emacs
2006-10-20  5:49 ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2006-10-18 21:52 help-gnu-emacs
2006-10-18 22:32 ` Peter Dyballa
2006-10-18 23:12   ` vb
2006-10-19  4:25     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.