From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.user Subject: Re: How to pass something on to xargs rm? Date: Mon, 29 May 2017 11:36:24 +0200 Message-ID: <87shjovwbr.fsf@zigzag> References: <87d1gd7gji.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> <20161227120750.GA16030@jocasta.intra> <871swta6hm.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> Reply-To: guile-user@gnu.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1496111457 2704 195.159.176.226 (30 May 2017 02:30:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 May 2017 02:30:57 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon May 29 11:36:24 2017 Return-path: Envelope-to: guile-user@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 1dFH5w-00049e-Qz for guile-user@m.gmane.org; Mon, 29 May 2017 11:36:12 +0200 Original-Received: from localhost ([::1]:47782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFH62-0000Fx-EQ for guile-user@m.gmane.org; Mon, 29 May 2017 05:36:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFH5e-0000DG-06 for guile-user@gnu.org; Mon, 29 May 2017 05:35:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFH5U-00082X-HA for guile-user@gnu.org; Mon, 29 May 2017 05:35:49 -0400 Original-Received: from mail.agora-net.com ([67.59.132.6]:47078) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dFH5U-00081x-DK for guile-user@gnu.org; Mon, 29 May 2017 05:35:44 -0400 Original-Received: from ttn by mail.agora-net.com with local (Exim 4.82) (envelope-from ) id 1dFH5Q-0007oo-IB for guile-user@gnu.org; Mon, 29 May 2017 05:35:40 -0400 Original-Received: from ttn by zigzag.favinet with local (Exim 4.80) (envelope-from ) id 1dFH6H-0007dl-Tb for guile-user@gnu.org; Mon, 29 May 2017 11:36:33 +0200 Mail-Followup-To: guile-user@gnu.org In-Reply-To: <871swta6hm.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> (ng0's message of "Tue, 27 Dec 2016 12:42:13 +0000") X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ttn@gnuvola.org X-SA-Exim-Scanned: No (on mail.agora-net.com); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 67.59.132.6 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13758 --=-=-= Content-Type: text/plain () ng0 () Tue, 27 Dec 2016 12:42:13 +0000 (system* "notmuch" "search" "--output=files" "tag:deleted" "|" "xargs" "-L" "1" "rm") Here's what i would do (untested): (use-modules (ice-9 popen) (ice-9 rdelim)) (let* ((port (open-input-pipe "notmuch ...")) ;; no loop necessary, we only want one (filename (read-line port))) (close-port port) (delete-file filename)) Since this response is very late, i wonder if you have already found a solution. If so, would you mind posting it? -- Thien-Thi Nguyen ----------------------------------------------- (defun responsep (query) (pcase (context query) (`(technical ,ml) (correctp ml)) ...)) 748E A0E8 1CB8 A748 9BFA --------------------------------------- 6CE4 6703 2224 4C80 7502 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlkr65sACgkQZwMiJEyAdQLKNgCgoHbLURZbywZM6S81ZE6+gtoo rNUAnRG3jgf+M5aKM8AXoXPMIYPTUR// =XTQF -----END PGP SIGNATURE----- --=-=-=--