From: Jani Nikula Date: Fri, 13 Apr 2012 08:57:13 +0000 (+0000) Subject: Re: [PATCH] emacs-show: open excluded matches if no other matches X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=b9991756346f1800b598dec11b635d58262ed560;p=notmuch-archives.git Re: [PATCH] emacs-show: open excluded matches if no other matches --- diff --git a/59/19c161a81358d47f81e94be0da7ed541ce6781 b/59/19c161a81358d47f81e94be0da7ed541ce6781 new file mode 100644 index 000000000..b2f6367cd --- /dev/null +++ b/59/19c161a81358d47f81e94be0da7ed541ce6781 @@ -0,0 +1,119 @@ +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 55F84431FB6 + for ; Fri, 13 Apr 2012 01:57:22 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[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 kdt5FEiEyCpu for ; + Fri, 13 Apr 2012 01:57:21 -0700 (PDT) +Received: from mail-qc0-f181.google.com (mail-qc0-f181.google.com + [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 61099431FAF + for ; Fri, 13 Apr 2012 01:57:21 -0700 (PDT) +Received: by qcsk26 with SMTP id k26so2175663qcs.26 + for ; Fri, 13 Apr 2012 01:57:19 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type:x-gm-message-state; + bh=EPCqCdRwv6ONOLnxfrOlgQ/S8pln126MvQWsBjWvc9Q=; + b=mkTzfqFtMF2WCC5ceiNiO8Brd4uSORocmsMlMaNIG7jGKmTtwlXLIuc8PhDCvANxUb + Gf2nOxQwn1obuDc/IJly+SIH7JjRjqJ73m+JDs3nqEhgfppfPtMhi+HwbbUwIBBcKdob + G6+AhFcosqAsD0HoItdbhln03y4SRE+DO1xvOcwTHtDFMrPsGIP2E+YHlJP6mQKBTc6D + jbM6OsAjeJ93T1qVgxG9ZolFRcihmEDRby2CAzMFE6QYM03J1uaqtZiK7LjQIL/f8s+/ + iGSXWbEFum68ikDpmbT977CMykjnK0SynK7gtI2xf+OexbR19SpGkpihZS3ahypUNKpD + Aapw== +Received: by 10.224.173.194 with SMTP id q2mr1417250qaz.15.1334307439702; + Fri, 13 Apr 2012 01:57:19 -0700 (PDT) +Received: from localhost ([92.243.24.172]) + by mx.google.com with ESMTPS id dx8sm7609556qab.5.2012.04.13.01.57.17 + (version=SSLv3 cipher=OTHER); Fri, 13 Apr 2012 01:57:18 -0700 (PDT) +From: Jani Nikula +To: Tomi Ollila , + Jameson Graef Rollins , + Mark Walters , notmuch@notmuchmail.org +Subject: Re: [PATCH] emacs-show: open excluded matches if no other matches +In-Reply-To: +References: <1331836090-30560-1-git-send-email-markwalters1009@gmail.com> + <8762d44vkv.fsf@servo.finestructure.net> + +User-Agent: Notmuch/0.11.1+222~ga47a98c (http://notmuchmail.org) Emacs/23.1.1 + (i686-pc-linux-gnu) +Date: Fri, 13 Apr 2012 08:57:13 +0000 +Message-ID: <87k41kj9g6.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Gm-Message-State: + ALoCoQlVg+oxqlKs58VOkXs1uSll2xlmqNuQ8QW0dqluGDElhagBnVb/mhIYGnGq70N00rThP+yT +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, 13 Apr 2012 08:57:22 -0000 + +On Thu, 12 Apr 2012 22:20:52 +0300, Tomi Ollila wrote: +> On Thu, Apr 12 2012, Jameson Graef Rollins wrote: +> +> > On Thu, Mar 15 2012, Mark Walters wrote: +> >> Currently emacs show does not open matching but excluded +> >> messages. This is normally the desired behaviour but is probably not +> >> ideal if only excluded messages match. This patch opens all the +> >> matching (necessarily excluded) messages in this case and goes to the +> >> first one. +> > +> > Hi, Mark. I have tested this patch and it LGTM. I think this is the +> > behavior we want, since it's no fun to open up a show buffer and have +> > all messages in the thread closed. That doesn't make much sense. +> +> I disagree: If I open up a show buffer I'd like to have all messages +> in the thread closed if search terms do not match. But that is my +> opinion and inconsistent with current behaviour. +> +> (Therefore I already +1:d this patch) +> +> An example: I have thread of 100 messages and 1 of those is unread. +> Search terms is tag:unread. I enter the thread: 99 messages closed +> and this one open. Now unread is automatically removed. If I go back +> to search view (by pressing q) and re-choose the same thread, +> current behaviour is to open all 100 messages. I'd like to see all +> 100 messages closed. + +IIUC this would still show all messages closed. Messages that don't +match will be closed. The change is that if there are messages that +match, but all of them are excluded, then open the messages anyway. + +In your example, only if you have *another* message that is both +tag:unread and tag:deleted (or some other excluded tag) it would show up +the second time you enter show view. + +I actually think I'd still want the above to show all messages closed, +unless the excluded tag was explicitly specified in the search. The idea +of exclusions is to reduce "noise" in the view, why open them? If you +have those 100 messages in a thread, and you want to see the interesting +(i.e. non-excluded) messages, I'd rather see 0 open if 0 are +interesting, instead of 100 non-interesting if they are all excluded. + +Perhaps a function to toggle the open/close of excluded messages would +be a better idea. But then I don't use exclusions ATM, so maybe I just +don't understand, and won't be affected either way. *shrug*. + + +BR, +Jani.