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 84FA9431FC1 for ; Wed, 21 Apr 2010 20:13:41 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.499 X-Spam-Level: X-Spam-Status: No, score=-0.499 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001] 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 krTLxq60iver for ; Wed, 21 Apr 2010 20:13:40 -0700 (PDT) Received: from mail-gx0-f212.google.com (mail-gx0-f212.google.com [209.85.217.212]) by olra.theworths.org (Postfix) with ESMTP id E72A94196F2 for ; Wed, 21 Apr 2010 20:13:39 -0700 (PDT) Received: by gxk4 with SMTP id 4so23619gxk.2 for ; Wed, 21 Apr 2010 20:13:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:received:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=ZIeXl+Q6qrXj99TrDA0+iPUucbRc4enbQYjvfkc2/So=; b=QYS4vti5+NZ+Gj5aDlco0kW+NruyvZlFnq3zjrLcnM4SKCi9pfRYM9QgznnxicDexX FoXidnoAXwKd7TmDieh3jkdLJoXxAyyi7rBT/XnZrxWISV1GYq3EJAmkAdiG2IJeRWed KILiG0dyYJrndhKAq/I6fd1QcPpAEONNjioyo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=W+KedokSecZ8xUU08hBrRls8KZgoR8NtUaV+xpszkhNmqZhZuqq/E+mAw+8a9B8cTX i1rf4Vd6jo9tBkO516XLqMDM79jLove8gEx460GsvLuCfuskgU5G3SL3Qpk9reVpVva2 jdl+X0y83809WEFsgqWDiXpfKnHWTRVst6V4c= MIME-Version: 1.0 Sender: anthony.j.towns@gmail.com Received: by 10.90.114.1 with HTTP; Wed, 21 Apr 2010 20:13:39 -0700 (PDT) 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 13:13:39 +1000 X-Google-Sender-Auth: b05012bcee674a8d Received: by 10.90.40.18 with SMTP id n18mr4823609agn.28.1271906019297; Wed, 21 Apr 2010 20:13:39 -0700 (PDT) Message-ID: Subject: Re: [PATCH 1/2] Add 'cat' subcommand From: Anthony Towns To: Dirk Hohndel Content-Type: text/plain; charset=ISO-8859-1 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 03:13:41 -0000 On Thu, Apr 22, 2010 at 12:37, Dirk Hohndel wrote: > On Wed, 21 Apr 2010 17:44:03 -0700, Carl Worth wrote: >> So I'd prefer to have this command behave just like all others and use >> the same naming. >> =A0 =A0 =A0 filename:/complete/path/to/file 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))? Maybe notmuch show should be able to deal with all these things, and notmuch cat could be an alias for something like: notmuch show --format=3Dmbox --show-duplicate-files $SPEC ? > should we extend this to something generic that allows remote > specifications? > URI:file/path/to/local/file > URI:ssh/user@host/path/to/file > URI:git/user@host/path/to/file You could already do that by using FUSE filesystems to mount your remote mail dirs under those paths, without having to teach notmuch about those protocols, as long as you still have the Xapian database local. If the Xapian database is remote, you need to invoke "ssh $USER@$HOST notmuch" (or similar) instead of "notmuch", but the "cat" patch should be enough to make that work right. Otherwise, wouldn't you be better off just having this be something for the database::path setting in .notmuch-config? So you say: [database] path=3D/home/aj/Mail or [database] path=3D/home/aj/Mail/.git format=3Dgit or [database] # multiple backends path=3D/home/aj/Mail path=3Dgit:///home/aj/OldMail.git and have filename: just serve as a unique id that the database knows how to convert to the contents of the file? At most (afaics) maybe you'd want to say something like: [database] path=3D/home/aj/Mail path.old=3Dgit:///home/aj/OldMail.git so that any filename starting with "old/" has the "old/" trimmed and gets passed to the git backend, while the rest go to the default file backend. Cheers, aj --=20 Anthony Towns