Re: [PATCH v2 0/5] emacs: notmuch-hello status message refresh hook, etc
authorJani Nikula <jani@nikula.org>
Tue, 4 Sep 2012 20:30:39 +0000 (23:30 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:22 +0000 (09:49 -0800)
fc/73b2af0a1fe38c22ce099e6053ac41ee82e1c7 [new file with mode: 0644]

diff --git a/fc/73b2af0a1fe38c22ce099e6053ac41ee82e1c7 b/fc/73b2af0a1fe38c22ce099e6053ac41ee82e1c7
new file mode 100644 (file)
index 0000000..312b9b7
--- /dev/null
@@ -0,0 +1,126 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 4A0E4431FB6\r
+       for <notmuch@notmuchmail.org>; Tue,  4 Sep 2012 13:30:47 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 2fXUbiyCPCS4 for <notmuch@notmuchmail.org>;\r
+       Tue,  4 Sep 2012 13:30:46 -0700 (PDT)\r
+Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com\r
+       [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 6072F431FAF\r
+       for <notmuch@notmuchmail.org>; Tue,  4 Sep 2012 13:30:46 -0700 (PDT)\r
+Received: by lbbgk1 with SMTP id gk1so3816391lbb.26\r
+       for <notmuch@notmuchmail.org>; Tue, 04 Sep 2012 13:30:43 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+       :mime-version:content-type:x-gm-message-state;\r
+       bh=H41GEVVL4O1BCFuH6Lp91oDzRfECEuPIs7im2Xs1YyY=;\r
+       b=d/7BEJSMxnHZgZ2D7RJXXzKLAZLfbZ2CuztKH0I46+f9v8H+awjLNseFqibUSTLVLk\r
+       72ijYDA+A2gESxjsmeEXqqd7TcRyU3w7EseBARPWl0fDyMCowJEiURR9CwFCGvYt/n0n\r
+       sGHsZjH95KHOSpCVmW9oH4422IhS/4EUy0q2Iqr9BCpLUy7bmDZZu2tMLi46YeRZpML1\r
+       n5RfJoCJ/JLbNVxm/BuyzqPkW3EmwCKL1C+oC6YEQjlDUEi2Bs9/BfOYP0gvw1i6h+ou\r
+       XVBjhhosa43STF1FHw1U2Lh//Gzs5iWz9VY6PBq4i2MefSREqhrymtNpg7f5Kd9X54oG\r
+       aK8A==\r
+Received: by 10.112.88.6 with SMTP id bc6mr6984061lbb.131.1346790643517;\r
+       Tue, 04 Sep 2012 13:30:43 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.\r
+       [80.223.81.27])\r
+       by mx.google.com with ESMTPS id nf5sm17475806lab.3.2012.09.04.13.30.41\r
+       (version=SSLv3 cipher=OTHER); Tue, 04 Sep 2012 13:30:42 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Michal Sojka <sojkam1@fel.cvut.cz>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 0/5] emacs: notmuch-hello status message refresh hook,\r
+       etc\r
+In-Reply-To: <87vcftbtmw.fsf@steelpick.2x.cz>\r
+References: <cover.1346596156.git.jani@nikula.org>\r
+       <87vcftbtmw.fsf@steelpick.2x.cz>\r
+User-Agent: Notmuch/0.14+41~g76f353e (http://notmuchmail.org) Emacs/23.3.1\r
+       (i686-pc-linux-gnu)\r
+Date: Tue, 04 Sep 2012 23:30:39 +0300\r
+Message-ID: <877gs9msy8.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQkrQlqE0LmaBrNH/JXO8uDI1MIoBuK9UHX8kbmhYuhahBnt8vxrSutpsNIAJMwIJqsVZu53\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 04 Sep 2012 20:30:47 -0000\r
+\r
+On Tue, 04 Sep 2012, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
+> On Sun, Sep 02 2012, Jani Nikula wrote:\r
+>> Hi all, v2 of [1] addressing review comments: added NEWS, improved\r
+>> documentation, made the query customizable.\r
+>>\r
+>> [1]\r
+>>     id:"37899e28dbf67e4620a53279a869be3174c02d6f.1339775602.git.jani@nikula.org"\r
+>\r
+> Hello Jani,\r
+>\r
+> if I understand correctly, the goal of this patchset is to display the\r
+> message with the difference in the number of messages before and after\r
+> refresh of notmuch-hello.\r
+\r
+Difference between two refreshes of notmuch-hello to be specific.\r
+\r
+> I think the current implementation is unnecessarily complicated. It\r
+> would be sufficient to implement this directly in `notmuch-hello'\r
+> without any hook. If `notmuch-hello-refresh-status-query' is nil\r
+> (default) no message would be shown. If it is configured to something\r
+> else, the message would be shown provided that no-display is nil. This\r
+> way you don't have to break existing user's hooks and achieve the same\r
+> behavior, don't you?\r
+\r
+I think it would be useful to pass no-display to hooks anyway,\r
+regardless of the use here. I don't see that as a big reason to do this\r
+one way or the other. Having this implemented directly in notmuch-hello\r
+does not make this less complicated either. The only difference would be\r
+having an if clause within notmuch-hello rather than an option in\r
+notmuch-hello-refresh-hook.\r
+\r
+This leaves us the matter of style. Tomi also expressed preference for\r
+having this built-in to notmuch-hello rather than as a hook. I like\r
+having it as a hook for a number of reasons:\r
+\r
+* I think it provides a nice abstract interface without messing with the\r
+  rest of notmuch-hello.\r
+\r
+* I think toggling hooks on and off in the customization interface is\r
+  nice (see e.g. notmuch-show-insert-text/plain-hook under\r
+  notmuch-show). No need to add more and more customizations for things\r
+  that can be options.\r
+\r
+* If the user doesn't like the messages, it's easy to copy-paste the\r
+  code to .emacs, modify, and add-hook.\r
+\r
+* It serves as an example of what can be done in the notmuch-hello\r
+  hooks.\r
+\r
+If you and Tomi still insist on not having this as a hook, changing it\r
+is not a big deal (faster than writing this email *sigh*). But even then\r
+I'd propose merging patches 1-3 as those allow the user to write the\r
+kind of hook he chooses.\r
+\r
+\r
+BR,\r
+Jani.\r