[RFC PATCH 4/4] emacs: add notmuch hello refresh hook to place point in a widget
authorJani Nikula <jani@nikula.org>
Tue, 17 Apr 2012 08:35:25 +0000 (08:35 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:30 +0000 (09:46 -0800)
72/acfc07557416113866b55b78f5faf77570e692 [new file with mode: 0644]

diff --git a/72/acfc07557416113866b55b78f5faf77570e692 b/72/acfc07557416113866b55b78f5faf77570e692
new file mode 100644 (file)
index 0000000..4ca039a
--- /dev/null
@@ -0,0 +1,107 @@
+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 D5B67431FC7\r
+       for <notmuch@notmuchmail.org>; Tue, 17 Apr 2012 01:35:44 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\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 JBtSyiWSWup6 for <notmuch@notmuchmail.org>;\r
+       Tue, 17 Apr 2012 01:35:43 -0700 (PDT)\r
+Received: from mail-qc0-f181.google.com (mail-qc0-f181.google.com\r
+       [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id DE4B6431FCB\r
+       for <notmuch@notmuchmail.org>; Tue, 17 Apr 2012 01:35:39 -0700 (PDT)\r
+Received: by mail-qc0-f181.google.com with SMTP id k26so4608191qcs.26\r
+       for <notmuch@notmuchmail.org>; Tue, 17 Apr 2012 01:35:39 -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:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
+       :in-reply-to:references:x-gm-message-state;\r
+       bh=9jyVHuPJah+agZjkc2BgwHJ1f4IInR1ml8EZTVVyC2Y=;\r
+       b=OPYzZYPDccarm1UJEFcpgzfg6jQsJtlSpGlYtUpJUt6mRJwdMqM65Nu6lEk0xIZhoJ\r
+       eRz1uj1pAMVkYrTV2BSB93uX/H2pTMWOCy9OdnraaJ9e5TEhahj4YQJZTdpOaOZIGLyz\r
+       32VA3WBL4IYIEjfpAJniK61weJmHL53xpmGnhyoCOQ6t9VBLa7zwso1bFteFPCUNsUPn\r
+       rhhT7A9owdrBwvT7el6XwiZw3E2g0a5IseDum6EE6mtdV6GyZB9FdTkKXT4riNncmqBX\r
+       cOyZ9+/Ew/gxQqrpBinTSIsaDoH6AA0w1T1PP7maExl8LdP9SKvojIMBzVtOtiMYlywn\r
+       BpTw==\r
+Received: by 10.229.137.147 with SMTP id w19mr5885686qct.132.1334651739517;\r
+       Tue, 17 Apr 2012 01:35:39 -0700 (PDT)\r
+Received: from localhost (nikula.org. [92.243.24.172])\r
+       by mx.google.com with ESMTPS id dx8sm30146864qab.5.2012.04.17.01.35.38\r
+       (version=SSLv3 cipher=OTHER); Tue, 17 Apr 2012 01:35:38 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [RFC PATCH 4/4] emacs: add notmuch hello refresh hook to place point\r
+       in a widget\r
+Date: Tue, 17 Apr 2012 08:35:25 +0000\r
+Message-Id:\r
+ <c846baf8b367f94d1936887100bc584e7f86e0af.1334651669.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.1\r
+In-Reply-To:\r
+ <bcfdc0d1969997e89e5abe0b320d77ee2109796a.1334651669.git.jani@nikula.org>\r
+References:\r
+ <bcfdc0d1969997e89e5abe0b320d77ee2109796a.1334651669.git.jani@nikula.org>\r
+In-Reply-To:\r
+ <bcfdc0d1969997e89e5abe0b320d77ee2109796a.1334651669.git.jani@nikula.org>\r
+References:\r
+ <bcfdc0d1969997e89e5abe0b320d77ee2109796a.1334651669.git.jani@nikula.org>\r
+X-Gm-Message-State:\r
+ ALoCoQkbuKr3XjXeywYEX3SNAc8Dv2Xt46hFiApavYY2a23ViD9sJV3/VnQGuZUGlDsRkwnRXRag\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, 17 Apr 2012 08:35:45 -0000\r
+\r
+Add support for putting point to a widget after refresh through a\r
+hook. This approximates the old behaviour.\r
+---\r
+ emacs/notmuch-hello.el |    8 +++++++-\r
+ 1 files changed, 7 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
+index 13da146..07e64d4 100644\r
+--- a/emacs/notmuch-hello.el\r
++++ b/emacs/notmuch-hello.el\r
+@@ -148,7 +148,8 @@ International Bureau of Weights and Measures."\r
+ (defcustom notmuch-hello-refresh-hook nil\r
+   "Functions called after updating a `notmuch-hello' buffer."\r
+   :type 'hook\r
+-  :options '(notmuch-hello-refresh-status-message)\r
++  :options '(notmuch-hello-refresh-status-message\r
++           notmuch-hello-refresh-point-to-widget)\r
+   :group 'notmuch-hello\r
+   :group 'notmuch-hooks)\r
\r
+@@ -752,6 +753,11 @@ Used internally by `notmuch-hello-refresh-status-message'.")\r
+                      (notmuch-hello-nice-number (- diff-count))))))\r
+       (setq notmuch-hello-refresh-count new-count))))\r
\r
++(defun notmuch-hello-refresh-point-to-widget (no-display)\r
++  "Hook to place point to widget after notmuch-hello refresh."\r
++  (widget-backward 1)\r
++  (widget-forward 1))\r
++\r
+ ;;;###autoload\r
+ (defun notmuch-hello (&optional no-display)\r
+   "Run notmuch and display saved searches, known tags, etc."\r
+-- \r
+1.7.1\r
+\r