unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Edmondson <dme@dme.org>
To: notmuch@notmuchmail.org
Subject: [PATCH 2/2] emacs: notmuch-show-mode should force less behaviour.
Date: Mon, 15 Nov 2010 13:48:15 +0000	[thread overview]
Message-ID: <1289828895-7594-2-git-send-email-dme@dme.org> (raw)
In-Reply-To: <87wroeya0o.fsf@ut.hh.sledj.net>

Move the enabling of `goto-address-mode' and `visual-line-mode' to
`notmuch-show-hook' in order that a user may choose to not use them.
---
 emacs/notmuch-show.el |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 002c2fd..c9d086c 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -69,7 +69,14 @@ any given message."
   "A list of functions called to decorate the headers listed in
 `notmuch-message-headers'.")
 
-(defcustom notmuch-show-hook nil
+(defun notmuch-show-turn-on-goto-address-mode ()
+  (goto-address-mode t))
+
+(defun notmuch-show-turn-on-visual-line-mode ()
+  (visual-line-mode t))
+
+(defcustom notmuch-show-hook '(notmuch-show-turn-on-goto-address-mode
+			       notmuch-show-turn-on-visual-line-mode)
   "Functions called after populating a `notmuch-show' buffer."
   :group 'notmuch
   :type 'hook)
@@ -648,12 +655,6 @@ function is used. "
 	  (notmuch-show-insert-forest
 	   (notmuch-query-get-threads basic-args))))
 
-      ;; Enable buttonisation of URLs and email addresses in the
-      ;; buffer.
-      (goto-address-mode t)
-      ;; Act on visual lines rather than logical lines.
-      (visual-line-mode t)
-
       (run-hooks 'notmuch-show-hook))
 
     ;; Move straight to the first open message
-- 
1.7.2.3

  parent reply	other threads:[~2010-11-15 13:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20101115122937.4525840DBD4@olra.theworths.org>
2010-11-15 13:46 ` id:message-id should be links [Re: [SCM] The notmuchmail.org wiki. branch, master, updated. cf29c08b8cafb56c6ac04917ac2cb1f63f6cda1b] David Edmondson
2010-11-15 13:48   ` [PATCH 1/2] emacs: Turn id:message-id text in messages into links David Edmondson
2010-11-15 13:48   ` David Edmondson [this message]
2010-11-15 21:46   ` id:message-id should be links [Re: [SCM] The notmuchmail.org wiki. branch, master, updated. cf29c08b8cafb56c6ac04917ac2cb1f63f6cda1b] Gregor Zattler
2010-11-22 22:09     ` Xavier Maillard
2010-11-23  6:56       ` David Edmondson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1289828895-7594-2-git-send-email-dme@dme.org \
    --to=dme@dme.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).