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 4A0E4431FB6 for ; Tue, 4 Sep 2012 13:30:47 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 2fXUbiyCPCS4 for ; Tue, 4 Sep 2012 13:30:46 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 6072F431FAF for ; Tue, 4 Sep 2012 13:30:46 -0700 (PDT) Received: by lbbgk1 with SMTP id gk1so3816391lbb.26 for ; Tue, 04 Sep 2012 13:30:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type:x-gm-message-state; bh=H41GEVVL4O1BCFuH6Lp91oDzRfECEuPIs7im2Xs1YyY=; b=d/7BEJSMxnHZgZ2D7RJXXzKLAZLfbZ2CuztKH0I46+f9v8H+awjLNseFqibUSTLVLk 72ijYDA+A2gESxjsmeEXqqd7TcRyU3w7EseBARPWl0fDyMCowJEiURR9CwFCGvYt/n0n sGHsZjH95KHOSpCVmW9oH4422IhS/4EUy0q2Iqr9BCpLUy7bmDZZu2tMLi46YeRZpML1 n5RfJoCJ/JLbNVxm/BuyzqPkW3EmwCKL1C+oC6YEQjlDUEi2Bs9/BfOYP0gvw1i6h+ou XVBjhhosa43STF1FHw1U2Lh//Gzs5iWz9VY6PBq4i2MefSREqhrymtNpg7f5Kd9X54oG aK8A== Received: by 10.112.88.6 with SMTP id bc6mr6984061lbb.131.1346790643517; Tue, 04 Sep 2012 13:30:43 -0700 (PDT) Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. [80.223.81.27]) by mx.google.com with ESMTPS id nf5sm17475806lab.3.2012.09.04.13.30.41 (version=SSLv3 cipher=OTHER); Tue, 04 Sep 2012 13:30:42 -0700 (PDT) From: Jani Nikula To: Michal Sojka , notmuch@notmuchmail.org Subject: Re: [PATCH v2 0/5] emacs: notmuch-hello status message refresh hook, etc In-Reply-To: <87vcftbtmw.fsf@steelpick.2x.cz> References: <87vcftbtmw.fsf@steelpick.2x.cz> User-Agent: Notmuch/0.14+41~g76f353e (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) Date: Tue, 04 Sep 2012 23:30:39 +0300 Message-ID: <877gs9msy8.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Gm-Message-State: ALoCoQkrQlqE0LmaBrNH/JXO8uDI1MIoBuK9UHX8kbmhYuhahBnt8vxrSutpsNIAJMwIJqsVZu53 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, 04 Sep 2012 20:30:47 -0000 On Tue, 04 Sep 2012, Michal Sojka 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.