Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 7271440DBE5 for ; Mon, 15 Nov 2010 11:58:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.89 X-Spam-Level: X-Spam-Status: No, score=-2.89 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, T_MIME_NO_TEXT=0.01] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rg6s5jOwWvdT; Mon, 15 Nov 2010 11:58:40 -0800 (PST) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 426D640DBD4; Mon, 15 Nov 2010 11:58:40 -0800 (PST) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id B819725412B; Mon, 15 Nov 2010 11:58:39 -0800 (PST) From: Carl Worth To: Jameson Rollins , Dirk Hohndel , Sebastian Spaeth , Notmuch developer list Subject: Re: notmuchsync: handling of the deleted tag In-Reply-To: <87fwv3e1e2.fsf@servo.finestructure.net> References: <87bp7vewa5.fsf@raven.defaultvalue.org> <87mxrcsb8a.fsf@SSpaeth.de> <87r5gnomt2.fsf@raven.defaultvalue.org> <87hbfnmiux.fsf@yoom.home.cworth.org> <87oc9vf17n.fsf@SSpaeth.de> <87pqua82os.fsf@yoom.home.cworth.org> <87fwv3e1e2.fsf@servo.finestructure.net> User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) Date: Mon, 15 Nov 2010 11:58:33 -0800 Message-ID: <87d3q68il2.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 19:58:52 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Sun, 14 Nov 2010 22:01:09 -0500, Jameson Rollins wrote: > On Fri, 12 Nov 2010 16:52:51 -0800, Carl Worth wrote: > > This one is a simple one-liner as of notmuch 0.4: > >=20 > > notmuch search --output=3Dfiles tag:deleted -print0 | xargs -0 rm >=20 > Is -print0 actually a command that notmuch accepts? It's not documented > as far as I can tell. And it doesn't seem to affect the output of the > command, i.e. whether or not it's used the output is still newline > delimited. I'm not seeing it in the source either. No, it's not something implemented. I'm surprised I spouted such nonsense above. I think what happened is that I first typed a command line which would actually work, (for filenames without embedded newline characters): notmuch search --output=3Dfiles tag:deleted | xargs rm And then a habit kicked in from typing many find/xargs commands and I retrofitted the command with -print0 and -0 as I originally sent it out. Should we perhaps add a -0 option so that one could actually reliably handle filenames with newlines in a case like this? Or can we just assert that such filenames are insane and *should* cause problems? =2DCarl =2D-=20 carl.d.worth@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFM4ZDp6JDdNq8qSWgRAqbaAJ0asFT8MvyjxBysu0Amhup7JNTZQACfQjY0 87agTtdKw6lS4eSqW9wRntE= =H8n9 -----END PGP SIGNATURE----- --=-=-=--