unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
Subject: Re: [PATCH v2 0/5] emacs: notmuch-hello status message refresh hook, etc
Date: Sun, 02 Sep 2012 19:00:58 +0300	[thread overview]
Message-ID: <m2sjb0wh1h.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <cover.1346596156.git.jani@nikula.org>

On Sun, Sep 02 2012, Jani Nikula <jani@nikula.org> 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

  parent reply	other threads:[~2012-09-02 16:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-02 14:48 [PATCH v2 0/5] emacs: notmuch-hello status message refresh hook, etc Jani Nikula
2012-09-02 14:48 ` [PATCH v2 1/5] emacs: document the notmuch-hello no-display argument Jani Nikula
2012-09-02 14:48 ` [PATCH v2 2/5] emacs: add no-display arg to notmuch-hello-refresh-hook Jani Nikula
2012-09-07  7:56   ` Tomi Ollila
2012-09-07  8:03     ` Jani Nikula
2012-09-02 14:48 ` [PATCH v2 3/5] test: fix hook-counter to accept the new no-display param Jani Nikula
2012-09-03 12:15   ` Michal Nazarewicz
2012-09-02 14:48 ` [PATCH v2 4/5] emacs: add notmuch hello refresh hook to display message count change Jani Nikula
2012-09-02 14:48 ` [PATCH v2 5/5] NEWS: notmuch-hello refresh hook changes Jani Nikula
2012-09-02 16:00 ` Tomi Ollila [this message]
2012-09-04 17:11 ` [PATCH v2 0/5] emacs: notmuch-hello status message refresh hook, etc Michal Sojka
2012-09-04 20:30   ` Jani Nikula
2012-09-05 21:08     ` Michal Sojka
2012-09-06 15:28       ` Tomi Ollila

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=m2sjb0wh1h.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=jani@nikula.org \
    --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).