[PATCH 0/2] emacs: User-defined sections in notmuch-hello
Michal Sojka
sojkam1 at fel.cvut.cz
Tue Jul 5 07:09:14 PDT 2011
On Tue, 05 Jul 2011, Daniel Schoepe wrote:
Non-text part: multipart/signed
> On Tue, 05 Jul 2011 02:00:33 +0200, Michal Sojka <sojkam1 at fel.cvut.cz> wrote:
> > First, the customization interface for the custom sections (not the
> > predefined ones) is very confusing. I was not able to use it at all.
> > Instead I hacked the source code (see below) to add my section to the
> > notmuch-hello-sections list.
>
> What specifically did you find confusing?
Sorry for not being clear - I wrote the mail late at night, looking
forward to some sleep :)
> The first customization-option is intended for sections like the all
> tags section which various configuration options which should be
> explained by the docstrings next to the options. The second item
> allows saved-searches-like sections.
I'm talking about notmuch-hello-section. It seems it is not possible
easily specify there your own function. You can either select a
predefined section or "Customized section", which is in fact "Customized
all-tags section". So I propose to renaming this entry like this and
adding another one called "Custom function", where you could enter the
name of your function.
> By the way: Instead of editing the source directly, you can also put all
> customizations like that in your configuration files and set
> notmuch-hello-sections from there. Nevertheless your inbox-display
> functions look useful in general so they should indeed be included.
I know that, but I wanted to do the experiment quickly and this was the
easiest way for me. Regarding setting of notmuch-hello-sections from
.emacs, I prefer customizing it through the customization interface
because when somebody else introduces a new section it is more
convenient for me to try it by choosing from predefined values than
modifying that in .emacs.
> > And last but not least, you allow quite wild modifications of tag
> > searches (e.g. in notmuch-hello-generate-tag-alist), but is might be
> > also useful to use such modifications for other searches. For example, I
> > want to modify the saved searches in a similar way.
>
> Are you referring to things like specifying a filter for each tag or
> count in saved-searches? My thinking was that since you specify each
> item manually anyway, you can append any filter you might want to use
> there. But I guess you're right that it's a bit more convenient to be
> able to specify those once and not having to repeat it for each item.
It seems that I still do not understand what the "Customized section"
was intended to provide. I have to say I'm not able to fully decode the
definition of notmuch-hello-customized-section, but it seems to me that
it is a way how to customize a call to notmuch-hello-insert-all-tags.
I wanted to say that it might be useful to have the similar options for
saved searches. For example, what I do in my notmuch-hello-insert-inbox
is to take the saved searches and filter them by tag:inbox. I guess that
if there is a possibility to do that without coding in elisp, some
people may find it useful. What do you think?
-Michal
More information about the notmuch
mailing list