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 AC267431FBD for ; Sat, 18 Jan 2014 06:53:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.201 X-Spam-Level: X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, 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 hnfoeTRCc3rQ for ; Sat, 18 Jan 2014 06:53:08 -0800 (PST) Received: from mail-we0-f180.google.com (mail-we0-f180.google.com [74.125.82.180]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 0D261431FBC for ; Sat, 18 Jan 2014 06:53:07 -0800 (PST) Received: by mail-we0-f180.google.com with SMTP id q59so5627433wes.11 for ; Sat, 18 Jan 2014 06:53:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+z1/kV6bt2IkfPJuiLYN/Vev3OukB1BtEEVpT0yP9HE=; b=X/DI/LhMGhdVS/TTbitfgB73Ds8I54mKBVmCszOKBDybbHYMQDau9e3rqwtlIbU/NB WblGmtd3cJfUSbBXYXgk398KpVxjT99m8CvvNgaOgmpMUb12D9Rt4Rfe+h/rc1f9fx0x sCq7FfYz1FskXgu9QAQ3NOROtZhTVUw8Zus7ZIygal70Suk8BzCEnsuNTTlCIBZe9oTa XwbmQBi9kRillDFTxvbsmX2sCZWRbPxYpz4/ow/aDmiERnwvU9e7+/0MmyP9yovDcU6h YUm5Oz16RidiwuRXjsqivzlcv80LOMqkdiQ8R4XKRaVsjSmhOJLE+OiqGMhPOLUBgVWe u84g== X-Received: by 10.180.9.232 with SMTP id d8mr2903486wib.25.1390056784068; Sat, 18 Jan 2014 06:53:04 -0800 (PST) Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) by mx.google.com with ESMTPSA id z1sm3008084wjq.19.2014.01.18.06.53.02 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 18 Jan 2014 06:53:03 -0800 (PST) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH] emacs: help: add link to info node Date: Sat, 18 Jan 2014 14:52:53 +0000 Message-Id: <1390056773-14227-1-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <87y52dczwv.fsf@qmul.ac.uk> References: <87y52dczwv.fsf@qmul.ac.uk> 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: Sat, 18 Jan 2014 14:53:13 -0000 Add a link to the info documentation from the keybindings help page. --- For anyone who wants to try this out. (Only works in hello and search mode while there are no other info nodes). Best wishes Mark emacs/notmuch-lib.el | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 2be409b..228680b 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -331,10 +331,18 @@ its prefixed behavior by setting the 'notmuch-prefix-doc property of its command symbol." (interactive) (let* ((mode major-mode) + (parent-mode-name mode-name) + (info-node (concat "(notmuch-emacs)" mode-name)) (doc (substitute-command-keys (notmuch-substitute-command-keys (documentation mode t))))) (with-current-buffer (generate-new-buffer "*notmuch-help*") (insert doc) (goto-char (point-min)) + (forward-line 2) + (insert-button (concat "Info documentation for " parent-mode-name ".") + 'action `(lambda (x) (info ,info-node))) + (insert "\n\n") + (goto-char (point-min)) + (forward-button 1) (set-buffer-modified-p nil) (view-buffer (current-buffer) 'kill-buffer-if-not-modified)))) -- 1.7.9.1