emacs-devel
[Top][All Lists]
Advanced

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

Re: Fixing Windows and DOS command line argument quoting


From: Eli Zaretskii
Subject: Re: Fixing Windows and DOS command line argument quoting
Date: Mon, 25 Apr 2011 12:35:52 +0300

> Date: Mon, 25 Apr 2011 01:49:29 -0700
> From: Daniel Colascione <address@hidden>
> CC: address@hidden
> 
> >  . Please leave the `ms-dos' quoting as it was before.  (Your research
> >    and blog are not valid for the MS-DOS, a.k.a. DJGPP, build of
> >    Emacs, which uses its own private way of passing and decoding
> >    command lines, bypassing MS runtime and OS facilities.  The
> >    problems you mention in your blog do not exist in the MS-DOS
> >    build.)  Please make the new quoting method effective for the
> >    `windows-nt' case alone.
> 
> What happens when MS-DOS Emacs executes a non-DJGPP program?

I'm not interested in what happens in that case.  It is a mess anyway,
because of the vastly different quoting features supported by the
stock DOS/Windows shells.  Your method will work only on Windows NT
family, and only if the DJGPP library succeeds in forcing the OS to
use cmd.exe as the shell.  (AFAIK, normally, Windows still loads
command.com for DOS programs.)

Anyway, DJGPP users know very well that to have a viable and stable
environment, they should use DJGPP programs in preference to the other
kind.  If they don't, all bets are off, and the 126-character limit on
command lines doesn't leave you enough space to safely quote commands
anyway.  The current quoting method worked well for the last 12 years,
so it ought to be good enough for these marginal cases.

> Doesn't it ever pass arguments through the command interpreter?

Only when the command explicitly invokes the shell, or some of its
non-trivial internal commands, or batch files.  Otherwise, everything
is done internally, including pipes and redirections.

> It's been a very
> long time since I've used MS-DOS, and I don't know its command
> interpreter's behavior differs from that of NT's cmd.exe.

It is VERY different, especially where quoting is considered.



reply via email to

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