From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "David Chappaz" Newsgroups: gmane.emacs.help Subject: RE: shell-command causes problems with absolute/relative paths in TAGS Date: Fri, 6 Jan 2012 16:03:47 -0000 Message-ID: <96C2AF32F1EC4A1997BB692A003ED374@EUROPE.ROOT.PRI> References: <20120102223315.3E60F1810C9@neo.msri.org><408087A3D7BE475B884C0F93CE2298C7@us.oracle.com><20120105054142.GA10149@hysteria.proulx.com><9C2570562E2A4B7BBDA61F564FCFC83F@EUROPE.ROOT.PRI><20120105222030.GA22189@hysteria.proulx.com><1CA9A2C2C5544CAAA163A0962C5C95F4@EUROPE.ROOT.PRI><83pqexnjrk.fsf@gnu.org><9287FF55897A4EED8EA883DC00F98BAC@EUROPE.ROOT.PRI> <83ipkoon0g.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1325865866 18288 80.91.229.12 (6 Jan 2012 16:04:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 6 Jan 2012 16:04:26 +0000 (UTC) To: "'Eli Zaretskii'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 06 17:04:22 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RjCHE-00080b-V4 for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Jan 2012 17:04:21 +0100 Original-Received: from localhost ([::1]:33992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjCHE-0001UO-3d for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Jan 2012 11:04:20 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:41967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjCH8-0001UB-Tw for help-gnu-emacs@gnu.org; Fri, 06 Jan 2012 11:04:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjCH3-0000bl-T5 for help-gnu-emacs@gnu.org; Fri, 06 Jan 2012 11:04:14 -0500 Original-Received: from cluster-d.mailcontrol.com ([85.115.60.190]:55665) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjCH3-0000bh-FY for help-gnu-emacs@gnu.org; Fri, 06 Jan 2012 11:04:09 -0500 Original-Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly25d.srv.mailcontrol.com (MailControl) with ESMTP id q06G44T8014974; Fri, 6 Jan 2012 16:04:05 GMT Original-Received: from DC04PC01 ([10.103.11.129]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.4675); Fri, 6 Jan 2012 16:04:04 +0000 X-Mailer: Microsoft Office Outlook 11 In-reply-to: <83ipkoon0g.fsf@gnu.org> Thread-Index: AczMijhb6nDXmoWRTgyS2gn7I8WXGgAALSew X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-OriginalArrivalTime: 06 Jan 2012 16:04:04.0704 (UTC) FILETIME=[D02D9E00:01CCCC8C] X-Scanned-By: MailControl 7.6.5 (www.mailcontrol.com) on 10.68.0.135 X-detected-operating-system: by eggs.gnu.org: Windows 98 (1) X-Received-From: 85.115.60.190 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:83375 Archived-At: > > The variable name depends on which shell you use. By default, only > > explicit-bash-args and explicit-sh-args are defined in emacs. > > On windows, cmdproxy.exe is the default shell, hence the variable name. > > Well, I tried that on Windows with cmdproxy as the shell, and I still > don't see this variable. Ah well I haven't been accurate enough. It's for the user to create this variable if they want to. It will only be used if its name perfectly matches that of the shell. See details in section 7.10 of http://www.gnu.org/software/emacs/windows/Sub_002dprocesses.html > > 2/ Now from e.g. a scratch buffer, I evaluate > > > > (progn > > (cd "C:/test/") > > (call-process-region (point) (point) "C:/Program > > Files/Emacs/emacs-23.3/bin/cmdproxy.exe" nil (current-buffer) nil "-c" > > "ctags -e -L filelist.txt")) > > > > which is more or less what M-x shell-command would do... then the result > is > > incorrect. > > Yes, I see the problem. That's a start, I'm not the only one any more :-) > > 3/ Worse, if you kill the original shell buffer created in 1/, and > repeat > > the same operation as in 1/... then the result is incorrect. > > > > So it really looks like something is happening in call-process-region... > > It must be a bug in ctags, no matter what call-process-region does. I > suspect that it doesn't correctly handle the backslash in file names, > and fails to realize that C:\foo\bar\baz.c and C:/foo/bar share the > same directory. That's because the "absolute" file names it produces > are of the form "C:\foo\bar\./file", note the mixture of forward- and > back-slashes. Yes, what you're saying makes perfect sense. The mixture of slashes is indeed an indication, but what I can't explain, is why ctags would produce a different result before and after call-process-region is called (steps 1/ and 3/ respectively) Surely emacs must be passing slightly different arguments to ctags (perhaps slashes in a different orientation), before and after the first call to call-process-region ?