[PATCH v3 1/2] emacs: User-defined sections in notmuch-hello

Daniel Schoepe daniel.schoepe at googlemail.com
Thu Jul 7 11:25:37 PDT 2011


On Thu, 07 Jul 2011 17:23:13 +0200, Michal Sojka <sojkam1 at fel.cvut.cz> wrote:
> This wouldn't work for me. My all-tags section covers almost entire
> screen and finding non-zero entries there is not very convenient. I find
> much more useful to have a section saying: "Hey, you have unread
> messages only for these three tags". Moreover, it wouldn't help me to see
> non-zero number of unread messages and when I click the button I would
> see all the messages, not only the unread ones. It simply seems very
> confusing to me.

I agree with you, personally, but I don't think this particular bit
(:hide-empty-searches) increases code complexity that much (and all of
it is localized to the functions generating the sections, which possibly
should be moved to a separate file). I also find it plausible that a
user might want behavior like this (as, e.g. an overview, if he doesn't
want an all tags section, but still see what tags he has set).

Hence I don't see why we should not provide this option.

> > If we decide to keep this functionality, it should be inverted though,
> > i.e. one has to explicitly specify :show-empty-searches to get them.
> 
> > 
> > About the counts: I introduced this because Austin Clements says he
> > finds it useful in his comment here:
> > 
> > id:"BANLkTi=729DWai4q57iBSfz1wDhBXsmndQ at mail.gmail.com"
> 
> I agree that it is useful to see unread counts, but it is not useful to
> see all messages when I click the button.

As I said, this is not my preference either, but personal taste is not
necessarily the best argument for _not including_ something, especially
for the UI of a mail client. And in this case there even is someone
saying that behavior would be useful to him.

> > A user might still want to have the section collapsed when starting the
> > notmuch UI and only have it shown when he needs it. (I use that for a
> > section that displays unread counts for each tag).
> 
> You are right. I use emacs --daemon so I actually initialize notmuch UI
> only when emacs crashes or when I run out of battery power ;-)

Yes, me too, but I like seeing only sections that I care about every
time I open notmuch while still having more information available in a
convenient way. But I'm not too attached to this feature, so if the
consensus is that that bit should be removed, I'll bow to public opinion. :)

> If I understand this variable correctly, it stores the label (text) of
> the button you have your point at. This allows you to stay at the same
> button after reloading of notmuch-hello even if the layout changes,
> right? Then having the same named button in multiple sections results in
> moving the first (or last) occurrence of this button when notmuch-hello
> is reloaded.

Ah, I misunderstood what you were referring to earlier. That was already
case before my patch though, except that now it's more likely to have
buttons with the same name. Anyway, I think this is just a minor issue
and can be addressed in a different patch.

In any event, this definitely needs better documentation.

Thanks for all your input on this!

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110707/05eea4d7/attachment.pgp>


More information about the notmuch mailing list