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 CA1AB431FAF for ; Thu, 19 Jan 2012 14:03:22 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.201 X-Spam-Level: X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled 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 8ZK-tCI6QElI for ; Thu, 19 Jan 2012 14:03:22 -0800 (PST) Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 3C89F431FAE for ; Thu, 19 Jan 2012 14:03:22 -0800 (PST) Received: by werp13 with SMTP id p13so417690wer.26 for ; Thu, 19 Jan 2012 14:03:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=KO8oQvdtaPFzxIpaaFgXnHIJuU+MxQQ3e1kgGkr1FR0=; b=bLzYEO3l/sDcqdZ+U2MmAbiovjoXYYNU5nxxhTZljjyFfStHkkqdKmH6MGLY2ioVL2 fl7RFjtP0apEfFhObBk6UIzjxuPpt/LL8Cw8Q8KpLS1PNrZ/+o1NvgltsaO1qrF04ize 8RiLBhx5UuNHmISuEq3BTaHxBMy2uhX8vFSkU= Received: by 10.216.133.141 with SMTP id q13mr1397854wei.1.1327010601025; Thu, 19 Jan 2012 14:03:21 -0800 (PST) Received: from localhost (94-192-233-223.zone6.bethere.co.uk. [94.192.233.223]) by mx.google.com with ESMTPS id fy5sm2275480wib.7.2012.01.19.14.03.19 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 Jan 2012 14:03:20 -0800 (PST) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH] Automatically exclude tags in notmuch-show Date: Thu, 19 Jan 2012 22:03:03 +0000 Message-Id: <1327010583-23954-1-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <874nvric7c.fsf@qmul.ac.uk> References: <874nvric7c.fsf@qmul.ac.uk> 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, 19 Jan 2012 22:03:22 -0000 Add the use of auto_exclude_tags in notmuch-show.c. As with Austin's patch (commit 42a907992823030f070fc395a174f779998ca6f5) it just adds the excluded tags to the query so the excluded messages will still appear in the emacs interface, but as a single header line rather than as a matching message. --- notmuch-show.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index d14dac9..925dfd6 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -948,9 +948,12 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) char *opt; const notmuch_show_format_t *format = &format_text; notmuch_show_params_t params; + const char **auto_exclude_tags; + size_t auto_exclude_tags_length; int mbox = 0; int format_specified = 0; int i; + unsigned int j; params.entire_thread = 0; params.raw = 0; @@ -1040,6 +1043,11 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) return 1; } + auto_exclude_tags = notmuch_config_get_auto_exclude_tags + (config, &auto_exclude_tags_length); + for (j = 0; j < auto_exclude_tags_length; j++) + notmuch_query_add_tag_exclude (query, auto_exclude_tags[j]); + /* if part was requested and format was not specified, use format=raw */ if (params.part >= 0 && !format_specified) format = &format_raw; -- 1.7.2.3