From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: shell-unquote-argument: throws error if called outside a shell buffer Date: Sun, 12 Mar 2017 17:17:06 +0200 Message-ID: <83k27ucyod.fsf@gnu.org> References: <22724.26048.710191.633963@gargle.gargle.HOWL> <87tw6zfm0a.fsf@luca> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1489331860 21505 195.159.176.226 (12 Mar 2017 15:17:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 12 Mar 2017 15:17:40 +0000 (UTC) Cc: politza@hochschule-trier.de, emacs-devel@gnu.org To: raman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 12 16:17:33 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cn5FT-0004ei-DD for ged-emacs-devel@m.gmane.org; Sun, 12 Mar 2017 16:17:31 +0100 Original-Received: from localhost ([::1]:47323 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cn5FX-0007El-Nz for ged-emacs-devel@m.gmane.org; Sun, 12 Mar 2017 11:17:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cn5FR-0007Ed-T3 for emacs-devel@gnu.org; Sun, 12 Mar 2017 11:17:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cn5FI-0008Bu-Qk for emacs-devel@gnu.org; Sun, 12 Mar 2017 11:17:25 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cn5FI-0008Bq-NV; Sun, 12 Mar 2017 11:17:20 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2550 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cn5FH-0000YA-Rr; Sun, 12 Mar 2017 11:17:20 -0400 In-reply-to: (message from raman on Sat, 11 Mar 2017 18:48:12 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:212945 Archived-At: > From: raman > Date: Sat, 11 Mar 2017 18:48:12 -0800 > Cc: emacs-devel@gnu.org > > Andreas Politz writes: > Yes, namespacing -- plus incomplete documentation. > shell-unquote-argument is a compiled Lisp function in `shell.el'. > > (shell-unquote-argument STRING) > > Remove all kinds of shell quoting from STRING. I think this is simply a bug: the only reason that function wants a shell buffer is to access the name of the shell process running in it. It could instead fall back on some system-dependent default, and perhaps also provide a way for Lisp callers to specify the shell. Patches to that effect are welcome. (I'm also in favor of moving this function to subr.el, while at that.) TIA