GNU bug report logs - #767
23.0.60; compilation-start gives bad default-directory

Previous Next

Package: emacs;

Reported by: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>

Date: Sat, 23 Aug 2008 13:15:03 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: Chong Yidong <cyd <at> stupidchicken.com>
Subject: bug#767: marked as done (23.0.60; compilation-start gives bad 
 default-directory)
[Message part 1 (text/plain, inline)]
Your message dated Sun, 07 Sep 2008 15:14:50 -0400
with message-id <87prnfu5sl.fsf <at> cyd.mit.edu>
and subject line Re: 23.0.60; compilation-start gives bad default-directory
has caused the Emacs bug report #767,
regarding 23.0.60; compilation-start gives bad default-directory
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don <at> donarmstrong.com
immediately.)


-- 
767: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=767
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; compilation-start gives bad default-directory
Date: Sat, 23 Aug 2008 15:05:04 +0200
[Message part 3 (text/plain, inline)]
If on w32 default-directory is something like c:\top\sub then the
subprocess started by compilation-start will get pwd=c:\top.

This can be cured by the attached patch for this special case, but it is
only a demonstration of the problem, not the right fix for this problem.

The attached patch only does

  (let ((default-directory (file-name-as-directory default-directory))

just before calling `start-file-process-shell-command'.

A slightly better fix would probably be to add the same thing in
`start-file-process', but it seems to me that this should handled at the
C level to catch all cases. I do not know where to do that but it must
be done somewhere before make_process in start-process.


In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2008-08-10
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/g/include -fno-crossjumping'
[compile-start-default-directory.diff (text/plain, inline)]
? compile-start-default-directory.diff
Index: compile.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/compile.el,v
retrieving revision 1.476
diff -b -u -r1.476 compile.el
--- compile.el	13 Jun 2008 16:22:16 -0000	1.476
+++ compile.el	23 Aug 2008 12:49:59 -0000
@@ -1246,7 +1246,8 @@
 	    (funcall compilation-process-setup-function))
 	(compilation-set-window-height outwin)
 	;; Start the compilation.
-	(let ((proc
+	(let* ((default-directory (file-name-as-directory default-directory))
+               (proc
 	       (if (eq mode t)
 		   ;; comint uses `start-file-process'.
 		   (get-buffer-process
[Message part 5 (message/rfc822, inline)]
From: Chong Yidong <cyd <at> stupidchicken.com>
To: "Lennart Borgman \(gmail\)" <lennart.borgman <at> gmail.com>
Cc: 767-done <at> debbugs.gnu.org
Subject: Re: 23.0.60; compilation-start gives bad default-directory
Date: Sun, 07 Sep 2008 15:14:50 -0400
I've checked in the fix.


This bug report was last modified 16 years and 262 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.