1 Return-Path: <sojkam1@fel.cvut.cz>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 8A64B431FD0
\r
6 for <notmuch@notmuchmail.org>; Fri, 8 Jul 2011 22:35:53 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id uCeLoyrQEfRf for <notmuch@notmuchmail.org>;
\r
16 Fri, 8 Jul 2011 22:35:49 -0700 (PDT)
\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 10FD3431FB6
\r
19 for <notmuch@notmuchmail.org>; Fri, 8 Jul 2011 22:35:49 -0700 (PDT)
\r
20 Received: from localhost (unknown [192.168.200.4])
\r
21 by max.feld.cvut.cz (Postfix) with ESMTP id 3F96419F335A;
\r
22 Sat, 9 Jul 2011 07:35:48 +0200 (CEST)
\r
23 X-Virus-Scanned: IMAP AMAVIS
\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])
\r
25 by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,
\r
27 with ESMTP id nu7NKmjG9vRR; Sat, 9 Jul 2011 07:35:47 +0200 (CEST)
\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])
\r
29 by max.feld.cvut.cz (Postfix) with ESMTP id 388F319F3355;
\r
30 Sat, 9 Jul 2011 07:35:47 +0200 (CEST)
\r
31 Received: from steelpick.2x.cz (cable-86-56-4-108.cust.telecolumbus.net
\r
32 [86.56.4.108]) (Authenticated sender: sojkam1)
\r
33 by imap.feld.cvut.cz (Postfix) with ESMTPSA id 1C91DFA003;
\r
34 Sat, 9 Jul 2011 07:35:47 +0200 (CEST)
\r
35 Received: from wsh by steelpick.2x.cz with local (Exim 4.76)
\r
36 (envelope-from <sojkam1@fel.cvut.cz>)
\r
37 id 1QfQCg-0003Nr-Gy; Sat, 09 Jul 2011 07:35:46 +0200
\r
38 From: Michal Sojka <sojkam1@fel.cvut.cz>
\r
39 To: Daniel Schoepe <daniel.schoepe@googlemail.com>, notmuch@notmuchmail.org
\r
40 Subject: Re: [PATCH v4 1/2] emacs: User-defined sections in notmuch-hello
\r
41 In-Reply-To: <87mxgo2wns.fsf@gilead.invalid>
\r
43 <id:"1309379221-5617-1-git-send-email-daniel.schoepe@googlemail.com">
\r
44 <1310079227-19120-1-git-send-email-daniel.schoepe@googlemail.com>
\r
45 <1310079227-19120-2-git-send-email-daniel.schoepe@googlemail.com>
\r
46 <87box48jkc.fsf@steelpick.2x.cz> <87mxgo2wns.fsf@gilead.invalid>
\r
47 User-Agent: Notmuch/0.5-332-gf8bc48d (http://notmuchmail.org) Emacs/23.3.1
\r
48 (x86_64-pc-linux-gnu)
\r
49 Date: Sat, 09 Jul 2011 07:35:46 +0200
\r
50 Message-ID: <87sjqg6mod.fsf@steelpick.2x.cz>
\r
52 Content-Type: text/plain; charset=us-ascii
\r
53 X-BeenThere: notmuch@notmuchmail.org
\r
54 X-Mailman-Version: 2.1.13
\r
56 List-Id: "Use and development of the notmuch mail system."
\r
57 <notmuch.notmuchmail.org>
\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
61 List-Post: <mailto:notmuch@notmuchmail.org>
\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
65 X-List-Received-Date: Sat, 09 Jul 2011 05:35:53 -0000
\r
67 On Fri, 08 Jul 2011, Daniel Schoepe wrote:
\r
68 Non-text part: multipart/signed
\r
69 > On Sat, 09 Jul 2011 01:00:03 +0200, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
\r
70 > > Yes, this is definitely a good idea. My last comment to the patch is
\r
71 > > that I do not like the use of plists in customization interface. It is
\r
72 > > especially weird in the case of boolean options like hide-if-empty,
\r
73 > > because they actually have three states: disabled, off and on. And this
\r
74 > > make not a lot of sense.
\r
76 > > I think that the customization interface is much better arranged when it
\r
77 > > is modified like in the patch below (it is against v3).
\r
82 > > - '((:title (string :tag "Title for this section"))
\r
83 > > - (:make-query (string :tag "Filter for each tag"))
\r
84 > > - (:make-count (string :tag "Different query to generate counts"))
\r
85 > > - (:hide-tags (repeat :tag "Tags that will be hidden" string))
\r
86 > > - (:initially-hidden (boolean :tag "Hide this on startup?"))
\r
87 > > - (:hide-empty-tags (boolean :tag "Hide tags with no matching messages"))
\r
88 > > - (:hide-if-empty (boolean :tag "Hide if empty")))))
\r
89 > > - `(list (const :tag "" notmuch-hello-insert-tags-section)
\r
90 > > - (plist :inline t :options ,opts))))
\r
91 > > + :type '(list (const :tag "" notmuch-hello-insert-tags-section)
\r
92 > > + (string :tag "Title for this section")
\r
93 > > + (string :tag "Filter for each tag")
\r
94 > > + (string :tag "Different filter to generate counts")
\r
95 > > + (repeat :tag "Tags that will be hidden" string)
\r
96 > > + (boolean :tag "Hide this on startup?")
\r
97 > > + (boolean :tag "Hide tags with no matching messages")
\r
98 > > + (boolean :tag "Hide if empty")))
\r
101 > > -(defun notmuch-hello-insert-tags-section (&rest options)
\r
102 > > +(defun notmuch-hello-insert-tags-section (title &optional filter filter-count hide-tags initially-hidden
\r
103 > > + hide-empty-searches hide-if-empty)
\r
105 > This would make customization via elisp somewhat more cumbersome though,
\r
106 > because then one has to specify all preceding optional arguments to set
\r
107 > an option near the end of the argument list. Also, it gets harder to
\r
108 > decipher which value belongs to which option.
\r
110 Not necessarily. In fact, notmuch-hello-insert-tags-section is only a
\r
111 thin wrapper of notmuch-hello-insert-searches. In elisp you can always
\r
112 use directly those plist-based "low-level" functions.
\r