Re: [PATCH 1/3] emacs: add no-display arg to notmuch-hello-refresh-hook
authorAustin Clements <amdragon@MIT.EDU>
Fri, 13 Jul 2012 03:38:50 +0000 (23:38 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:48:15 +0000 (09:48 -0800)
53/b4cc056cf317f6ac707ffc56b688765b8b09ce [new file with mode: 0644]

diff --git a/53/b4cc056cf317f6ac707ffc56b688765b8b09ce b/53/b4cc056cf317f6ac707ffc56b688765b8b09ce
new file mode 100644 (file)
index 0000000..6e0a588
--- /dev/null
@@ -0,0 +1,121 @@
+Return-Path: <amdragon@mit.edu>\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 22F6C431FC4\r
+       for <notmuch@notmuchmail.org>; Thu, 12 Jul 2012 20:38:55 -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 n4TURv6Jpj07 for <notmuch@notmuchmail.org>;\r
+       Thu, 12 Jul 2012 20:38:53 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU\r
+       [18.7.68.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 532C9431FAE\r
+       for <notmuch@notmuchmail.org>; Thu, 12 Jul 2012 20:38:53 -0700 (PDT)\r
+X-AuditID: 12074422-b7f1f6d00000090b-ab-4fff984c5370\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+       by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 64.51.02315.C489FFF4; Thu, 12 Jul 2012 23:38:52 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q6D3cqlj006672; \r
+       Thu, 12 Jul 2012 23:38:52 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q6D3coMa008373\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Thu, 12 Jul 2012 23:38:51 -0400 (EDT)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1SpWiQ-0005ao-Hn; Thu, 12 Jul 2012 23:38:50 -0400\r
+Date: Thu, 12 Jul 2012 23:38:50 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Jani Nikula <jani@nikula.org>\r
+Subject: Re: [PATCH 1/3] emacs: add no-display arg to\r
+       notmuch-hello-refresh-hook\r
+Message-ID: <20120713033850.GM7332@mit.edu>\r
+References:\r
+ <37899e28dbf67e4620a53279a869be3174c02d6f.1339775602.git.jani@nikula.org>\r
+       <20120710014946.GB7332@mit.edu>\r
+       <CAB+hUn8W_x_BNbzmWuyzReX-oaP67OK0t8y-yNZ5cKfRNdwOmg@mail.gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=iso-8859-1\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: 8bit\r
+In-Reply-To:\r
+ <CAB+hUn8W_x_BNbzmWuyzReX-oaP67OK0t8y-yNZ5cKfRNdwOmg@mail.gmail.com>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFprDKsWRmVeSWpSXmKPExsUixCmqrOsz47+/wZ2lphZN050trt+cyezA\r
+       5HHr/mt2j2erbjEHMEVx2aSk5mSWpRbp2yVwZXTfWcde8Feg4ubTN+wNjK28XYycHBICJhIn\r
+       rm5ihLDFJC7cW8/WxcjFISSwj1Hi8rc3UM4GRoklS/YwQzgnmST2N09jgnCWMEo0333CBtLP\r
+       IqAqceL2UVYQm01AQ2Lb/uVgc0UEFCU2n9wPZjMLSEt8+93MBGILCwRJ9N46CGbzCmhLtG24\r
+       zQ63e8KSjcwQCUGJkzOfsEA060js3HoHaBkH2KDl/zggwvISzVtng5VzCgRKNDw6CWaLCqhI\r
+       TDm5jW0Co/AsJJNmIZk0C2HSLCSTFjCyrGKUTcmt0s1NzMwpTk3WLU5OzMtLLdI11cvNLNFL\r
+       TSndxAiKBHYXpR2MPw8qHWIU4GBU4uH9FfvfX4g1say4MvcQoyQHk5Io78rJQCG+pPyUyozE\r
+       4oz4otKc1OJDjBIczEoivArTgHK8KYmVValF+TApaQ4WJXHeayk3/YUE0hNLUrNTUwtSi2Cy\r
+       MhwcShK8q6cDNQoWpaanVqRl5pQgpJk4OEGG8wANnwFSw1tckJhbnJkOkT/FqCglztsMkhAA\r
+       SWSU5sH1whLVK0ZxoFeEeeeDVPEAkxxc9yugwUxAg2f9/AcyuCQRISXVwBjP8Ichx29dwMSA\r
+       0kb5+pPPUhJ1Dnabfg1a12bPcdCVW7h1g9H0jkvHjzccnjd5gsuqNtnagOjAt8zr0t5sOdW7\r
+       4Xzkxbuc/08V+Ub2Xz1h9WK2pPimHwc3nPrOErodmK71LmSJfbmR9tHY8/abOFZeZd3q5J5P\r
+       drnOpkV5hvNjGvTXT97YpMRSnJFoqMVcVJwIAGZOpzAvAwAA\r
+Cc: notmuch@notmuchmail.org\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: Fri, 13 Jul 2012 03:38:55 -0000\r
+\r
+Quoth Jani Nikula on Jul 10 at  8:10 am:\r
+>    On Jul 10, 2012 4:49 AM, "Austin Clements" <[1]amdragon@mit.edu> wrote:\r
+>    >\r
+>    > Quoth Jani Nikula on Jun 15 at  6:53 pm:\r
+>    > > Add no-display arg to notmuch-hello-refresh-hook to allow each hook to\r
+>    > > decide what is appropriate when no-display is t, which is typically\r
+>    > > the case when called non-interactively. This is used by the following\r
+>    > > patch.\r
+>    > >\r
+>    > > This breaks existing hooks people might have, which will now need to\r
+>    > > accept the argument.\r
+>    > >\r
+>    > > Signed-off-by: Jani Nikula <[2]jani@nikula.org>\r
+>    >\r
+>    > This seems like an overloaded use of no-display.  If I'm reading the\r
+>    > code right, no-display indicates whether or not the notmuch-hello\r
+>    > buffer should be switched to and seems like a workaround for some\r
+>    > particular corner-case (I'm not even sure what).  This seems like a\r
+>    > strange condition to predicate a hook on (but maybe I just don't\r
+>    > understand).  What condition, abstractly speaking, is\r
+>    > notmuch-hello-refresh-status-message trying to run under?\r
+> \r
+>    IIUC, no-display is useful for calling refresh from outside of emacs, e.g.\r
+>    from post-new hook in an automated fashion, so you can have an up-to-date\r
+>    buffer when you switch to it. There's no point in displaying the refresh\r
+>    message when you don't also switch to the buffer, is there? And this way\r
+>    you'll get the diff between the manual (through user interaction)\r
+>    refreshes of the buffer, not between two cron jobs.\r
+\r
+Oh, I see.  This makes more sense.  The only use of no-display in the\r
+notmuch code I can find appears to be to refresh the hello buffer when\r
+you exit a search buffer started from hello, when it might actually\r
+make sense to run the difference hook in your patch (I assume it wants\r
+to avoid switching to the hello buffer in this case because the buffer\r
+order may have changed?  Of course, there are other ways to get to the\r
+hello buffer other than exiting a search buffer started from it...  I\r
+found all of this code very confusing).\r
+\r
+Maybe this just needs better documentation?\r