Re: [PATCH v3 1/2] emacs: User-defined sections in notmuch-hello
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 7 Jul 2011 15:23:13 +0000 (17:23 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:00 +0000 (09:39 -0800)
5a/b37cdb84f8e32d4ff67f3073f2976702c57480 [new file with mode: 0644]

diff --git a/5a/b37cdb84f8e32d4ff67f3073f2976702c57480 b/5a/b37cdb84f8e32d4ff67f3073f2976702c57480
new file mode 100644 (file)
index 0000000..2442149
--- /dev/null
@@ -0,0 +1,164 @@
+Return-Path: <sojkam1@fel.cvut.cz>\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 9FB94431FD0\r
+       for <notmuch@notmuchmail.org>; Thu,  7 Jul 2011 08:23:17 -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 bEakV+C0iHIv for <notmuch@notmuchmail.org>;\r
+       Thu,  7 Jul 2011 08:23:16 -0700 (PDT)\r
+Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
+       by olra.theworths.org (Postfix) with ESMTP id 2D5A9431FB6\r
+       for <notmuch@notmuchmail.org>; Thu,  7 Jul 2011 08:23:16 -0700 (PDT)\r
+Received: from localhost (unknown [192.168.200.4])\r
+       by max.feld.cvut.cz (Postfix) with ESMTP id E6E853CFE8E;\r
+       Thu,  7 Jul 2011 17:23:14 +0200 (CEST)\r
+X-Virus-Scanned: IMAP AMAVIS\r
+Received: from max.feld.cvut.cz ([192.168.200.1])\r
+       by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,\r
+       port 10044)\r
+       with ESMTP id YUvF4QW4hYbC; Thu,  7 Jul 2011 17:23:13 +0200 (CEST)\r
+Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
+       by max.feld.cvut.cz (Postfix) with ESMTP id B2BC43CFE8D;\r
+       Thu,  7 Jul 2011 17:23:13 +0200 (CEST)\r
+Received: from steelpick.2x.cz (unknown [141.76.49.12])\r
+       (Authenticated sender: sojkam1)\r
+       by imap.feld.cvut.cz (Postfix) with ESMTPSA id 801FEFA004;\r
+       Thu,  7 Jul 2011 17:23:13 +0200 (CEST)\r
+Received: from wsh by steelpick.2x.cz with local (Exim 4.76)\r
+       (envelope-from <sojkam1@fel.cvut.cz>)\r
+       id 1QeqQ5-0006vw-9Z; Thu, 07 Jul 2011 17:23:13 +0200\r
+From: Michal Sojka <sojkam1@fel.cvut.cz>\r
+To: Daniel Schoepe <daniel.schoepe@googlemail.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v3 1/2] emacs: User-defined sections in notmuch-hello\r
+In-Reply-To: <87oc17r38a.fsf@tredergarh.home.box>\r
+References: <1309379221-5617-1-git-send-email-daniel.schoepe@googlemail.com>\r
+       <1309883030-28899-1-git-send-email-daniel.schoepe@googlemail.com>\r
+       <1309883030-28899-2-git-send-email-daniel.schoepe@googlemail.com>\r
+       <87fwmjabii.fsf@steelpick.2x.cz>\r
+       <87oc17r38a.fsf@tredergarh.home.box>\r
+User-Agent: Notmuch/0.5-332-gf8bc48d (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Thu, 07 Jul 2011 17:23:13 +0200\r
+Message-ID: <871uy25d3y.fsf@steelpick.2x.cz>\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, 07 Jul 2011 15:23:18 -0000\r
+\r
+On Wed, 06 Jul 2011, Daniel Schoepe wrote:\r
+Non-text part: multipart/signed\r
+> On Wed, 06 Jul 2011 13:34:13 +0200, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
+> > So my proposal is to forget about different queries for filters and\r
+> > counts and having here only the following options: filter, hide-tags and\r
+> > hide-if-empty.\r
+> > \r
+> > Then, the documentation would be simple: "This section displays buttons\r
+> > for all tags of messages matching a FILTER. Optionally, some of these\r
+> > tags may be hidden."\r
+> > \r
+> > Is there a use case, which is not covered by this?\r
+> \r
+> I'm not sure, I can imagine someone wanting to have an overview of all\r
+> his tags, whether there are, e.g., unread messages or not.\r
+\r
+This wouldn't work for me. My all-tags section covers almost entire\r
+screen and finding non-zero entries there is not very convenient. I find\r
+much more useful to have a section saying: "Hey, you have unread\r
+messages only for these three tags". Moreover, it wouldn't help me to see\r
+non-zero number of unread messages and when I click the button I would\r
+see all the messages, not only the unread ones. It simply seems very\r
+confusing to me.\r
+\r
+> If we decide to keep this functionality, it should be inverted though,\r
+> i.e. one has to explicitly specify :show-empty-searches to get them.\r
+\r
+> \r
+> About the counts: I introduced this because Austin Clements says he\r
+> finds it useful in his comment here:\r
+> \r
+> id:"BANLkTi=729DWai4q57iBSfz1wDhBXsmndQ@mail.gmail.com"\r
+\r
+I agree that it is useful to see unread counts, but it is not useful to\r
+see all messages when I click the button.\r
+\r
+> > > +  :type\r
+> > > +  (let ((opts\r
+> > > +         '((:title (string :tag "Title for this section"))\r
+> > > +           (:make-query (string :tag "Filter for each tag"))\r
+> > > +           (:make-count (string :tag "Different query to generate counts"))\r
+> > > +           (:hide-tags (repeat :tag "Tags that will be hidden" string))\r
+> > \r
+> > I can imagine, that :hide-tags could also be a (list of) regexp(es).\r
+> > \r
+> > > +           (:initially-hidden (boolean :tag "Hide this on startup?"))\r
+> > \r
+> > This is IMHO not needed here, as you always has to enable this section\r
+> > manually.\r
+> \r
+> A user might still want to have the section collapsed when starting the\r
+> notmuch UI and only have it shown when he needs it. (I use that for a\r
+> section that displays unread counts for each tag).\r
+\r
+You are right. I use emacs --daemon so I actually initialize notmuch UI\r
+only when emacs crashes or when I run out of battery power ;-)\r
+> > > +;; only defined to avoid compilation warnings about free variables\r
+> > > +(defvar notmuch-hello-target nil)\r
+> > \r
+> > Add the documentation as discussed above. Additionally, it seems that\r
+> > having only the label in this variable is not enough, since the same\r
+> > label can appear in multiple sections. Perhaps, we need both the title\r
+> > of the section and the label here.\r
+> \r
+> What do you mean by label? "Custom function"? If yes, that element will\r
+> have the actual function name in the input element next to it anyway.\r
+\r
+If I understand this variable correctly, it stores the label (text) of\r
+the button you have your point at. This allows you to stay at the same\r
+button after reloading of notmuch-hello even if the layout changes,\r
+right? Then having the same named button in multiple sections results in\r
+moving the first (or last) occurrence of this button when notmuch-hello\r
+is reloaded.\r
+\r
+> \r
+> > Perhaps you want to end this (and also all other) section with an empty\r
+> > line so that the order of sections doesn't matter. I use sections in\r
+> > this order: header, inbox, saved-searches and there is no space between\r
+> > header and inbox and two spaces between inbox and saved-searches.\r
+> \r
+> My thinking was to have no section end with a newline and insert a\r
+> newline between each section when building the notmuch-hello buffer, to\r
+> prevent forgotten trailing newlines when defining a new section.\r
+\r
+This sounds reasonable.\r
+\r
+> > I might be useful to include here a link to the customization of this\r
+> > page. Maybe, it would be useful to have notmuch-hello subgroup in\r
+> > customization interface and link to this group. But creation of the\r
+> > subgroup should be definitely in a separate patch.\r
+> \r
+> Yes definitely. Pieter Praet recently sent a patch reorganizing the\r
+> customization options into subgroups, so I'll change it once that patch\r
+> has been applied.\r
+\r
+Good.\r
+\r
+-Michal\r