[PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / e9 / 2b7159d0edb27daa3a1d012ec832bf3f1183ae
1 Return-Path: <amdragon@mit.edu>\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 68B3F431FAE\r
6         for <notmuch@notmuchmail.org>; Wed, 29 May 2013 18:14:06 -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.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id WrjHLkiiSPk7 for <notmuch@notmuchmail.org>;\r
16         Wed, 29 May 2013 18:13:58 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-6.mit.edu (dmz-mailsec-scanner-6.mit.edu\r
18         [18.7.68.35])\r
19         by olra.theworths.org (Postfix) with ESMTP id 76B20431FAF\r
20         for <notmuch@notmuchmail.org>; Wed, 29 May 2013 18:13:58 -0700 (PDT)\r
21 X-AuditID: 12074423-b7f826d000001438-61-51a6a7d6fe27\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
23         by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id DD.9D.05176.6D7A6A15; Wed, 29 May 2013 21:13:58 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
26         by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r4U1Dt6H015111; \r
27         Wed, 29 May 2013 21:13:55 -0400\r
28 Received: from drake.dyndns.org (c-76-21-105-205.hsd1.ca.comcast.net\r
29         [76.21.105.205]) (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r4U1DqVn003002\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Wed, 29 May 2013 21:13:54 -0400\r
34 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1UhrR9-0003Yo-Ta; Wed, 29 May 2013 21:13:51 -0400\r
37 From: Austin Clements <amdragon@MIT.EDU>\r
38 To: notmuch@notmuchmail.org\r
39 Subject: [PATCH v2 0/5] emacs: Part command improvements\r
40 Date: Wed, 29 May 2013 21:13:43 -0400\r
41 Message-Id: <1369876428-13537-1-git-send-email-amdragon@mit.edu>\r
42 X-Mailer: git-send-email 1.7.10.4\r
43 X-Brightmail-Tracker:\r
44  H4sIAAAAAAAAA+NgFlrCIsWRmVeSWpSXmKPExsUixG6nrntt+bJAg7m7+SxWz+WxuH5zJrMD\r
45         k8fOWXfZPZ6tusUcwBTFZZOSmpNZllqkb5fAlbH251SWgmfqFQ9Ob2VpYPws38XIySEhYCLx\r
46         4ek1RghbTOLCvfVsXYxcHEIC+xgl7l65xQ7hbGSUmLB+MVTmNJNE84Y2JghnLqPE2hcX2EH6\r
47         2QQ0JLbtXw42S0RAWmLn3dmsIDazgKzEj/N/wGxhAQuJd0dawepZBFQlHj+aADSVg4NXwEFi\r
48         xiEXiDMUJbqfTWCbwMi7gJFhFaNsSm6Vbm5iZk5xarJucXJiXl5qka6ZXm5miV5qSukmRnBg\r
49         uCjvYPxzUOkQowAHoxIP7watZYFCrIllxZW5hxglOZiURHnXLAUK8SXlp1RmJBZnxBeV5qQW\r
50         H2KU4GBWEuFdow2U401JrKxKLcqHSUlzsCiJ815LuekvJJCeWJKanZpakFoEk5Xh4FCS4C1a\r
51         BtQoWJSanlqRlplTgpBm4uAEGc4DNFwJpIa3uCAxtzgzHSJ/ilFRSpzXFiQhAJLIKM2D64VF\r
52         7itGcaBXhCFW8ACjHq77FdBgJqDB4syLQQaXJCKkpBoYvRluf/Y6eWH7ajGh2b31LALeOeZH\r
53         Lr1155p+loHvbqLBYp8n59wnBpTWzfncPD+ij9n0kNW3Ss737E/Kr0fyVdnxnBRe9Sd6UrJz\r
54         euzea73FXtfeNyW02rjyTM3Of3h25q+Am7t2bprwWtL81WqHa+YTOR96qqYXOJVz6YjolKQ6\r
55         3jSskf6jxFKckWioxVxUnAgA6SomZ7cCAAA=\r
56 X-BeenThere: notmuch@notmuchmail.org\r
57 X-Mailman-Version: 2.1.13\r
58 Precedence: list\r
59 List-Id: "Use and development of the notmuch mail system."\r
60         <notmuch.notmuchmail.org>\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
64 List-Post: <mailto:notmuch@notmuchmail.org>\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
68 X-List-Received-Date: Thu, 30 May 2013 01:14:06 -0000\r
69 \r
70 This is v2 of id:87zjvghx82.fsf@qmul.ac.uk.  In addition to some\r
71 general improvements, this fixes the handling of part overlays in\r
72 indented messages, removes the special part button map entirely in\r
73 favor of the "." submap, and adds a NEWS patch.\r
74 \r
75 The diff from v1 follows\r
76 \r
77 diff --git a/NEWS b/NEWS\r
78 index a7f2ec6..23f4c6a 100644\r
79 --- a/NEWS\r
80 +++ b/NEWS\r
81 @@ -61,6 +61,22 @@ notmuch-vim, but of course that is their decision.\r
82  Emacs Interface\r
83  ---------------\r
84  \r
85 +New keymap to view/save parts\r
86 +\r
87 +  To view or save a single MIME part of a message, use the new "."\r
88 +  submap (e.g., ". s" to save, ". v" to view).  Previously, these keys\r
89 +  were only available when point was on a part button and they did not\r
90 +  have the "." prefix, so they were difficult to invoke (impossible if\r
91 +  a part did not have a button) and clashed with other bindings.\r
92 +  These new bindings also appear in show's help, so you don't have to\r
93 +  memorize them.\r
94 +\r
95 +Default part save directory is now `mm-default-directory`\r
96 +\r
97 +  Previously, notmuch offered to save parts and attachments to a mix\r
98 +  of `mm-default-directory`, `mailcap-download-directory`, and `~/`.\r
99 +  This has been standardized on `mm-default-directory`.\r
100 +\r
101  No Emacs 22 support\r
102  \r
103    The Emacs 22 support added late 2010 was sufficient only for a short\r
104 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
105 index 09ce25e..2186783 100644\r
106 --- a/emacs/notmuch-lib.el\r
107 +++ b/emacs/notmuch-lib.el\r
108 @@ -360,21 +360,17 @@ OBJECT."\r
109     below\r
110     string))\r
111  \r
112 -(defun notmuch-put-text-property-if-nil (start end property value\r
113 -                                              &optional object)\r
114 -  "Like `put-text-property', but only set the property where it is nil."\r
115 +(defun notmuch-map-text-property (start end prop func &optional object)\r
116 +  "Transform text property PROP using FUNC.\r
117 +\r
118 +Applies FUNC to each distinct value of the text property PROP\r
119 +between START and END of OBJECT, setting PROP to the value\r
120 +returned by FUNC."\r
121    (while (< start end)\r
122 -    (let ((start-nil (text-property-any start end property nil object)))\r
123 -      (if (null start-nil)\r
124 -         ;; There are no more nil regions; exit the loop\r
125 -         (setq start end)\r
126 -       ;; Find the end of the nil region\r
127 -       (let ((end-nil\r
128 -              (or (text-property-not-all start-nil end property nil object)\r
129 -                  end)))\r
130 -         ;; Set the property\r
131 -         (put-text-property start-nil end-nil property value object)\r
132 -         (setq start end-nil))))))\r
133 +    (let ((value (get-text-property start prop object))\r
134 +         (next (next-single-property-change start prop object end)))\r
135 +      (put-text-property start next prop (funcall func value) object)\r
136 +      (setq start next))))\r
137  \r
138  (defun notmuch-logged-error (msg &optional extra)\r
139    "Log MSG and EXTRA to *Notmuch errors* and signal MSG.\r
140 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
141 index 380b144..613e666 100644\r
142 --- a/emacs/notmuch-show.el\r
143 +++ b/emacs/notmuch-show.el\r
144 @@ -466,7 +466,6 @@ message at DEPTH in the current thread."\r
145  \r
146  (define-button-type 'notmuch-show-part-button-type\r
147    'action 'notmuch-show-part-button-default\r
148 -  'keymap 'notmuch-show-part-button-map\r
149    'follow-link t\r
150    'face 'message-mml\r
151    :supertype 'notmuch-button-type)\r
152 @@ -843,8 +842,15 @@ If HIDE is non-nil then initially hide this part."\r
153        (insert "\n"))\r
154      (notmuch-show-create-part-overlays msg beg (point) hide)\r
155      ;; Record part information.  Since we already inserted subparts,\r
156 -    ;; don't override exiting :notmuch-part properties.\r
157 -    (notmuch-put-text-property-if-nil beg (point) :notmuch-part part)))\r
158 +    ;; don't override existing :notmuch-part properties.\r
159 +    (notmuch-map-text-property beg (point) :notmuch-part\r
160 +                              (lambda (v) (or v part)))\r
161 +    ;; Make :notmuch-part front sticky and rear non-sticky so it stays\r
162 +    ;; applied to the beginning of each line when we indent the message.\r
163 +    (notmuch-map-text-property beg (point) 'front-sticky\r
164 +                              (lambda (v) (pushnew :notmuch-part v)))\r
165 +    (notmuch-map-text-property beg (point) 'rear-nonsticky\r
166 +                              (lambda (v) (pushnew :notmuch-part v)))))\r
167  \r
168  (defun notmuch-show-insert-body (msg body depth)\r
169    "Insert the body BODY at depth DEPTH in the current thread."\r
170 @@ -1194,11 +1200,6 @@ reset based on the original query."\r
171    "Submap for part commands")\r
172  (fset 'notmuch-show-part-map notmuch-show-part-map)\r
173  \r
174 -(defvar notmuch-show-part-button-map\r
175 -  (make-composed-keymap notmuch-show-part-map button-map)\r
176 -  "Keymap for part button commands")\r
177 -(fset 'notmuch-show-part-button-map notmuch-show-part-button-map)\r
178 -\r
179  (defvar notmuch-show-mode-map\r
180        (let ((map (make-sparse-keymap)))\r
181         (define-key map "?" 'notmuch-help)\r
182 @@ -1365,7 +1366,7 @@ Some useful entries are:\r
183      (get-text-property (point) :notmuch-message-properties)))\r
184  \r
185  (defun notmuch-show-get-part-properties ()\r
186 -  "Return the properties of the part containing point.\r
187 +  "Return the properties of the innermost part containing point.\r
188  \r
189  This is the part property list retrieved from the CLI.  Signals\r
190  an error if there is no part containing point."\r
191 \r
192 \r