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: Mon, 19 Oct 2015 19:06:19 +0200 Message-ID: <87a8ren5ys.fsf@T420.taylan> References: <87si59wj42.fsf@T420.taylan> <878u6znii9.fsf@T420.taylan> <877fmjj9p6.fsf@fencepost.gnu.org> <87zizfm2dq.fsf@T420.taylan> <871tcr7yvq.fsf@fastmail.com> <87mvvfm0bd.fsf@T420.taylan> <56250803.5080601@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 1445274395 4514 80.91.229.3 (19 Oct 2015 17:06:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Oct 2015 17:06:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 19 19:06:34 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 1ZoDtJ-0005wx-IS for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2015 19:06:33 +0200 Original-Received: from localhost ([::1]:41080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoDtJ-0002EF-1R for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2015 13:06:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoDtB-0002Cz-U1 for emacs-devel@gnu.org; Mon, 19 Oct 2015 13:06:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoDt7-00034s-SB for emacs-devel@gnu.org; Mon, 19 Oct 2015 13:06:25 -0400 Original-Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:36401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoDt7-00034U-NB for emacs-devel@gnu.org; Mon, 19 Oct 2015 13:06:21 -0400 Original-Received: by wicfx6 with SMTP id fx6so15487997wic.1 for ; Mon, 19 Oct 2015 10:06:21 -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=3cR9lp4ftbzrLjhWk8or+2R1yJLY1fHlb4kkGxqmqDY=; b=TMBUEIw0y3oLag/Y2ac4qG41K2sOh7wL7Nf+DgroJvn5b/GbHrrURJsAdMCKMkuzEB g19FCfSftU/78HcOaOStj/oHH+J4yDFZ4Jv5obmwplUEiYtu/o+Aqhsxp+pPVBha89oq FN28Yr9Gv1dqcoaI4J2Zfi0xzrciJpgln1RWvyrFYO7z+dyLZxa9WlVq16ZvHigLlvVX AAE5ZryUFKDGzqb8Q0HvStOpSOQrf4YZtgDOq7SghYcz+CbPUSOanMHE+Ymm1j16eAQ8 GOFjymFDEwjSZB2JrL9SvXkk5eUUhJyrJTRwsalIvceWEwrnj5m4HueYYr/8ENryzlMD tgDg== X-Received: by 10.180.208.100 with SMTP id md4mr21519710wic.41.1445274381116; Mon, 19 Oct 2015 10:06:21 -0700 (PDT) Original-Received: from T420.taylan ([2a02:908:c32:4740:221:ccff:fe66:68f0]) by smtp.gmail.com with ESMTPSA id h7sm41288738wjz.7.2015.10.19.10.06.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 10:06:19 -0700 (PDT) In-Reply-To: <56250803.5080601@cs.ucla.edu> (Paul Eggert's message of "Mon, 19 Oct 2015 08:10:59 -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::22c 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:192114 Archived-At: Paul Eggert writes: > On 10/19/2015 06:53 AM, Taylan Ulrich Bay=C4=B1rl=C4=B1/Kammer wrote: >> If there's a /bin/if on the system, (shqq (if blah blah)) will call it. >> Not very useful, but consistent. > > No, it's not consistent. If there's a file named "sh" in the working > directory, shqq will not attempt to call it unless "." precedes "/bin" > and "/usr/bin" in PATH (which is not a good idea for other reasons). > More amusingly, although there is a file named "." in the working > directory, shqq will not attempt to call it, and instead will invoke a > builtin shell command that allows injection of arbitrary shell code. > > To quote a file name that one wants to execute one must also prefix it > with './', unless the unquoted name starts with '/'. That would be > more consistent. Of course, it would also be incorrect for strings > intended to be the command's arguments. This means that neither > shqq--quote-string nor shell-quote-argument should be used blindly to > quote command names. In this sense, shell-quote-argument has a better > name than shqq--quote-string does, since the word "argument" means the > function is intended for command arguments, as opposed to arbitrary > strings. > > All in all there does not seem to be a good reason to have a separate > function shqq--quote-string. Any improvement that it has over > shell-quote-argument should be folded into shell-quote-argument. I have honestly no idea what you're talking about at this point. Who ever talked about running files in the current directory? No, the shell does not try to run the . file as a script, no matter what PATH is. (How is PATH even relevant to the topic?) I'm not motivated to waste any more time on this discussion. People seem to be bringing up even weirder and weirder pseudo-reasons to reject perfectly working code with well-defined semantics. If you don't want it, fine. Taylan