From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#767: 23.0.60; compilation-start gives bad default-directory Date: Sat, 23 Aug 2008 15:05:04 +0200 Message-ID: <48B00B00.1050305@gmail.com> Reply-To: "Lennart Borgman \(gmail\)" , 767@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090807080508020201020009" X-Trace: ger.gmane.org 1219498068 23514 80.91.229.12 (23 Aug 2008 13:27:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Aug 2008 13:27:48 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 23 15:28:41 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KWtAT-0007sO-3i for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Aug 2008 15:28:37 +0200 Original-Received: from localhost ([127.0.0.1]:33394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWt9V-00009k-CS for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Aug 2008 09:27:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KWt9Q-00008D-Kk for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 09:27:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KWt9O-00005J-FG for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 09:27:31 -0400 Original-Received: from [199.232.76.173] (port=60274 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWt9O-000059-Aj for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 09:27:30 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:40186) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KWt9O-0002ys-7r for bug-gnu-emacs@gnu.org; Sat, 23 Aug 2008 09:27:30 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7NDRRUS016606; Sat, 23 Aug 2008 06:27:28 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m7NDF3nj012212; Sat, 23 Aug 2008 06:15:03 -0700 X-Loop: don@donarmstrong.com Resent-From: "Lennart Borgman (gmail)" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 23 Aug 2008 13:15:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 767 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.121949672410208 (code B ref -1); Sat, 23 Aug 2008 13:15:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 23 Aug 2008 13:05:24 +0000 Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7ND5K6u010125 for ; Sat, 23 Aug 2008 06:05:21 -0700 Original-Received: from mail.gnu.org ([199.232.76.166]:50273 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KWsmZ-0002cQ-Tq for emacs-pretest-bug@gnu.org; Sat, 23 Aug 2008 09:03:56 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KWsns-0007q5-FA for emacs-pretest-bug@gnu.org; Sat, 23 Aug 2008 09:05:19 -0400 Original-Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:37959) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KWsnr-0007ph-R1 for emacs-pretest-bug@gnu.org; Sat, 23 Aug 2008 09:05:16 -0400 Original-Received: from c83-254-151-176.bredband.comhem.se ([83.254.151.176]:64313 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KWsnp-0002B3-8K for emacs-pretest-bug@gnu.org; Sat, 23 Aug 2008 15:05:14 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 X-Enigmail-Version: 0.95.7 X-Antivirus: avast! (VPS 080822-0, 2008-08-22), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.176 X-Scan-Result: No virus found in message 1KWsnp-0002B3-8K. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KWsnp-0002B3-8K c4a2a738de338ade0c6f654a20dd1712 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Sat, 23 Aug 2008 09:27:31 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:19662 gmane.emacs.pretest.bugs:22859 Archived-At: This is a multi-part message in MIME format. --------------090807080508020201020009 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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' --------------090807080508020201020009 Content-Type: text/plain; name="compile-start-default-directory.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="compile-start-default-directory.diff" ? 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 --------------090807080508020201020009--