From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: emacsclient: support `/' directory separator on w32 Date: Wed, 29 Nov 2006 20:29:25 +0100 Message-ID: <85r6vmcaqy.fsf@lola.goethe.zz> References: <20061124054526.72239.qmail@web62511.mail.re1.yahoo.com> <85fyc3oiio.fsf@lola.goethe.zz> <854psjoh67.fsf@lola.goethe.zz> <85r6vnmz3s.fsf@lola.goethe.zz> <857ixfkyqu.fsf@lola.goethe.zz> <456CC2B4.3000003@student.lu.se> <456CD9A7.5010006@student.lu.se> <456D44EE.2080906@student.lu.se> <85mz6ah8y6.fsf@lola.goethe.zz> <854psidqll.fsf@lola.goethe.zz> <456DDC1D.2030407@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1164828610 23785 80.91.229.2 (29 Nov 2006 19:30:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Nov 2006 19:30:10 +0000 (UTC) Cc: lekktu@gmail.com, Eli Zaretskii , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 29 20:30:06 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GpV7y-0002Rv-Gz for ged-emacs-devel@m.gmane.org; Wed, 29 Nov 2006 20:29:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GpV7x-0002zE-Qu for ged-emacs-devel@m.gmane.org; Wed, 29 Nov 2006 14:29:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GpV7f-0002vk-I4 for emacs-devel@gnu.org; Wed, 29 Nov 2006 14:29:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GpV7e-0002u4-6D for emacs-devel@gnu.org; Wed, 29 Nov 2006 14:29:34 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GpV7e-0002tt-1H for emacs-devel@gnu.org; Wed, 29 Nov 2006 14:29:34 -0500 Original-Received: from [212.7.152.120] (helo=mxout03.versatel.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GpV7Z-00027Y-T9; Wed, 29 Nov 2006 14:29:30 -0500 Original-Received: from mx03.versatel.de (mx01.versatel.de [212.7.146.1]) by mxout03.versatel.de (8.12.11/8.12.11) with ESMTP id kATJTSt3002288; Wed, 29 Nov 2006 20:29:28 +0100 Original-Received: from lola.goethe.zz (i5387BDBE.versanet.de [83.135.189.190]) by mx03.versatel.de (8.12.11.20060614/8.12.11) with ESMTP id kATJTSUp021211; Wed, 29 Nov 2006 20:29:28 +0100 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 4ECD41C29846; Wed, 29 Nov 2006 20:29:25 +0100 (CET) Original-To: Lennart Borgman In-Reply-To: <456DDC1D.2030407@student.lu.se> (Lennart Borgman's message of "Wed\, 29 Nov 2006 20\:14\:37 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:63065 Archived-At: Lennart Borgman writes: > David Kastrup wrote: > >> C-x C-f C:/dir/xxx.txt RET >> M-x cd RET D:/woozle RET >> C-x C-f D:/junk/ddd.txt RET >> M-x cd RET D:poz RET [ D:/poz or D:/woozle/poz? ] >> C-x C-b xxx.txt RET >> C-x C-f D:pizza RET [ D:/woozle/pizza, D:/poz/pizza, >> D:/woozle/poz/pizza or D:/pizza? ] > > Did not my message get through? My suggestion was when setting > default-directory also set the working directory for the OS. default-directory is a buffer-local variable. I might be repeating myself. Changing it in one buffer does not affect other buffers. I have seen no argument that it would be a good idea to change this. You are basically proposing that a (setq default-directory ... in one buffer can affect the operation of stuff in other buffers. If you take a look at the code for `cd', you'll see that its only side-effect is setting the buffer-local `default-directory'. There are no system calls involved. > Then GetFullPathName will do the name resolving without any problem > using the last value for the working directory on the drive > specified to GetFullPathName. > > In this case > > C-x C-f C:/dir/xxx.txt RET > M-x cd RET D:/woozle RET (Sets default-directory to D:/woozle/) > C-x C-f D:/junk/ddd.txt RET (Sets default-directory to D:/junk/) > M-x cd RET D:poz RET => D:/junk/poz > C-x C-b xxx.txt RET (Sets default-directory to C:/dir/) > C-x C-f D:pizza RET => D:/junk/pizza I don't see how and when you are planning to call the operating system. `default-directory' changes in every visited buffer. That means that a (with-current-buffer "ddd.txt" nil) can change the meaning of "D:xxx" in the current buffer when `default-directory' in "ddd.txt" is "D:/plopp", and `default-directory' in the current buffer is "C:/blubb". The mere act of switching to a different buffer is supposed to have such effects? This is not sane. We should certainly not do anything like that now, and I severely doubt we should ever do that. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum