[PATCH 1/2] emacs: notmuch-help: Integrate into the emacs help system.
authorNelson Elhage <nelhage@MIT.EDU>
Fri, 14 May 2010 20:42:06 +0000 (16:42 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:03 +0000 (09:37 -0800)
80/754069dc451448b58ee382de8d95910013763d [new file with mode: 0644]

diff --git a/80/754069dc451448b58ee382de8d95910013763d b/80/754069dc451448b58ee382de8d95910013763d
new file mode 100644 (file)
index 0000000..2bb3e42
--- /dev/null
@@ -0,0 +1,93 @@
+Return-Path: <nelhage@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 43CF5418C3C\r
+       for <notmuch@notmuchmail.org>; Fri, 14 May 2010 13:42:29 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.9\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
+       tests=[BAYES_00=-1.9] autolearn=ham\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 sGs8mbNo-urb for <notmuch@notmuchmail.org>;\r
+       Fri, 14 May 2010 13:42:17 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
+       [18.9.25.14])\r
+       by olra.theworths.org (Postfix) with ESMTP id 417B14196F4\r
+       for <notmuch@notmuchmail.org>; Fri, 14 May 2010 13:42:17 -0700 (PDT)\r
+X-AuditID: 1209190e-b7b82ae000005260-2e-4bedb5a8b93b\r
+Received: from mailhub-auth-3.mit.edu (MAILHUB-AUTH-3.MIT.EDU [18.9.21.43])\r
+       by dmz-mailsec-scanner-3.mit.edu (Symantec Brightmail Gateway) with\r
+       SMTP id 6A.7A.21088.8A5BDEB4; Fri, 14 May 2010 16:42:16 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id o4EKgGnV012898; \r
+       Fri, 14 May 2010 16:42:16 -0400\r
+Received: from PHANATIQUE.MIT.EDU (c-71-192-160-118.hsd1.nh.comcast.net\r
+       [71.192.160.118]) (authenticated bits=0)\r
+       (User authenticated as nelhage@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id o4EKgFnD007726\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+       Fri, 14 May 2010 16:42:16 -0400 (EDT)\r
+From: Nelson Elhage <nelhage@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] emacs: notmuch-help: Integrate into the emacs help\r
+ system.\r
+Date: Fri, 14 May 2010 16:42:06 -0400\r
+Message-Id: <1273869727-32740-2-git-send-email-nelhage@mit.edu>\r
+X-Mailer: git-send-email 1.6.6.30.g1e6fd\r
+In-Reply-To: <1273869727-32740-1-git-send-email-nelhage@mit.edu>\r
+References: <1273869727-32740-1-git-send-email-nelhage@mit.edu>\r
+X-Brightmail-Tracker: AAAAARQpM2I=\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, 14 May 2010 20:42:29 -0000\r
+\r
+Use a *help* buffer like other help commands, and make the [back] and\r
+[forward] links work.\r
+---\r
+ emacs/notmuch.el |   14 ++++++--------\r
+ 1 files changed, 6 insertions(+), 8 deletions(-)\r
+\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index 57e1140..6bf8251 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -174,16 +174,14 @@ For a mouse binding, return nil."\r
+       (setq beg (match-end 0)))\r
+     doc))\r
\r
+-(defun notmuch-help ()\r
++(defun notmuch-help (&optional mode)\r
+   "Display help for the current notmuch mode."\r
+   (interactive)\r
+-  (let* ((mode major-mode)\r
+-       (doc (substitute-command-keys (notmuch-substitute-command-keys (documentation mode t)))))\r
+-    (with-current-buffer (generate-new-buffer "*notmuch-help*")\r
+-      (insert doc)\r
+-      (goto-char (point-min))\r
+-      (set-buffer-modified-p nil)\r
+-      (view-buffer (current-buffer) 'kill-buffer-if-not-modified))))\r
++  (let ((mode (or mode major-mode)))\r
++    (help-setup-xref `(notmuch-help ,mode) (interactive-p))\r
++    (with-help-window (help-buffer)\r
++      (princ (substitute-command-keys\r
++              (notmuch-substitute-command-keys (documentation mode t)))))))\r
\r
+ (defcustom notmuch-search-hook '(hl-line-mode)\r
+   "List of functions to call when notmuch displays the search results."\r
+-- \r
+1.6.6.30.g1e6fd\r
+\r