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: Redirecting standard output Date: Thu, 21 Apr 2011 14:58:48 +0300 Message-ID: <83bozz3jev.fsf@gnu.org> References: <83pqog2lko.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1303387142 20602 80.91.229.12 (21 Apr 2011 11:59:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 21 Apr 2011 11:59:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 21 13:58:59 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QCsXC-0006Od-La for ged-emacs-devel@m.gmane.org; Thu, 21 Apr 2011 13:58:58 +0200 Original-Received: from localhost ([::1]:48058 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCsXC-0006os-AV for ged-emacs-devel@m.gmane.org; Thu, 21 Apr 2011 07:58:58 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:49784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCsX8-0006ok-1u for emacs-devel@gnu.org; Thu, 21 Apr 2011 07:58:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCsX3-00053L-J7 for emacs-devel@gnu.org; Thu, 21 Apr 2011 07:58:54 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:49122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCsX3-00053F-D2 for emacs-devel@gnu.org; Thu, 21 Apr 2011 07:58:49 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LK0002002XHTW00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Thu, 21 Apr 2011 14:57:55 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.124.129.240]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LK0001KR3WHK9B0@a-mtaout20.012.net.il>; Thu, 21 Apr 2011 14:57:55 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) 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:138607 Archived-At: > From: Lars Magne Ingebrigtsen > Date: Thu, 21 Apr 2011 13:40:45 +0200 > > The pbmplus commands read from stdin and write to stdout, mostly. So if > you want to rescale a picture, you have to say "pnmscale < foo > bar". > [...] > > So, if you use shell-quote-argument, is there still a problem? > > I think putting stuff into a string and then reparsing the string is bad > programming practise. If it can be (easily) avoided, it should be. Sorry, I don't follow: what string? what reparsing? I meant to use something like this: (call-process shell-file-name nil nil nil shell-command-switch (concat "pnmscale < " (shell-quote-argument "foo") " > " (shell-quote-argument "bar"))) Does this do what you want?