From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add shell-quasiquote. Date: Tue, 20 Oct 2015 19:51:23 +0300 Message-ID: <838u6xfppw.fsf@gnu.org> References: <87si59wj42.fsf@T420.taylan> <878u6znii9.fsf@T420.taylan> <836123gfh2.fsf@gnu.org> <87r3krm0t3.fsf@T420.taylan> <5624F66F.1030600@yandex.ru> <87io63lzkg.fsf@T420.taylan> <562508B7.3020202@yandex.ru> <876122n5v3.fsf@T420.taylan> <22053.50324.60123.654292@turnbull.sk.tsukuba.ac.jp> <87d1waknl1.fsf@T420.taylan> <87oafugeia.fsf@fencepost.gnu.org> <87wpuij5vm.fsf@T420.taylan> <87d1w9hql5.fsf@fencepost.gnu.org> <87oaftkjhg.fsf@T420.taylan> <83fv15ft07.fsf@gnu.org> <874mhljyd7.fsf@T420.taylan> Reply-To: Eli Zaretskii 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 1445359920 5954 80.91.229.3 (20 Oct 2015 16:52:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Oct 2015 16:52:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1=2FK?= =?utf-8?Q?ammer?=) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 20 18:51:51 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 1Zoa8W-0006yb-N8 for ged-emacs-devel@m.gmane.org; Tue, 20 Oct 2015 18:51:44 +0200 Original-Received: from localhost ([::1]:47098 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zoa8W-0000QT-Al for ged-emacs-devel@m.gmane.org; Tue, 20 Oct 2015 12:51:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zoa8C-0000Nm-AB for emacs-devel@gnu.org; Tue, 20 Oct 2015 12:51:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zoa87-00026m-PS for emacs-devel@gnu.org; Tue, 20 Oct 2015 12:51:24 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:36813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zoa87-00026d-DG for emacs-devel@gnu.org; Tue, 20 Oct 2015 12:51:19 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NWJ00B002DZO600@mtaout28.012.net.il> for emacs-devel@gnu.org; Tue, 20 Oct 2015 19:50:29 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWJ008Z82S5LW30@mtaout28.012.net.il>; Tue, 20 Oct 2015 19:50:29 +0300 (IDT) In-reply-to: <874mhljyd7.fsf@T420.taylan> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 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:192203 Archived-At: > From: taylanbayirli@gmail.com (Taylan Ulrich Bay=C4=B1rl=C4=B1/Kamm= er) > Cc: emacs-devel@gnu.org > Date: Tue, 20 Oct 2015 18:31:00 +0200 >=20 > > This is not about non-Posix shells (although that aspect did star= t > > this thread). This is about using project-wide APIs for certain > > standard jobs. That should have been a no-brainer, because it ma= kes > > no sense to have several functions doing the same job in subtly > > different ways. > > > > So you were politely requested to call that function for quoting = shell > > arguments in your package. Doing that is the only thing that sta= nds > > in the way of accepting your package on ELPA. AFAIK, there were = no > > other comments. > > > > If you think shell-quote-argument should be changed, feel free to > > submit a patch proposal to that effect, and state there your reas= ons > > for the changes. If they are accepted, all Lisp programs in Emac= s > > that need to quote command arguments will work that way, and ever= ybody > > will win by having a better Emacs. >=20 > I've already provided an extensive explanation of the problem with > shell-quote-argument, what the solution to that problem is, and pro= vided > a patch to apply that solution. >=20 > The patch was turned down. (By you.) That was about the documentation. I understood, perhaps incorrectly, that you also thought the code of the function needed some changes. At least your alternative implementation quotes slightly differently, e.g. it quotes even if the string doesn't need any quoting (because i= t includes only characters from the Posix portable set). It also quote= s 'like this', whereas shell-quote-argument uses backslashes. > > I cannot understand why you insist on tying your contribution wit= h two > > orthogonal issues: what and how should be quoted, and what should= be > > in the doc string. By doing this, you prevent acceptance of your > > package, which IMO is a pity. >=20 > I don't know what you mean with "what and how should be quoted." See above; I hope now what I meant is clear. > The doc string can serve as a clear declaration of strict safety > guarantees that will make the function appropriate for my use case. > Until that's done, the function is not appropriate for my use case > because it does not declare the guarantees necessary for my use cas= e. Documentation cannot change what the code does. If the function will be appropriate after changing its doc string, it is appropriate now. > In practical terms, as explained before, this means that someone ed= iting > the function in the future may insert bugs into it which, from what= I've > gathered from other posts in the thread, it indeed also had in the = past. Documentation cannot prevent such incidents. However, we can make this harder by adding tests for this function. There already are 3 tests that use it, and we can add more if needed. Patches to add suc= h tests are welcome. The upshot is that it's a pity to hold off a package for reasons that can and should be taken care of independently and orthogonally. > It has also not been verified whether it's void of such bugs for sy= stems > other than POSIX, which is why I left declaring that to you; my pat= ches > were only adding the declaration of safety for POSIX, which I've ma= de > very sure of and gladly take responsibility for. The test suite runs on all supported systems, including MS-Windows, and the tests all succeed. This function is quite old, so any problems with it should have been reported long ago. The issue with an embedded newline doesn't exist on MS-Windows at all. > All of these things I've already said before, multiple times, with > different wording, every time as clearly as I could. I'm still hoping you will change your mind.