[PATCH 2/2] emacs: notmuch-show-mode should force less behaviour.
authorDavid Edmondson <dme@dme.org>
Mon, 15 Nov 2010 13:48:15 +0000 (13:48 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:31 +0000 (09:37 -0800)
45/f355788543eacc504eb1b617a6ca038d8465a1 [new file with mode: 0644]

diff --git a/45/f355788543eacc504eb1b617a6ca038d8465a1 b/45/f355788543eacc504eb1b617a6ca038d8465a1
new file mode 100644 (file)
index 0000000..d32046b
--- /dev/null
@@ -0,0 +1,94 @@
+Return-Path: <dme@dme.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 5C64C40DBC8\r
+       for <notmuch@notmuchmail.org>; Mon, 15 Nov 2010 05:51:00 -0800 (PST)\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, RCVD_IN_DNSWL_NONE=-0.0001] 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 fOIwaNxAF+sV for <notmuch@notmuchmail.org>;\r
+       Mon, 15 Nov 2010 05:50:49 -0800 (PST)\r
+Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
+ [74.125.82.45])       by olra.theworths.org (Postfix) with ESMTP id 474F540DBDA       for\r
+ <notmuch@notmuchmail.org>; Mon, 15 Nov 2010 05:50:42 -0800 (PST)\r
+Received: by wwb31 with SMTP id 31so2594981wwb.2\r
+       for <notmuch@notmuchmail.org>; Mon, 15 Nov 2010 05:50:41 -0800 (PST)\r
+Received: by 10.227.153.21 with SMTP id i21mr6138428wbw.26.1289829041048;\r
+       Mon, 15 Nov 2010 05:50:41 -0800 (PST)\r
+Received: from ut.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com\r
+       [81.149.164.25])\r
+       by mx.google.com with ESMTPS id f14sm5070297wbe.8.2010.11.15.05.50.34\r
+       (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
+       Mon, 15 Nov 2010 05:50:38 -0800 (PST)\r
+Received: by ut.hh.sledj.net (Postfix, from userid 1000)\r
+       id DA1DB59405B; Mon, 15 Nov 2010 13:48:18 +0000 (GMT)\r
+From: David Edmondson <dme@dme.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/2] emacs: notmuch-show-mode should force less behaviour.\r
+Date: Mon, 15 Nov 2010 13:48:15 +0000\r
+Message-Id: <1289828895-7594-2-git-send-email-dme@dme.org>\r
+X-Mailer: git-send-email 1.7.2.3\r
+In-Reply-To: <87wroeya0o.fsf@ut.hh.sledj.net>\r
+References: <87wroeya0o.fsf@ut.hh.sledj.net>\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: Mon, 15 Nov 2010 13:51:00 -0000\r
+\r
+Move the enabling of `goto-address-mode' and `visual-line-mode' to\r
+`notmuch-show-hook' in order that a user may choose to not use them.\r
+---\r
+ emacs/notmuch-show.el |   15 ++++++++-------\r
+ 1 files changed, 8 insertions(+), 7 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 002c2fd..c9d086c 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -69,7 +69,14 @@ any given message."\r
+   "A list of functions called to decorate the headers listed in\r
+ `notmuch-message-headers'.")\r
\r
+-(defcustom notmuch-show-hook nil\r
++(defun notmuch-show-turn-on-goto-address-mode ()\r
++  (goto-address-mode t))\r
++\r
++(defun notmuch-show-turn-on-visual-line-mode ()\r
++  (visual-line-mode t))\r
++\r
++(defcustom notmuch-show-hook '(notmuch-show-turn-on-goto-address-mode\r
++                             notmuch-show-turn-on-visual-line-mode)\r
+   "Functions called after populating a `notmuch-show' buffer."\r
+   :group 'notmuch\r
+   :type 'hook)\r
+@@ -648,12 +655,6 @@ function is used. "\r
+         (notmuch-show-insert-forest\r
+          (notmuch-query-get-threads basic-args))))\r
\r
+-      ;; Enable buttonisation of URLs and email addresses in the\r
+-      ;; buffer.\r
+-      (goto-address-mode t)\r
+-      ;; Act on visual lines rather than logical lines.\r
+-      (visual-line-mode t)\r
+-\r
+       (run-hooks 'notmuch-show-hook))\r
\r
+     ;; Move straight to the first open message\r
+-- \r
+1.7.2.3\r
+\r