Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 284B9431FD0 for ; Tue, 5 Jul 2011 07:09:22 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EVTawROLVxrt for ; Tue, 5 Jul 2011 07:09:21 -0700 (PDT) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id CE2FB431FB6 for ; Tue, 5 Jul 2011 07:09:20 -0700 (PDT) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id AC9F519F3346; Tue, 5 Jul 2011 16:09:19 +0200 (CEST) X-Virus-Scanned: IMAP AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, port 10044) with ESMTP id mx4WBy-qvGX4; Tue, 5 Jul 2011 16:09:14 +0200 (CEST) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 72C1519F3349; Tue, 5 Jul 2011 16:09:14 +0200 (CEST) Received: from steelpick.2x.cz (unknown [141.76.49.12]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id 709E3FA004; Tue, 5 Jul 2011 16:09:14 +0200 (CEST) Received: from wsh by steelpick.2x.cz with local (Exim 4.76) (envelope-from ) id 1Qe6JO-0006Od-6y; Tue, 05 Jul 2011 16:09:14 +0200 From: Michal Sojka To: Daniel Schoepe , notmuch@notmuchmail.org Subject: Re: [PATCH 0/2] emacs: User-defined sections in notmuch-hello In-Reply-To: <87pqlpjfsa.fsf@tredergarh.home.box> References: <1309379221-5617-1-git-send-email-daniel.schoepe@googlemail.com> <87wrfxk34u.fsf@steelpick.2x.cz> <87pqlpjfsa.fsf@tredergarh.home.box> User-Agent: Notmuch/0.5-320-g02ea1cf (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Tue, 05 Jul 2011 16:09:14 +0200 Message-ID: <87wrfwyg39.fsf@steelpick.2x.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2011 14:09:22 -0000 On Tue, 05 Jul 2011, Daniel Schoepe wrote: Non-text part: multipart/signed > On Tue, 05 Jul 2011 02:00:33 +0200, Michal Sojka 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