Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 05 / a98db29c90f06f988568e6f7885a7c26b9fe67
1 Return-Path: <markwalters1009@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id B6962421169\r
6         for <notmuch@notmuchmail.org>; Tue, 29 Oct 2013 15:56:55 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id FrPdP72x0EOO for <notmuch@notmuchmail.org>;\r
18         Tue, 29 Oct 2013 15:56:50 -0700 (PDT)\r
19 Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com\r
20  [74.125.82.50])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
21  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
22  DAC95429E4B    for <notmuch@notmuchmail.org>; Tue, 29 Oct 2013 15:56:02 -0700\r
23  (PDT)\r
24 Received: by mail-wg0-f50.google.com with SMTP id n12so550112wgh.29\r
25         for <notmuch@notmuchmail.org>; Tue, 29 Oct 2013 15:56:01 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
28         bh=2Tcv2CSocTH6Y2WyrQa6xFZ0FeVkRZGnxf92aUL1Vec=;\r
29         b=jP0hiuin9550k5hgxfycTe1qhRyK/R83tp6eLiENWruCUuKyThmtc3+t4oYywoFfLe\r
30         uUAWV8n4f3qsnuP7sKWMBl+FddIcvAra9+WIb+e8nwV6VJhNBU9Nmm/8BvDzpB1vS5Bt\r
31         iKUkyIt4NGKA1ukojHinaNBAhxVJTCgaEXYnE5ApNFE+T0lz2/06Q2Wy8gs1M0EvypUc\r
32         wjS89hhc8PEnzCvTBAs3k/e1EYmv/uIVhWss2r2l4/qLrJZ8fPc1dpRYnrKeEvfm3QjH\r
33         hz7dQadIQA0Hp7PGabEW8Zs1Mz7R5VQYPUhpDbp2WjtuOb0RGJDH2HtfmaGsKw4K8kl/\r
34         ZGgg==\r
35 X-Received: by 10.194.171.34 with SMTP id ar2mr10033wjc.81.1383087361785;\r
36         Tue, 29 Oct 2013 15:56:01 -0700 (PDT)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPSA id y20sm9517051wib.0.2013.10.29.15.56.01\r
39         for <multiple recipients>\r
40         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
41         Tue, 29 Oct 2013 15:56:01 -0700 (PDT)\r
42 From: Mark Walters <markwalters1009@gmail.com>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH 11/11] emacs: move the show entry to tree into show.el\r
45 Date: Tue, 29 Oct 2013 22:55:38 +0000\r
46 Message-Id: <1383087338-10220-12-git-send-email-markwalters1009@gmail.com>\r
47 X-Mailer: git-send-email 1.7.9.1\r
48 In-Reply-To: <1383087338-10220-1-git-send-email-markwalters1009@gmail.com>\r
49 References: <1383087338-10220-1-git-send-email-markwalters1009@gmail.com>\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Tue, 29 Oct 2013 22:56:56 -0000\r
63 \r
64 Move the keybinding and show specific helper from tree.el to show.el\r
65 ---\r
66  emacs/notmuch-show.el |   10 ++++++++++\r
67  emacs/notmuch-tree.el |   12 +-----------\r
68  2 files changed, 11 insertions(+), 11 deletions(-)\r
69 \r
70 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
71 index 9e8b9c0..f00273a 100644\r
72 --- a/emacs/notmuch-show.el\r
73 +++ b/emacs/notmuch-show.el\r
74 @@ -44,6 +44,8 @@\r
75  (declare-function notmuch-foreach-mime-part "notmuch" (function mm-handle))\r
76  (declare-function notmuch-count-attachments "notmuch" (mm-handle))\r
77  (declare-function notmuch-save-attachments "notmuch" (mm-handle &optional queryp))\r
78 +(declare-function notmuch-tree "notmuch-tree"\r
79 +                 (&optional query query-context target buffer-name open-target))\r
80  \r
81  (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date")\r
82    "Headers that should be shown in a message, in this order.\r
83 @@ -1247,6 +1249,7 @@ reset based on the original query."\r
84  (defvar notmuch-show-mode-map\r
85        (let ((map (make-sparse-keymap)))\r
86         (set-keymap-parent map notmuch-common-keymap)\r
87 +       (define-key map "Z" 'notmuch-tree-from-show-current-query)\r
88         (define-key map (kbd "<C-tab>") 'widget-backward)\r
89         (define-key map (kbd "M-TAB") 'notmuch-show-previous-button)\r
90         (define-key map (kbd "<backtab>") 'notmuch-show-previous-button)\r
91 @@ -1323,6 +1326,13 @@ All currently available key bindings:\r
92    (setq buffer-read-only t\r
93         truncate-lines t))\r
94  \r
95 +(defun notmuch-tree-from-show-current-query ()\r
96 +  "Call notmuch tree with the current query"\r
97 +  (interactive)\r
98 +  (notmuch-tree notmuch-show-thread-id\r
99 +               notmuch-show-query-context\r
100 +               (notmuch-show-get-message-id)))\r
101 +\r
102  (defun notmuch-show-move-to-message-top ()\r
103    (goto-char (notmuch-show-message-top)))\r
104  \r
105 diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el\r
106 index c66dd35..f13b41f 100644\r
107 --- a/emacs/notmuch-tree.el\r
108 +++ b/emacs/notmuch-tree.el\r
109 @@ -404,15 +404,6 @@ Does NOT change the database."\r
110      (notmuch-tree-close-message-window)\r
111      (notmuch-tree query)))\r
112  \r
113 -;; This function should be in notmuch-show.el but be we trying to\r
114 -;; minimise impact on the rest of the codebase.\r
115 -(defun notmuch-tree-from-show-current-query ()\r
116 -  "Call notmuch tree with the current query"\r
117 -  (interactive)\r
118 -  (notmuch-tree notmuch-show-thread-id\r
119 -               notmuch-show-query-context\r
120 -               (notmuch-show-get-message-id)))\r
121 -\r
122  (defun notmuch-tree-message-window-kill-hook ()\r
123    "Close the message pane when exiting the show buffer."\r
124    (let ((buffer (current-buffer)))\r
125 @@ -918,7 +909,6 @@ The arguments are:\r
126    (setq truncate-lines t))\r
127  \r
128  \r
129 -;; Set up key bindings from the rest of notmuch.\r
130 -(define-key notmuch-show-mode-map "Z" 'notmuch-tree-from-show-current-query)\r
131 +;;\r
132  \r
133  (provide 'notmuch-tree)\r
134 -- \r
135 1.7.9.1\r
136 \r