RFC notmuch-pick: an emacs threaded message view with split-pane
authorMark Walters <markwalters1009@gmail.com>
Sun, 12 Feb 2012 10:32:48 +0000 (10:32 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:22 +0000 (09:44 -0800)
b5/6e4c35473bc1553f609d9c1bae979a036f85bf [new file with mode: 0644]

diff --git a/b5/6e4c35473bc1553f609d9c1bae979a036f85bf b/b5/6e4c35473bc1553f609d9c1bae979a036f85bf
new file mode 100644 (file)
index 0000000..1bc20ae
--- /dev/null
@@ -0,0 +1,138 @@
+Return-Path: <m.walters@qmul.ac.uk>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 525EA431FB6\r
+       for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 02:31:32 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.098\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
+       tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+       NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id iMyIAz+ZhHHR for <notmuch@notmuchmail.org>;\r
+       Sun, 12 Feb 2012 02:31:31 -0800 (PST)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 74252431FAE\r
+       for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 02:31:31 -0800 (PST)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+       by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+       (envelope-from <m.walters@qmul.ac.uk>)\r
+       id 1RwWiP-0004go-PQ; Sun, 12 Feb 2012 10:31:30 +0000\r
+Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]\r
+       helo=localhost)\r
+       by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
+       (envelope-from <m.walters@qmul.ac.uk>)\r
+       id 1RwWiP-00079q-Eq; Sun, 12 Feb 2012 10:31:29 +0000\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: RFC notmuch-pick: an emacs threaded message view with split-pane\r
+User-Agent: Notmuch/0.11.1+172~g6a5d2c5 (http://notmuchmail.org) Emacs/23.2.1\r
+       (i486-pc-linux-gnu)\r
+Date: Sun, 12 Feb 2012 10:32:48 +0000\r
+Message-ID: <87d39k1gvi.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 94.192.233.223\r
+X-QM-SPAM-Info: Sender has good ham record.  :)\r
+X-QM-Body-MD5: c6761476b99f56156da099f193d7d0dd (of first 20000 bytes)\r
+X-SpamAssassin-Score: -1.8\r
+X-SpamAssassin-SpamBar: -\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+       determine if it is\r
+       spam. We require at least 5.0 points to mark a message as spam.\r
+       This message scored -1.8 points.\r
+       Summary of the scoring: \r
+       * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
+       *      medium trust\r
+       *      [138.37.6.40 listed in list.dnswl.org]\r
+       * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+       provider *      (markwalters1009[at]gmail.com)\r
+       * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
+       *      domain\r
+       *  0.5 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 12 Feb 2012 10:31:32 -0000\r
+\r
+\r
+Hello\r
+\r
+On irc recently dme posted a patch notmuch-pick.el which provided a\r
+threaded message view in the emacs interface. I have added substantially\r
+to it and made some cli changes to support it better. See\r
+http://kanelephant.com/screen.png for a screenshot.\r
+\r
+It seems to be working well (although doubtless has bugs and lots of\r
+room for improvement).\r
+\r
+One important caveat is that it does call notmuch-show rather than\r
+notmuch-search so it can be slow. Viewing 10000 notmuch messages takes\r
+me 20 seconds with a warm cache and about a minute with a cold\r
+cache. Viewing million message searches in this fashion is not\r
+recommended! \r
+\r
+Note since I modify the notmuch-show.c backend this applies on top of\r
+Jani's show parsing patches id:"cover.1328558175.git.jani@nikula.org"\r
+\r
+The most important key bindings are as follows:\r
+\r
+'z' enter a search to display in pick view (analogous to s; works in\r
+hello, search, show and pick mode).\r
+\r
+'Z' displays the current search in pick mode (works in search and show\r
+mode)\r
+\r
+In pick mode: RET displays a message (splitting the current window),\r
+SPACE scrolls the message window and goes to next message when it\r
+reaches the end, 'b' scrolls the message window back, 'p', 'n' move to\r
+the next matching message, 'q' closes the message window (if open) or\r
+quits the pick view.\r
+\r
+'t' toggles whether to show the messages as a thread-tree structure or\r
+just as single messages, 'o' toggles the sort order. \r
+\r
+Most of the other commands I could think of work as I would expect (eg\r
+tagging, piping, help etc)\r
+\r
+Questions/thoughts and known bugs:\r
+\r
+Do people like the rough idea? \r
+\r
+At the moment there is some shared code with notmuch-show.el. This could\r
+be factored out: however, while this pick mode is WIP I don't think it\r
+is worth it. I have tried to keep the impact on the current parts of the\r
+emacs code and the command line interface fairly small.\r
+\r
+I will send the patches as 3 bits: one is the command-line support\r
+needed (i.e. changes to notmuch-show.c) one is the changes to the other\r
+emacs files and the final one is the notmuch-pick.el file itself.\r
+\r
+There are some things that need fixing: some of which are marked in the\r
+code. For example the highlighting (lowlighting?) of non-matching\r
+messages is hard-wired gray and should be a defcustom. The tags are not\r
+in a nice tag face and do not update automatically. There should be an\r
+option not to use the split-screen mode.\r
+\r
+Anyway I am already finding it useful: show a long thread, press 'Z' to\r
+see the thread structure nicely and then ...\r
+\r
+Best wishes\r
+\r
+Mark\r