From: Jani Nikula <jani@nikula.org>
To: Michal Sojka <sojkam1@fel.cvut.cz>, notmuch@notmuchmail.org
Subject: Re: [PATCH v2 0/5] emacs: notmuch-hello status message refresh hook, etc
Date: Tue, 04 Sep 2012 23:30:39 +0300 [thread overview]
Message-ID: <877gs9msy8.fsf@nikula.org> (raw)
In-Reply-To: <87vcftbtmw.fsf@steelpick.2x.cz>
On Tue, 04 Sep 2012, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> On Sun, Sep 02 2012, Jani Nikula wrote:
>> Hi all, v2 of [1] addressing review comments: added NEWS, improved
>> documentation, made the query customizable.
>>
>> [1]
>> id:"37899e28dbf67e4620a53279a869be3174c02d6f.1339775602.git.jani@nikula.org"
>
> Hello Jani,
>
> if I understand correctly, the goal of this patchset is to display the
> message with the difference in the number of messages before and after
> refresh of notmuch-hello.
Difference between two refreshes of notmuch-hello to be specific.
> I think the current implementation is unnecessarily complicated. It
> would be sufficient to implement this directly in `notmuch-hello'
> without any hook. If `notmuch-hello-refresh-status-query' is nil
> (default) no message would be shown. If it is configured to something
> else, the message would be shown provided that no-display is nil. This
> way you don't have to break existing user's hooks and achieve the same
> behavior, don't you?
I think it would be useful to pass no-display to hooks anyway,
regardless of the use here. I don't see that as a big reason to do this
one way or the other. Having this implemented directly in notmuch-hello
does not make this less complicated either. The only difference would be
having an if clause within notmuch-hello rather than an option in
notmuch-hello-refresh-hook.
This leaves us the matter of style. Tomi also expressed preference for
having this built-in to notmuch-hello rather than as a hook. I like
having it as a hook for a number of reasons:
* I think it provides a nice abstract interface without messing with the
rest of notmuch-hello.
* I think toggling hooks on and off in the customization interface is
nice (see e.g. notmuch-show-insert-text/plain-hook under
notmuch-show). No need to add more and more customizations for things
that can be options.
* If the user doesn't like the messages, it's easy to copy-paste the
code to .emacs, modify, and add-hook.
* It serves as an example of what can be done in the notmuch-hello
hooks.
If you and Tomi still insist on not having this as a hook, changing it
is not a big deal (faster than writing this email *sigh*). But even then
I'd propose merging patches 1-3 as those allow the user to write the
kind of hook he chooses.
BR,
Jani.
next prev parent reply other threads:[~2012-09-04 20:30 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 ` [PATCH v2 0/5] emacs: notmuch-hello status message refresh hook, etc Tomi Ollila
2012-09-04 17:11 ` Michal Sojka
2012-09-04 20:30 ` Jani Nikula [this message]
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=877gs9msy8.fsf@nikula.org \
--to=jani@nikula.org \
--cc=notmuch@notmuchmail.org \
--cc=sojkam1@fel.cvut.cz \
/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).