emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-bug-tracker] bug#6784: closed (24.0.50; cmdproxy incosistency wit


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#6784: closed (24.0.50; cmdproxy incosistency with command pathnames)
Date: Sun, 09 Jan 2011 17:54:03 +0000

Your message dated Sun, 09 Jan 2011 19:59:56 +0200
with message-id <address@hidden>
and subject line Re: bug#6784: bug#7785: rgrep is broken on woe32
has caused the GNU bug report #6784,
regarding 24.0.50; cmdproxy incosistency with command pathnames
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
6784: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6784
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.0.50; cmdproxy incosistency with command pathnames Date: Tue, 03 Aug 2010 17:56:52 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
A command path name that contains slashes (instead of backslashes) will
work fine with cmdproxy as far as it doesn't require to be executed
through a shell. Otherwise only backslashes work. Example:

cmdproxy.exe -c "c:/foo/bar.exe"

which executes bar.exe through CreateProces, works fine, but

cmdproxy.exe -c "c:/foo/bar.exe | zoo.exe"

which invokes the shell for executing the command, fails with an error
message that comes from cmd.exe and that says "c:" is not recognized as
a command.

OTOH,

cmdproxy.exe -c "c:\foo\bar.exe | zoo.exe"

works fine.

cmd.exe has no problem with commands that uses the slash as directory
separator, as this works OK:

cmd /c c:/foo/bar.exe

so the problem must be in cmdproxy, which probably splits the command as

"c:" "/foo/bar.exe"

and passes it as separate arguments to the shell.

Although this bug possibly is not hard to fix, maybe we should consider
the larger scenario: is it worth the trouble having two separate
execution paths on cmdproxy? Inconsistencies like this among the two
separate ways of executing commands may arise on the future, confusing
the users. Maybe we should remove the CreateProcess method and do
everything through the underlying shell.



--- End Message ---
--- Begin Message --- Subject: Re: bug#6784: bug#7785: rgrep is broken on woe32 Date: Sun, 09 Jan 2011 19:59:56 +0200
> From: Chong Yidong <address@hidden>
> Cc: Sam Steingold <address@hidden>, address@hidden, address@hidden
> Date: Sat, 08 Jan 2011 16:00:43 -0500
> 
> Eli Zaretskii <address@hidden> writes:
> 
> > The discussions in that bug report concluded that the program file
> > name after the pipe needs to be quoted, in order for it to work with
> > file names that use forward- and back-slashes alike.  I can solve that
> > problem for rgrep (and for other similar commands) by tweaking the
> > templates used by grep.el, so as to quote the %s after the pipe
> > character `|'.  Would that be an okay solution?
> 
> I think this is an acceptable solution, and agree that changing cmdproxy
> to handle this intelligently sounds like a nightmare.

Okay, fixed in grep.el (revno 100367 on the emacs-23 branch).

> > The disadvantage is, of course, that similar solutions will have to be
> > implemented for each Emacs command that launches a shell pipeline.
> 
> Let's just fix these individually as the problems are reported.

I found only 2 more instances of this that need to be fixed.  One of
them is in jka-compr.el, where it calls `dd' in a pipe.  I fixed that
one.  The other one is in tramp.el, which uses shell pipelines a lot;
however, the only ones that need to be fixed are those that invoke
_local_ programs, not remote programs, as the latter will not be on a
Windows machine.  Michael, could you please take care of that (on the
emacs-23 branch)?  I gather that you have your master repository, so
doing it from there would be less hassle for you, and you know the
semantics of each pipeline better than I do.  Thanks.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]