From: Michal Sojka <sojkam1@fel.cvut.cz>
To: Daniel Schoepe <daniel.schoepe@googlemail.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH v4 1/2] emacs: User-defined sections in notmuch-hello
Date: Sat, 09 Jul 2011 01:00:03 +0200 [thread overview]
Message-ID: <87box48jkc.fsf@steelpick.2x.cz> (raw)
In-Reply-To: <1310079227-19120-2-git-send-email-daniel.schoepe@googlemail.com>
On Fri, 08 Jul 2011, Daniel Schoepe wrote:
> This has been done in v4 of the patch, for which I screwed up the
> In-Reply-To header and hence is listed as a separate thread:
>
> id:"1310079227-19120-1-git-send-email-daniel.schoepe@googlemail.com"
Oh, you always send new versions faster than I can investigate the older
ones :-)
> > - The title of custom tags section was not passed correctly to the
> > functions. This is also fixed in the patch below.
>
> I changed title to a mandatory argument for consistency with
> notmuch-insert-searches and because a title-less section wouldn't make
> much sense anyway.
Yes, this is definitely a good idea. My last comment to the patch is
that I do not like the use of plists in customization interface. It is
especially weird in the case of boolean options like hide-if-empty,
because they actually have three states: disabled, off and on. And this
make not a lot of sense.
I think that the customization interface is much better arranged when it
is modified like in the patch below (it is against v3).
-Michal
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index d3b146e..3e883ff 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -106,17 +106,14 @@ Typically \",\" in the US and UK and \".\" in Europe."
(define-widget 'notmuch-hello-tags-section 'lazy
"Customize-type for notmuch-hello tag-list sections."
:tag "Customized tag-list"
- :type
- (let ((opts
- '((:title (string :tag "Title for this section"))
- (:make-query (string :tag "Filter for each tag"))
- (:make-count (string :tag "Different query to generate counts"))
- (:hide-tags (repeat :tag "Tags that will be hidden" string))
- (:initially-hidden (boolean :tag "Hide this on startup?"))
- (:hide-empty-tags (boolean :tag "Hide tags with no matching messages"))
- (:hide-if-empty (boolean :tag "Hide if empty")))))
- `(list (const :tag "" notmuch-hello-insert-tags-section)
- (plist :inline t :options ,opts))))
+ :type '(list (const :tag "" notmuch-hello-insert-tags-section)
+ (string :tag "Title for this section")
+ (string :tag "Filter for each tag")
+ (string :tag "Different filter to generate counts")
+ (repeat :tag "Tags that will be hidden" string)
+ (boolean :tag "Hide this on startup?")
+ (boolean :tag "Hide tags with no matching messages")
+ (boolean :tag "Hide if empty")))
(define-widget 'notmuch-hello-query-section 'lazy
"Customize-type for custom saved-search-like sections"
@@ -629,7 +626,8 @@ Supports the following entries in OPTIONS as a plist:
(indent-rigidly start (point) notmuch-hello-indent)
target-pos))))
-(defun notmuch-hello-insert-tags-section (&rest options)
+(defun notmuch-hello-insert-tags-section (title &optional filter filter-count hide-tags initially-hidden
+ hide-empty-searches hide-if-empty)
"Insert a section displaying all tags and message counts for each.
TITLE defaults to \"All tags: \".
@@ -637,13 +635,13 @@ Allowed options are those accepted by `notmuch-hello-insert-searches' and the
following:
:hide-tags - List of tags that should be excluded."
- (apply 'notmuch-hello-insert-searches
- (plist-get options :title)
- (notmuch-hello-generate-tag-alist
- (plist-get options :hide-tags)
- (plist-get options :make-query)
- (plist-get options :make-count))
- options))
+ (notmuch-hello-insert-searches title
+ (notmuch-hello-generate-tag-alist hide-tags filter
+ (if (string= "" filter-count)
+ nil filter-count))
+ :initially-hidden initially-hidden
+ :hide-empty-searches hide-empty-searches
+ :hide-if-empty hide-if-empty))
(defun notmuch-hello-insert-inbox ()
"Show an entry for each saved search and inboxed messages for each tag"
next prev parent reply other threads:[~2011-07-08 23:00 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <id:"1309379221-5617-1-git-send-email-daniel.schoepe@googlemail.com">
2011-07-07 22:53 ` [PATCH v4 0/2] emacs: User-defined sections in notmuch-hello Daniel Schoepe
2011-07-07 22:53 ` [PATCH v4 1/2] " Daniel Schoepe
2011-07-08 23:00 ` Michal Sojka [this message]
2011-07-08 23:13 ` Daniel Schoepe
2011-07-09 5:35 ` Michal Sojka
2011-07-09 17:07 ` Daniel Schoepe
2011-07-07 22:53 ` [PATCH v4 2/2] emacs: Tests for user-defined sections Daniel Schoepe
2011-07-09 18:03 ` [PATCH v5 0/2] emacs: User-defined sections in notmuch-hello Daniel Schoepe
2011-07-09 18:03 ` [PATCH v5 1/2] " Daniel Schoepe
2011-07-09 18:03 ` [PATCH v5 2/2] emacs: Tests for user-defined sections Daniel Schoepe
2011-07-11 10:32 ` [PATCH] emacs: NEWS entry " Daniel Schoepe
2011-08-14 16:55 ` [PATCH v5 0/2] emacs: User-defined sections in notmuch-hello Daniel Schoepe
2011-08-15 8:40 ` Michal Sojka
2011-10-10 13:39 ` [PATCH v6 " Daniel Schoepe
2011-10-10 13:39 ` [PATCH v6 1/2] " Daniel Schoepe
2011-11-24 13:54 ` David Bremner
2011-11-24 14:01 ` Daniel Schoepe
2011-11-24 15:43 ` Michal Sojka
2011-11-28 4:06 ` Dmitry Kurochkin
2011-11-28 7:57 ` Michal Sojka
2011-12-14 3:11 ` Dmitry Kurochkin
2011-12-14 12:55 ` Dmitry Kurochkin
2012-01-22 0:39 ` Daniel Schoepe
2012-01-22 0:54 ` [PATCH v7 " Daniel Schoepe
2012-01-22 0:54 ` [PATCH v7 2/2] emacs: Tests for user-defined sections Daniel Schoepe
2012-01-23 23:07 ` Dmitry Kurochkin
2012-01-28 21:30 ` Daniel Schoepe
2012-01-28 21:44 ` [PATCH v8 0/2] emacs: User-defined sections in notmuch-hello Daniel Schoepe
2012-01-28 21:44 ` [PATCH v8 1/2] " Daniel Schoepe
2012-01-28 21:44 ` [PATCH v8 2/2] emacs: Tests for user-defined sections Daniel Schoepe
2012-01-28 22:48 ` [PATCH v7 " Dmitry Kurochkin
2012-01-28 22:54 ` Daniel Schoepe
2011-10-10 13:39 ` [PATCH v6 " Daniel Schoepe
2011-10-13 14:09 ` [PATCH] emacs-hello: Do not calculate the count of the messages in Michal Sojka
2012-01-16 11:33 ` David Edmondson
2012-01-16 12:39 ` Daniel Schoepe
2012-01-16 10:59 ` [PATCH v6 0/2] emacs: User-defined sections in notmuch-hello David Edmondson
2012-01-16 11:13 ` Daniel Schoepe
2012-02-17 7:48 ` [PATCH v9 " Dmitry Kurochkin
2012-02-17 7:48 ` [PATCH v9 1/2] " Dmitry Kurochkin
2012-02-17 7:48 ` [PATCH v9 2/2] emacs: Tests for user-defined sections Dmitry Kurochkin
2012-02-17 14:48 ` [PATCH v10 0/2] emacs: User-defined sections in notmuch-hello Dmitry Kurochkin
2012-02-17 14:48 ` [PATCH v10 1/2] " Dmitry Kurochkin
2012-03-01 12:36 ` David Bremner
2012-03-01 14:57 ` Michal Sojka
2012-03-01 15:00 ` Dmitry Kurochkin
2012-03-07 19:53 ` Pieter Praet
2012-03-07 20:04 ` Daniel Schoepe
2012-03-07 20:11 ` David Bremner
2012-02-17 14:48 ` [PATCH v10 2/2] emacs: Tests for user-defined sections Dmitry Kurochkin
2012-02-18 22:10 ` [PATCH v10 0/2] emacs: User-defined sections in notmuch-hello Michal Sojka
2012-02-18 22:12 ` [PATCH] emacs-hello: Do not calculate the count of the messages in hidden sections Michal Sojka
2012-03-01 22:18 ` Mark Walters
2012-03-02 0:34 ` Daniel Schoepe
2012-03-02 0:36 ` Daniel Schoepe
2012-03-05 2:00 ` Dmitry Kurochkin
2012-03-10 14:23 ` David Bremner
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=87box48jkc.fsf@steelpick.2x.cz \
--to=sojkam1@fel.cvut.cz \
--cc=daniel.schoepe@googlemail.com \
--cc=notmuch@notmuchmail.org \
/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).