unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephan Stahl" <stahl@eos.franken.de>
Subject: Should shell-quote-argument really use (eq system-type  'windows-nt)?
Date: Mon, 7 Mar 2005 13:59:28 +0100 (CET)	[thread overview]
Message-ID: <47393.217.194.34.123.1110200368.squirrel@wwws.franken.de> (raw)

Hi.

I think shell-quote-argument should not use
(eq system-type'windows-nt)
instead it should take shell-file-name into account.

It seems very usual for emacs users on w32 to use cygwin or mingw.
Right now shell-quote-argument would return something wrong when bash
or some "intelligent" shell is used on w32 because it assumes a dumb
w32 shell.

What do others think about this (little tested) change?

diff -c "subr.el.~1.433~" "subr.el"
*** subr.el.~1.433~ Mon Mar  7 13:47:21 2005
--- subr.el Mon Mar  7 13:48:36 2005
***************
*** 2274,2280 ****
  				   "\\" (substring argument end (1+ end)))
  		    start (1+ end))))
  	(concat "\"" result (substring argument start) "\""))
!     (if (eq system-type 'windows-nt)
  	(concat "\"" argument "\"")
        (if (equal argument "")
  	  "''"
--- 2274,2280 ----
  				   "\\" (substring argument end (1+ end)))
  		    start (1+ end))))
  	(concat "\"" result (substring argument start) "\""))
!     (if (string-match shell-dumb-shell-regexp shell-file-name)
  	(concat "\"" argument "\"")
        (if (equal argument "")
  	  "''"

Stephan
-- 
Stephan Stahl

             reply	other threads:[~2005-03-07 12:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-07 12:59 Stephan Stahl [this message]
2005-03-07 13:53 ` Should shell-quote-argument really use (eq system-type 'windows-nt)? Lennart Borgman
2005-03-07 14:20   ` David Kastrup
2005-03-12 19:37     ` Should shell-quote-argument really use (eq system-type'windows-nt)? Stephan Stahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47393.217.194.34.123.1110200368.squirrel@wwws.franken.de \
    --to=stahl@eos.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).