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: Sat, 17 Oct 2015 19:53:49 +0300 Message-ID: <83eggt4esi.fsf@gnu.org> References: <87si59wj42.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 1445100848 29747 80.91.229.3 (17 Oct 2015 16:54:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Oct 2015 16:54:08 +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 Sat Oct 17 18:54: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 1ZnUk3-00022S-LA for ged-emacs-devel@m.gmane.org; Sat, 17 Oct 2015 18:53:59 +0200 Original-Received: from localhost ([::1]:59096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnUjx-0003Bc-On for ged-emacs-devel@m.gmane.org; Sat, 17 Oct 2015 12:53:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnUjv-0003BP-EQ for emacs-devel@gnu.org; Sat, 17 Oct 2015 12:53:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnUjq-00052n-Ep for emacs-devel@gnu.org; Sat, 17 Oct 2015 12:53:51 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:48136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnUjq-00052F-7T for emacs-devel@gnu.org; Sat, 17 Oct 2015 12:53:46 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NWD00N00IRKM500@mtaout28.012.net.il> for emacs-devel@gnu.org; Sat, 17 Oct 2015 19:53:01 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWD00GBDIWDC070@mtaout28.012.net.il>; Sat, 17 Oct 2015 19:53:01 +0300 (IDT) In-reply-to: <87si59wj42.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:191854 Archived-At: > From: taylanbayirli@gmail.com (Taylan Ulrich Bay=C4=B1rl=C4=B1/Kamm= er) > Date: Sat, 17 Oct 2015 18:33:01 +0200 >=20 > >From acd5cfc5fc57a07cccf233021c23db53cfa24ca7 Mon Sep 17 00:00:00 = 2001 > From: =3D?UTF-8?q?Taylan=3D20Ulrich=3D20Bay=3DC4=3DB1rl=3DC4=3DB1/K= ammer?=3D > > Date: Sat, 17 Oct 2015 18:32:22 +0200 > Subject: [PATCH] Add shell-quasiquote. Thanks. > +;;; Like `shell-quote-argument', but much simpler in implementatio= n. > +(defun shqq--quote-string (string) > + (concat "'" (replace-regexp-in-string "'" "'\\\\''" string) "'")= ) It might be simpler, but it's wrong, because the result is only correct for Posix shells. Please do use shell-quote-argument instead.