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: Thu, 22 Oct 2015 09:41:20 -0400 Message-ID: <87611zuikf.fsf@fastmail.com> References: <87si59wj42.fsf@T420.taylan> <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> <87y4ew8fue.fsf@fastmail.com> <83zizcurco.fsf@gnu.org> <87k2qgw3q1.fsf@fastmail.com> <83lhawuny4.fsf@gnu.org> <8737x4vyyg.fsf@fastmail.com> <83bnbsujqd.fsf@gnu.org> <87y4ewujf8.fsf@fastmail.com> <837fmguixu.fsf@gnu.org> <87twpkhugn.fsf@fastmail.com> <8337x3vd8d.fsf@gnu.org> <871tcnz8or.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445521385 13218 80.91.229.3 (22 Oct 2015 13:43:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Oct 2015 13:43:05 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 22 15:43:00 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 1ZpG8c-0005kQ-Af for ged-emacs-devel@m.gmane.org; Thu, 22 Oct 2015 15:42:38 +0200 Original-Received: from localhost ([::1]:59889 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpG8b-0004nv-QK for ged-emacs-devel@m.gmane.org; Thu, 22 Oct 2015 09:42:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpG88-00040J-Ju for emacs-devel@gnu.org; Thu, 22 Oct 2015 09:42:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpG82-00081U-MV for emacs-devel@gnu.org; Thu, 22 Oct 2015 09:42:08 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:35648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpG82-0007zX-Gz for emacs-devel@gnu.org; Thu, 22 Oct 2015 09:42:02 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZpG7v-00054x-Lb for emacs-devel@gnu.org; Thu, 22 Oct 2015 15:41:55 +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 ; Thu, 22 Oct 2015 15:41:55 +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 ; Thu, 22 Oct 2015 15:41:55 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 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:XcKt+yqQuBFoPaw50l/08/fJb+I= 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:192385 Archived-At: David Kastrup writes: > Eli Zaretskii writes: >> OK, but that still boils down to binding some more variables. If we >> want to help users with these factoids, we could have a small database >> of the known Posix shells and their requirements. I couldn't find an easy way to do let-style binding of environment variables, though I didn't look very hard. And the point of what I was suggesting is to let *packages* do this, not *users*, so the "database" would have to be part of code that decides what to actually do. > I think that's overdoing it with regard to shell-quote-argument and > friends. We don't need a full POSIX shell, just something with the most > basic quoting conventions of it. /bin/sh should be fine here. I think there might be a basic miscommunication here. If you don't care about being able to execute arbitrary POSIX shell commands as well as is possible on a given system, what's even the point of *having* functions like shell-quote-argument, shell-command, etc, instead of call-process? In these discussions I've been starting from the assumption that these functions actually have a point and that being able to execute complex shell commands (which may use advanced redirection, if/case/for/etc, parameter expansion, and so forth) from within elisp scripts is a desirable feature. > That's all the guarantee you get for calling commands/scripts with > `system'. I don't think we should require more than that or try > providing some guarantees in that regard. On an actual POSIX system, it's guaranteed that "sh" from PATH (not necessarily /bin/sh) will be a POSIX shell, and that 'system' will execute it and not some other shell. (AIUI this is generally still implemented by a hardcoded path, just one which is not necessarily /bin/sh)