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: Sat, 17 Oct 2015 17:01:24 -0400 Message-ID: <87zizh1a6z.fsf@fastmail.com> References: <87si59wj42.fsf@T420.taylan> <83eggt4esi.fsf@gnu.org> <87a8rh2tpp.fsf@fastmail.com> <837fml46w6.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445115744 15280 80.91.229.3 (17 Oct 2015 21:02:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Oct 2015 21:02:24 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 17 23:02:17 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 1ZnYcJ-0003Ng-W3 for ged-emacs-devel@m.gmane.org; Sat, 17 Oct 2015 23:02:16 +0200 Original-Received: from localhost ([::1]:59741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnYcJ-0001GL-Cr for ged-emacs-devel@m.gmane.org; Sat, 17 Oct 2015 17:02:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnYbz-0001GG-1B for emacs-devel@gnu.org; Sat, 17 Oct 2015 17:01:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnYbv-0003gQ-0C for emacs-devel@gnu.org; Sat, 17 Oct 2015 17:01:54 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:44187) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnYbu-0003fp-3K for emacs-devel@gnu.org; Sat, 17 Oct 2015 17:01:50 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZnYbs-0002z0-M4 for emacs-devel@gnu.org; Sat, 17 Oct 2015 23:01:48 +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 ; Sat, 17 Oct 2015 23:01:48 +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 ; Sat, 17 Oct 2015 23:01:48 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 37 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:K1oLa/KMlKMjROHO8qdpF5uH5tQ= 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:191882 Archived-At: Eli Zaretskii writes: >> From: Random832 >> It's also simpler than the POSIX section of shell-quote-argument. > > Simpler doesn't mean correct. But it is correct. >> I wonder what "really weird shells" this refers to? > > The set of characters special to an arbitrary shell is not known in > advance. And neither is its quoting mechanism. That tells me that this section of the function is not, cannot be, and should not be in the business of supporting "arbitrary shells". I was simply wondering what shells of the set that it can reasonably support (e.g. POSIX shells, or at the outside, shells that are likely to be used as "sh" on a unix-like system) it is referring to as "really weird". >> Certainly not csh, the mechanism it uses for newlines doesn't work >> there. > > What did you try that didn't work with csh? It's not a matter of trying anything. For all I know, maybe Emacs will never try to execute a command with csh even if it is your SHELL... that's certainly what I'd do. The point is I know that csh doesn't accept this syntax, and will result in an error of "Unmatched '." But, fine, if you want a test case: (call-process "csh" nil t "csh" "-c" (concat "echo " (shell-quote-argument "hello\nworld"))) Unmatched '. Unmatched '. 1