From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add shell-quasiquote. Date: Sun, 18 Oct 2015 00:22:33 +0200 Message-ID: <87lhb1t9sm.fsf@T420.taylan> References: <87si59wj42.fsf@T420.taylan> <83eggt4esi.fsf@gnu.org> <87fv19wh7b.fsf@T420.taylan> <83bnbx4d7e.fsf@gnu.org> <87twppuzfu.fsf@T420.taylan> <83a8rh48if.fsf@gnu.org> <87io65utmt.fsf@T420.taylan> <5622B3C6.4030208@cs.ucla.edu> <871tctuqw5.fsf@T420.taylan> <5622C340.1050001@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1445120563 24670 80.91.229.3 (17 Oct 2015 22:22:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Oct 2015 22:22:43 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 18 00:22:43 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 1ZnZsA-00042k-GJ for ged-emacs-devel@m.gmane.org; Sun, 18 Oct 2015 00:22:42 +0200 Original-Received: from localhost ([::1]:59954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnZs8-0007i2-Rf for ged-emacs-devel@m.gmane.org; Sat, 17 Oct 2015 18:22:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnZs5-0007ht-7F for emacs-devel@gnu.org; Sat, 17 Oct 2015 18:22:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnZs4-00021E-3x for emacs-devel@gnu.org; Sat, 17 Oct 2015 18:22:37 -0400 Original-Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:34130) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnZs3-00021A-Ty for emacs-devel@gnu.org; Sat, 17 Oct 2015 18:22:36 -0400 Original-Received: by wikq8 with SMTP id q8so5170131wik.1 for ; Sat, 17 Oct 2015 15:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=6ezgtg/0DIaI4h2yv7zxY0pfHwI6D5fL19z2oEWtly4=; b=uH+Zbqa8OlKiCVcmmFkuI0Y6j/1jyTzyyWP7cTX0vh3x5F9c3UghmSeSiHuPZVzlIQ lHh4nRGp2KYXftQXjnxwESSKotV+nrk7qbwEIdRULJaqInazRVbk0RXjC2xU3hHVmpX3 c4mVDvfB5yOxdmZGUfEcBv2VgyyavHd/l4YoZ4Sm6/JmErtgXlTCP+JPh31qH6yj/6zW rZfqvtIZb7DtnCD0ddakx54/nnQGC/m2hcKx+eZgxYPMkkmf8aLBk0jv53J4v4XkaVHU ZN3sYS64qka0pvj4NcnjdusJi/p0ERDBFjraxB5K5vqSxYCviUCZQB2YM4FFXnW3MrHY /L3w== X-Received: by 10.180.23.231 with SMTP id p7mr12644991wif.30.1445120555281; Sat, 17 Oct 2015 15:22:35 -0700 (PDT) Original-Received: from T420.taylan ([2a02:908:c32:4740:221:ccff:fe66:68f0]) by smtp.gmail.com with ESMTPSA id r15sm8638048wib.18.2015.10.17.15.22.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Oct 2015 15:22:34 -0700 (PDT) In-Reply-To: <5622C340.1050001@cs.ucla.edu> (Paul Eggert's message of "Sat, 17 Oct 2015 14:53:04 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::233 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:191897 Archived-At: Paul Eggert writes: > Taylan Ulrich Bay=C4=B1rl=C4=B1/Kammer wrote: >> Not mentioning this strongly enough in the documentation is a bug; I'll >> fix it. > > Generally speaking it's better to fix a limitation than to document > it, if fixing it is easy (as is the case here). > > On POSIX shells, shell-quote-argument is just as safe as > shqq--quote-string, and on non-POSIX shells it works better. So it's a > win, in both readability and in portability, to use > shell-quote-argument. Fixing it does not seem easy at all given I can't trust shell-quote-argument. Please tell me which shells shell-quote-argument is guaranteed to work safely on, so I can document it for users of my library. Apparently csh is not one of them for instance, despite the function trying to accommodate for non-POSIX Unix shells. And please be realistic in the amount of trust we can put on the complicated implementations for non-Unix shells. I can't judge them myself since I don't know the syntax of those shells at all. Does anyone here know their syntax comprehensively, or checked the implementation against the documentation of those shells? Alone the documentation on MSDN (linked in the comments of shell-quote-argument) is giving me a headache. (Not that POSIX sh isn't a big headache inducer, but at least I know its single-quote semantics very well, since they're so incredibly simple.) (Actually, those things should be documented for shell-quote-argument, and my documentation would point there.) Taylan