From: Tomi Ollila Date: Sun, 2 Sep 2012 16:00:58 +0000 (+0300) Subject: Re: [PATCH v2 0/5] emacs: notmuch-hello status message refresh hook, etc X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=4e67b1463b375ad571cfc2377ea513ff0eb653fa;p=notmuch-archives.git Re: [PATCH v2 0/5] emacs: notmuch-hello status message refresh hook, etc --- diff --git a/d9/87b024fa5b0cc9e2d247c5c85aca0136d4e541 b/d9/87b024fa5b0cc9e2d247c5c85aca0136d4e541 new file mode 100644 index 000000000..dcbb7722b --- /dev/null +++ b/d9/87b024fa5b0cc9e2d247c5c85aca0136d4e541 @@ -0,0 +1,123 @@ +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 53028431FB6 + for ; Sun, 2 Sep 2012 09:00:53 -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 xEbL1FDvkx8a for ; + Sun, 2 Sep 2012 09:00:52 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 47D55431FAF + for ; Sun, 2 Sep 2012 09:00:52 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id C12521000E5; + Sun, 2 Sep 2012 19:00:58 +0300 (EEST) +From: Tomi Ollila +To: Jani Nikula , notmuch@notmuchmail.org +Subject: Re: [PATCH v2 0/5] emacs: notmuch-hello status message refresh hook, + etc +In-Reply-To: +References: +User-Agent: Notmuch/0.14+11~gd9bf007 (http://notmuchmail.org) Emacs/24.2.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +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: Sun, 02 Sep 2012 16:00:53 -0000 + +On Sun, Sep 02 2012, Jani Nikula wrote: + +> Hi all, v2 of [1] addressing review comments: added NEWS, improved +> documentation, made the query customizable. + +Hi Jani + +Just today I was looking these older patches below and was about to +comment those when these arrived. + +I think the idea is great, but there is just something in the integration... + +> [1] id:"37899e28dbf67e4620a53279a869be3174c02d6f.1339775602.git.jani@nikula.org" + +I see hooks a great way to extend some functionality outside of that +package instead of touching it. Also, maybe I've been using emacs too +much as these hooks as defcustom seems little weird. Yet as I grepped +'defcustom.*hook' through emacs-24.2/lisp/*.el and I got many hits -- +and some of those even added some ":options" to those (but most those +I looked did not specify anything to choose from). + +That said, I am not _personally_ very thilled about the idea of defining +functions inside notmuch and then that work via a hook... + +Therefore I'd like to propose an alternative way to do this: + +Integrate this change status information to the notmuch-hello-insert-header () +function, disabled by default -- and add customization variable which +can be used to enable it. like: + + Welcome to notmuch. You have 22 195 messages. + + Welcome to notmuch. You have 22 185 messages (-10). + Welcome to notmuch. You have 22 205 messages (+20). + +or second line for the status info. + + +I would enable this feature if implemented this way. Also I would enable +this implemented like this patch series if this is to be applied (I just +give +-0). But this could also be implemented as a hook outside of notmuch +relying that variable no-display is available in dynamic scope -- but without +promising the variable will be there. + +> BR, +> Jani. + +Finally, I hope my comment does not silence the audience but that this +sparks more comment and good solution is used for this useful feature. + +Tomi + +> +> Jani Nikula (5): +> emacs: document the notmuch-hello no-display argument +> emacs: add no-display arg to notmuch-hello-refresh-hook +> test: fix hook-counter to accept the new no-display param +> emacs: add notmuch hello refresh hook to display message count change +> NEWS: notmuch-hello refresh hook changes +> +> NEWS | 18 ++++++++++++++++++ +> emacs/notmuch-hello.el | 46 ++++++++++++++++++++++++++++++++++++++++++++-- +> test/test-lib.el | 2 +- +> 3 files changed, 63 insertions(+), 3 deletions(-) +> +> -- +> 1.7.9.5 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch