unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: Tomi Ollila <tomi.ollila@iki.fi>,
	Jameson Graef Rollins <jrollins@finestructure.net>,
	Mark Walters <markwalters1009@gmail.com>,
	notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs-show: open excluded matches if no other matches
Date: Fri, 13 Apr 2012 08:57:13 +0000	[thread overview]
Message-ID: <87k41kj9g6.fsf@nikula.org> (raw)
In-Reply-To: <m2ty0odaej.fsf@guru.guru-group.fi>

On Thu, 12 Apr 2012 22:20:52 +0300, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> On Thu, Apr 12 2012, Jameson Graef Rollins wrote:
> 
> > On Thu, Mar 15 2012, Mark Walters <markwalters1009@gmail.com> 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.

  reply	other threads:[~2012-04-13  8:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-15 18:28 [PATCH] emacs-show: open excluded matches if no other matches Mark Walters
2012-04-12 19:08 ` Jameson Graef Rollins
2012-04-12 19:20   ` Tomi Ollila
2012-04-13  8:57     ` Jani Nikula [this message]
2012-04-13  9:29       ` Mark Walters
2012-04-12 19:10 ` Tomi Ollila

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k41kj9g6.fsf@nikula.org \
    --to=jani@nikula.org \
    --cc=jrollins@finestructure.net \
    --cc=markwalters1009@gmail.com \
    --cc=notmuch@notmuchmail.org \
    --cc=tomi.ollila@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).