From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Random832 Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add shell-quasiquote. Date: Wed, 21 Oct 2015 10:18:49 -0400 Message-ID: <87y4ew8fue.fsf@fastmail.com> References: <87si59wj42.fsf@T420.taylan> <878u6znii9.fsf@T420.taylan> <877fmjj9p6.fsf@fencepost.gnu.org> <87zizfm2dq.fsf@T420.taylan> <871tcr7yvq.fsf@fastmail.com> <87mvvfm0bd.fsf@T420.taylan> <56250803.5080601@cs.ucla.edu> <87a8ren5ys.fsf@T420.taylan> <56259BB1.3070908@cs.ucla.edu> <878u6ykmvt.fsf@T420.taylan> <87h9llvo98.fsf@members.fsf.org> <5626622A.3090707@yandex.ru> <87zizdijbp.fsf@T420.taylan> <56267302.7050606@yandex.ru> <87io61igyu.fsf@T420.taylan> <56267CDF.6010201@yandex.ru> <87wpuhh15s.fsf@T420.taylan> <562683B9.1060305@yandex.ru> <83y4exe71v.fsf@gnu.org> <87y4ewoqbs.fsf@fastmail.com> <83si54e2qx.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445437304 22992 80.91.229.3 (21 Oct 2015 14:21:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Oct 2015 14:21:44 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 21 16:21:35 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZouGX-0000pP-RJ for ged-emacs-devel@m.gmane.org; Wed, 21 Oct 2015 16:21:21 +0200 Original-Received: from localhost ([::1]:51866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZouGX-0007Ed-5n for ged-emacs-devel@m.gmane.org; Wed, 21 Oct 2015 10:21:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZouFR-0005zf-0q for emacs-devel@gnu.org; Wed, 21 Oct 2015 10:20:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZouFN-00026r-Tj for emacs-devel@gnu.org; Wed, 21 Oct 2015 10:20:13 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:38232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZouFN-00025W-Nx for emacs-devel@gnu.org; Wed, 21 Oct 2015 10:20:09 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZouF0-0007mj-I9 for emacs-devel@gnu.org; Wed, 21 Oct 2015 16:19:46 +0200 Original-Received: from c-68-39-146-59.hsd1.in.comcast.net ([68.39.146.59]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Oct 2015 16:19:46 +0200 Original-Received: from random832 by c-68-39-146-59.hsd1.in.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Oct 2015 16:19:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 19 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-68-39-146-59.hsd1.in.comcast.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:ISrGZJrGSrpUIpeb5t5Mt1az7u0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:192281 Archived-At: Eli Zaretskii writes: >> From: Random832 >> Strictly speaking, Emacs doesn't *have* an API for "quote for POSIX >> shells" > > Of course it does: it's called "shell-quote-argument". It does > support Posix shells. It doesn't have a documented way for the caller to insist that the string be quoted for a POSIX shell rather than the user's shell. In particular, the (undocumented) mechanism that Tramp uses to get this behavior will obviously break in the presence of (as recommended by the documentation) an advised or completely overridden version of the function put in place by a user who has an unusual shell. Maybe what needs to be done is to have separate functions shell-quote-argument-msdos, shell-quote-argument-nt, shell-quote-argument-posix, and then have shell-quote-argument call those based on the user's shell.