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 94A8B40D14F for ; Fri, 22 Oct 2010 02:28:32 -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=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 1lp1RgW3-i91 for ; Fri, 22 Oct 2010 02:28:18 -0700 (PDT) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id EA6C640D14A for ; Fri, 22 Oct 2010 02:28:17 -0700 (PDT) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id E734019F33B2; Fri, 22 Oct 2010 11:28:16 +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 sEk6WFbQD3Wa; Fri, 22 Oct 2010 11:28:15 +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 07D3419F33B5; Fri, 22 Oct 2010 11:28:14 +0200 (CEST) Received: from steelpick.2x.cz (note-sojka.felk.cvut.cz [147.32.86.30]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id 0530AFA008; Fri, 22 Oct 2010 11:28:14 +0200 (CEST) Received: from wsh by steelpick.2x.cz with local (Exim 4.72) (envelope-from ) id 1P9Dv3-0006ox-RZ; Fri, 22 Oct 2010 11:28:13 +0200 From: Michal Sojka To: notmuch@notmuchmail.org Subject: [PATCH 0/2] Notmuch cat v2 Date: Fri, 22 Oct 2010 11:28:02 +0200 Message-Id: <1287739684-26188-1-git-send-email-sojkam1@fel.cvut.cz> X-Mailer: git-send-email 1.7.2.3 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: Fri, 22 Oct 2010 09:28:32 -0000 Hi all, this is my second attempt to implement notmuch cat subcommand (the first version was posted in id:1271747793-17507-1-git-send-email-sojkam1@fel.cvut.cz). This subcommand outputs the given message to stdout. In this version the arguments are classical notmuch search terms and not a filename as in the previous version. Emacs interface then uses message-id to retrieve the message. Some people suggested that cat could be implemented as a special format of show subcommand. That would be possible, but it seems that show command always constructs threads form the messages which means that is executes several database queries. I consider this as unnecessary overhead and for that reason cat is a separate subcommand. Michal Sojka (2): Add 'cat' subcommand emacs: Access raw messages via cat subcommand emacs/notmuch-show.el | 14 +++++--- notmuch-client.h | 3 ++ notmuch-show.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++++ notmuch.1 | 4 ++ notmuch.c | 4 ++ test/cat | 38 ++++++++++++++++++++++ test/notmuch-test | 2 +- 7 files changed, 142 insertions(+), 6 deletions(-) create mode 100755 test/cat -- 1.7.2.3