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 B10244196F2 for ; Wed, 21 Apr 2010 23:58:02 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=unavailable 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 lXg9spv49OEC for ; Wed, 21 Apr 2010 23:57:59 -0700 (PDT) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id 443DD431FC1 for ; Wed, 21 Apr 2010 23:57:59 -0700 (PDT) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id 72DDD19F33AF; Thu, 22 Apr 2010 08:57:58 +0200 (CEST) X-Virus-Scanned: IMAP AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, port 10044) with ESMTP id j1kvsluat0gA; Thu, 22 Apr 2010 08:57:56 +0200 (CEST) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 6505019F33B9; Thu, 22 Apr 2010 08:57:56 +0200 (CEST) Received: from steelpick.2x.cz (k335-30.felk.cvut.cz [147.32.86.30]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id 4EA6915C062; Thu, 22 Apr 2010 08:57:55 +0200 (CEST) Received: from wsh by steelpick.2x.cz with local (Exim 4.71) (envelope-from ) id 1O4qMF-00022o-NS; Thu, 22 Apr 2010 08:57:55 +0200 From: Michal Sojka To: Anthony Towns , Dirk Hohndel Subject: Re: [PATCH 1/2] Add 'cat' subcommand In-Reply-To: References: <1271747793-17507-1-git-send-email-sojkam1@fel.cvut.cz> <87pr1u7fnu.fsf@ut.hh.sledj.net> <87fx2qmtok.fsf@SSpaeth.de> <4BCD7EA0.3080505@fel.cvut.cz> <871ve8wc30.fsf@yoom.home.cworth.org> Date: Thu, 22 Apr 2010 08:57:55 +0200 Message-ID: <87zl0wm0ss.fsf@steelpick.2x.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: notmuch@notmuchmail.org 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: Thu, 22 Apr 2010 06:58:02 -0000 On Thu, 22 Apr 2010, Anthony Towns wrote: > On Thu, Apr 22, 2010 at 12:37, Dirk Hohndel wrote: > > On Wed, 21 Apr 2010 17:44:03 -0700, Carl Worth wrot= e: > >> So I'd prefer to have this command behave just like all others and use > >> the same naming. > >> =C2=A0 =C2=A0 =C2=A0 filename:/complete/path/to/file >=20 > Would "notmuch cat" be any different to "notmuch show" in this case? > What happens if you say "notmuch cat something" and multiple messages > match (eg, an id: for a mail that you both sent (Mail/.sent/cur/12345) > and received (Mail/.Lists.notmuch/cur/12346))? >=20 > Maybe notmuch show should be able to deal with all these things, and > notmuch cat could be an alias for something like: >=20 > notmuch show --format=3Dmbox --show-duplicate-files $SPEC I think this was discussed earlier with part subcommand and the result was that "part" should become a part of show. The same probably applies to the cat subcommand. I don't think that --format=3Dmbox is the right thing to do. A simple grep -R '^From[^:]' ~/mail shows that I have many messages where "From" is present in the body at the beginning of the line so it would have to be escaped and all the tools dealing with this output need to de-escape it. I think that --format=3Draw is better and this command should fail if the query produces more than one message. > Otherwise, wouldn't you be better off just having this be something > for the database::path setting in .notmuch-config? So you say: >=20 > [database] > path=3D/home/aj/Mail >=20 > or >=20 > [database] > path=3D/home/aj/Mail/.git > format=3Dgit This is something similar to what I have implemented in id:1270737766-29237-1-git-send-email-sojkam1@fel.cvut.cz. Carl doesn't want to merge it in its current form so I'm extracting some features from it and sending them separately. -Michal