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: Sun, 18 Oct 2015 20:32:31 +0300 Message-ID: <83oafwhykw.fsf@gnu.org> 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> <5622B337.4050700@yandex.ru> <876125uqzw.fsf@T420.taylan> <5622BE84.8030209@yandex.ru> <87twpptato.fsf@T420.taylan> <87pp0cehly.fsf@gmx.de> <878u70trqz.fsf@T420.taylan> <87si58phte.fsf@gmx.de> <87io648h8r.fsf@fastmail.com> 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 1445189620 1490 80.91.229.3 (18 Oct 2015 17:33:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Oct 2015 17:33:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: Random832 Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 18 19:33:29 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 1Znrpl-0007TE-Hj for ged-emacs-devel@m.gmane.org; Sun, 18 Oct 2015 19:33:25 +0200 Original-Received: from localhost ([::1]:34930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znrpk-0003mV-Uq for ged-emacs-devel@m.gmane.org; Sun, 18 Oct 2015 13:33:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnrpX-0003mI-U3 for emacs-devel@gnu.org; Sun, 18 Oct 2015 13:33:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnrpU-0000tw-Na for emacs-devel@gnu.org; Sun, 18 Oct 2015 13:33:11 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:43219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnrpU-0000tk-Fk for emacs-devel@gnu.org; Sun, 18 Oct 2015 13:33:08 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NWF00100FBV9T00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Sun, 18 Oct 2015 20:32:31 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWF000R7FE6UM80@a-mtaout20.012.net.il>; Sun, 18 Oct 2015 20:32:31 +0300 (IDT) In-reply-to: <87io648h8r.fsf@fastmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 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:191982 Archived-At: > From: Random832 > Date: Sun, 18 Oct 2015 08:59:32 -0400 >=20 > | Precisely what this function does depends on your operating > | system. The function is designed to work with the syntax of your > | system=E2=80=99s standard shell; if you use an unusual shell, you= will > | need to redefine this function. >=20 > But it doesn't bother explaining what operating systems it works on= , If the doc string doesn't say anything about limitations or special considerations for specific OSes, it means the function works on all supported systems. That is the convention in Emacs (and elsewhere, I believe): only state limitations, not the lack thereof. Explicitly mentioning the lack of limitations will unduly bloat the documentation. > what is an unusual shell Any shell that is not the "system's standard shell" is unusual. I thought the text made that clear; if not, please suggest how to clarify it (without having an exhaustive list of shells, which would be a maintenance burden). > or that _not_ having it defined in a way consistent with the shell > has security implications. Any undefined behavior can have security implications. I hope that once the domain of the function is now explained in the doc string, users will be able to realize that for this particular function, if they need to use a non-standard shell. > I think this has contributed to Taylan having a "gut feeling" that > it may not be secure on Windows, because it is difficult to > understand the implementation and is not well-documented and the > attitude is not a good sign. For example, ^-quoting is only applied > if [%!"] are present, but is applied to [%!()"<>&|^]. Why? Who > knows? We do. See the discussion that led to that code; it started here: http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00717.html > Why does ms-dos have separate logic from nt? Because the "standard shell" is different (command.cm instead of cmd.exe), and the way to invoke inferior process via functions like 'system' differs. The details are too many to describe here; if you are interested, please read the sources of the DJGPP libc, available =66rom http://www.delorie.com/djgpp/cvs.html, and the accompanying documentation here: http://www.delorie.com/djgpp/doc/libc-2.02/ > And I know there's nothing to be done for it, but the fact that it > does not have any way to escape wildcards is concerning. Sorry, I don't follow: in what situation do you think the wildcards cannot be escaped? Are you still talking about MS-Windows?