--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\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 22B2B431FB6\r
+ for <notmuch@notmuchmail.org>; Thu, 26 Apr 2012 11:21:36 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ 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 6JeSCHA8s4sl for <notmuch@notmuchmail.org>;\r
+ Thu, 26 Apr 2012 11:21:34 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])\r
+ by olra.theworths.org (Postfix) with ESMTP id 54F14431FAE\r
+ for <notmuch@notmuchmail.org>; Thu, 26 Apr 2012 11:21:34 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id EA45A68055; Thu, 26 Apr 2012 21:21:28 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 1/2] emacs: add a filter option to show\r
+In-Reply-To: <1335373954-4578-2-git-send-email-markwalters1009@gmail.com>\r
+References: <1335373954-4578-1-git-send-email-markwalters1009@gmail.com>\r
+ <1335373954-4578-2-git-send-email-markwalters1009@gmail.com>\r
+User-Agent: Notmuch/0.12+128~g512e176 (http://notmuchmail.org) Emacs/23.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Thu, 26 Apr 2012 21:21:28 +0300\r
+Message-ID: <m27gx2qrpz.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\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: Thu, 26 Apr 2012 18:21:36 -0000\r
+\r
+On Wed, Apr 25 2012, Mark Walters <markwalters1009@gmail.com> wrote:\r
+\r
+> Show the current thread with a different filter (i.e., open messages\r
+> in the thread matching the new query).\r
+>\r
+> Bound to 'l' for "limit".\r
+>\r
+> Note that it is not the same as filter in search mode as it replaces\r
+> the existing query rather than ANDing with it (but it does keep the\r
+> thread-id part of the query).\r
+> ---\r
+\r
+LGTM -- just one question -- to be analogous with 'notmuch-search-filter'\r
+'notmuch-show-filter-thread' could look something like:\r
+\r
+(defun notmuch-show-filter-thread (query)\r
+ "Filter or LIMIT the current thread based on a new query string.\r
+\r
+Reshows the current thread with matches defined by the new query-string."\r
+ (interactive (list (notmuch-read-query "Filter thread: ")))\r
+ (setq notmuch-show-query-context (if (string= query "") nil query))\r
+ (notmuch-show-refresh-view t))\r
+\r
+?\r
+\r
+Tomi\r
+\r
+> emacs/notmuch-show.el | 12 ++++++++++++\r
+> 1 files changed, 12 insertions(+), 0 deletions(-)\r
+>\r
+> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+> index 30b26d1..4b4d663 100644\r
+> --- a/emacs/notmuch-show.el\r
+> +++ b/emacs/notmuch-show.el\r
+> @@ -42,6 +42,7 @@\r
+> (declare-function notmuch-search-next-thread "notmuch" nil)\r
+> (declare-function notmuch-search-show-thread "notmuch" nil)\r
+> (declare-function notmuch-update-tags "notmuch" (current-tags tag-changes))\r
+> +(declare-function notmuch-read-query "notmuch" (prompt))\r
+> \r
+> (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date")\r
+> "Headers that should be shown in a message, in this order.\r
+> @@ -1157,6 +1158,7 @@ reset based on the original query."\r
+> (define-key map "s" 'notmuch-search)\r
+> (define-key map "m" 'notmuch-mua-new-mail)\r
+> (define-key map "f" 'notmuch-show-forward-message)\r
+> + (define-key map "l" 'notmuch-show-filter-thread)\r
+> (define-key map "r" 'notmuch-show-reply-sender)\r
+> (define-key map "R" 'notmuch-show-reply)\r
+> (define-key map "|" 'notmuch-show-pipe-message)\r
+> @@ -1399,6 +1401,16 @@ current thread."\r
+> "Mark the current message as read."\r
+> (notmuch-show-tag-message "-unread"))\r
+> \r
+> +(defun notmuch-show-filter-thread ()\r
+> + "Filter or LIMIT the current thread based on a new query string.\r
+> +\r
+> +Reshows the current thread with matches defined by the new query-string."\r
+> + (interactive)\r
+> + (setq notmuch-show-query-context (notmuch-read-query "Filter thread: "))\r
+> + (when (string= notmuch-show-query-context "")\r
+> + (setq notmuch-show-query-context nil))\r
+> + (notmuch-show-refresh-view t))\r
+> +\r
+> ;; Functions for getting attributes of several messages in the current\r
+> ;; thread.\r
+> \r
+> -- \r
+> 1.7.9.1\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r