1 Return-Path: <too@guru.guru-group.fi>
\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 59E48429E34
\r
6 for <notmuch@notmuchmail.org>; Mon, 16 Jan 2012 01:04:29 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 v+kjj6YZhF4j for <notmuch@notmuchmail.org>;
\r
16 Mon, 16 Jan 2012 01:04:26 -0800 (PST)
\r
17 Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 063A9431E64
\r
19 for <notmuch@notmuchmail.org>; Mon, 16 Jan 2012 01:04:26 -0800 (PST)
\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
21 id 1921D68055; Mon, 16 Jan 2012 11:04:24 +0200 (EET)
\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
23 To: <notmuch@notmuchmail.org>
\r
25 [PATCH 1/3] emacs/*.el: changed one-char comment prefix ';' to two: ';;'
\r
26 Date: Mon, 16 Jan 2012 11:04:14 +0200
\r
27 Message-Id: <1326704656-26102-1-git-send-email-tomi.ollila@iki.fi>
\r
28 X-Mailer: git-send-email 1.7.6.1
\r
29 In-Reply-To: <cun7h0v7ete.fsf@hotblack-desiato.hh.sledj.net>
\r
30 References: <cun7h0v7ete.fsf@hotblack-desiato.hh.sledj.net>
\r
32 Content-Type: text/plain; charset=UTF-8
\r
33 Content-Transfer-Encoding: 8bit
\r
34 Cc: Tomi Ollila <tomi.ollila@iki.fi>
\r
35 X-BeenThere: notmuch@notmuchmail.org
\r
36 X-Mailman-Version: 2.1.13
\r
38 List-Id: "Use and development of the notmuch mail system."
\r
39 <notmuch.notmuchmail.org>
\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
41 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
43 List-Post: <mailto:notmuch@notmuchmail.org>
\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
47 X-List-Received-Date: Mon, 16 Jan 2012 09:04:30 -0000
\r
49 In order for emacs (indent-region) to (re)indent emacs lisp
\r
50 properly there needs to be at least 2 comment characters (;;).
\r
53 $ perl -ne 's/;;.*//; print $_ if /(^|[^;]);([^;]|$)/' *.el | less
\r
55 shows that there is (only) need to change comments in the beginning
\r
58 $ perl -pi -e 's/^(\s*);([^;]|$)/$1;;$2/' *.el
\r
62 emacs/notmuch-hello.el | 4 +-
\r
63 emacs/notmuch-lib.el | 16 +++---
\r
64 emacs/notmuch-show.el | 16 +++---
\r
65 emacs/notmuch.el | 118 ++++++++++++++++++++++++------------------------
\r
66 4 files changed, 77 insertions(+), 77 deletions(-)
\r
68 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
69 index 02017ce..93e5032 100644
\r
70 --- a/emacs/notmuch-hello.el
\r
71 +++ b/emacs/notmuch-hello.el
\r
72 @@ -399,8 +399,8 @@ Complete list of currently available key bindings:
\r
73 "Run notmuch and display saved searches, known tags, etc."
\r
76 - ; Jump through a hoop to get this value from the deprecated variable
\r
77 - ; name (`notmuch-folders') or from the default value.
\r
78 + ;; Jump through a hoop to get this value from the deprecated variable
\r
79 + ;; name (`notmuch-folders') or from the default value.
\r
80 (if (not notmuch-saved-searches)
\r
81 (setq notmuch-saved-searches (notmuch-saved-searches)))
\r
83 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
\r
84 index 0f856bf..00ed589 100644
\r
85 --- a/emacs/notmuch-lib.el
\r
86 +++ b/emacs/notmuch-lib.el
\r
87 @@ -114,14 +114,14 @@ the user hasn't set this variable with the old or new value."
\r
88 (setq list (cdr list)))
\r
91 -; This lets us avoid compiling these replacement functions when emacs
\r
92 -; is sufficiently new enough to supply them alone. We do the macro
\r
93 -; treatment rather than just wrapping our defun calls in a when form
\r
94 -; specifically so that the compiler never sees the code on new emacs,
\r
95 -; (since the code is triggering warnings that we don't know how to get
\r
98 -; A more clever macro here would accept a condition and a list of forms.
\r
99 +;; This lets us avoid compiling these replacement functions when emacs
\r
100 +;; is sufficiently new enough to supply them alone. We do the macro
\r
101 +;; treatment rather than just wrapping our defun calls in a when form
\r
102 +;; specifically so that the compiler never sees the code on new emacs,
\r
103 +;; (since the code is triggering warnings that we don't know how to get
\r
106 +;; A more clever macro here would accept a condition and a list of forms.
\r
107 (defmacro compile-on-emacs-prior-to-23 (form)
\r
108 "Conditionally evaluate form only on emacs < emacs-23."
\r
109 (list 'when (< emacs-major-version 23)
\r
110 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
111 index 1a250a3..ef3c076 100644
\r
112 --- a/emacs/notmuch-show.el
\r
113 +++ b/emacs/notmuch-show.el
\r
114 @@ -124,14 +124,14 @@ indentation."
\r
115 "Use external viewers to view all attachments from the current message."
\r
117 (with-current-notmuch-show-message
\r
118 - ; We override the mm-inline-media-tests to indicate which message
\r
119 - ; parts are already sufficiently handled by the original
\r
120 - ; presentation of the message in notmuch-show mode. These parts
\r
121 - ; will be inserted directly into the temporary buffer of
\r
122 - ; with-current-notmuch-show-message and silently discarded.
\r
124 - ; Any MIME part not explicitly mentioned here will be handled by an
\r
125 - ; external viewer as configured in the various mailcap files.
\r
126 + ;; We override the mm-inline-media-tests to indicate which message
\r
127 + ;; parts are already sufficiently handled by the original
\r
128 + ;; presentation of the message in notmuch-show mode. These parts
\r
129 + ;; will be inserted directly into the temporary buffer of
\r
130 + ;; with-current-notmuch-show-message and silently discarded.
\r
132 + ;; Any MIME part not explicitly mentioned here will be handled by an
\r
133 + ;; external viewer as configured in the various mailcap files.
\r
134 (let ((mm-inline-media-tests '(
\r
135 ("text/.*" ignore identity)
\r
136 ("application/pgp-signature" ignore identity)
\r
137 diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
138 index ef4dcc7..8957de5 100644
\r
139 --- a/emacs/notmuch.el
\r
140 +++ b/emacs/notmuch.el
\r
142 -; notmuch.el --- run notmuch within emacs
\r
144 -; Copyright © Carl Worth
\r
146 -; This file is part of Notmuch.
\r
148 -; Notmuch is free software: you can redistribute it and/or modify it
\r
149 -; under the terms of the GNU General Public License as published by
\r
150 -; the Free Software Foundation, either version 3 of the License, or
\r
151 -; (at your option) any later version.
\r
153 -; Notmuch is distributed in the hope that it will be useful, but
\r
154 -; WITHOUT ANY WARRANTY; without even the implied warranty of
\r
155 -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
\r
156 -; General Public License for more details.
\r
158 -; You should have received a copy of the GNU General Public License
\r
159 -; along with Notmuch. If not, see <http://www.gnu.org/licenses/>.
\r
161 -; Authors: Carl Worth <cworth@cworth.org>
\r
163 -; This is an emacs-based interface to the notmuch mail system.
\r
165 -; You will first need to have the notmuch program installed and have a
\r
166 -; notmuch database built in order to use this. See
\r
167 -; http://notmuchmail.org for details.
\r
169 -; To install this software, copy it to a directory that is on the
\r
170 -; `load-path' variable within emacs (a good candidate is
\r
171 -; /usr/local/share/emacs/site-lisp). If you are viewing this from the
\r
172 -; notmuch source distribution then you can simply run:
\r
174 -; sudo make install-emacs
\r
178 -; Then, to actually run it, add:
\r
180 -; (require 'notmuch)
\r
182 -; to your ~/.emacs file, and then run "M-x notmuch" from within emacs,
\r
185 -; emacs -f notmuch
\r
187 -; Have fun, and let us know if you have any comment, questions, or
\r
188 -; kudos: Notmuch list <notmuch@notmuchmail.org> (subscription is not
\r
189 -; required, but is available from http://notmuchmail.org).
\r
190 +;; notmuch.el --- run notmuch within emacs
\r
192 +;; Copyright © Carl Worth
\r
194 +;; This file is part of Notmuch.
\r
196 +;; Notmuch is free software: you can redistribute it and/or modify it
\r
197 +;; under the terms of the GNU General Public License as published by
\r
198 +;; the Free Software Foundation, either version 3 of the License, or
\r
199 +;; (at your option) any later version.
\r
201 +;; Notmuch is distributed in the hope that it will be useful, but
\r
202 +;; WITHOUT ANY WARRANTY; without even the implied warranty of
\r
203 +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
\r
204 +;; General Public License for more details.
\r
206 +;; You should have received a copy of the GNU General Public License
\r
207 +;; along with Notmuch. If not, see <http://www.gnu.org/licenses/>.
\r
209 +;; Authors: Carl Worth <cworth@cworth.org>
\r
211 +;; This is an emacs-based interface to the notmuch mail system.
\r
213 +;; You will first need to have the notmuch program installed and have a
\r
214 +;; notmuch database built in order to use this. See
\r
215 +;; http://notmuchmail.org for details.
\r
217 +;; To install this software, copy it to a directory that is on the
\r
218 +;; `load-path' variable within emacs (a good candidate is
\r
219 +;; /usr/local/share/emacs/site-lisp). If you are viewing this from the
\r
220 +;; notmuch source distribution then you can simply run:
\r
222 +;; sudo make install-emacs
\r
226 +;; Then, to actually run it, add:
\r
228 +;; (require 'notmuch)
\r
230 +;; to your ~/.emacs file, and then run "M-x notmuch" from within emacs,
\r
233 +;; emacs -f notmuch
\r
235 +;; Have fun, and let us know if you have any comment, questions, or
\r
236 +;; kudos: Notmuch list <notmuch@notmuchmail.org> (subscription is not
\r
237 +;; required, but is available from http://notmuchmail.org).
\r
239 (eval-when-compile (require 'cl))
\r
241 @@ -139,10 +139,10 @@ This is basically just `format-kbd-macro' but we also convert ESC to M-."
\r
243 (concat desc " "))))
\r
245 -; I would think that emacs would have code handy for walking a keymap
\r
246 -; and generating strings for each key, and I would prefer to just call
\r
247 -; that. But I couldn't find any (could be all implemented in C I
\r
248 -; suppose), so I wrote my own here.
\r
249 +;; I would think that emacs would have code handy for walking a keymap
\r
250 +;; and generating strings for each key, and I would prefer to just call
\r
251 +;; that. But I couldn't find any (could be all implemented in C I
\r
252 +;; suppose), so I wrote my own here.
\r
253 (defun notmuch-substitute-one-command-key-with-prefix (prefix binding)
\r
254 "For a key binding, return a string showing a human-readable
\r
255 representation of the prefixed key as well as the first line of
\r
256 @@ -270,14 +270,14 @@ For a mouse binding, return nil."
\r
257 (defun notmuch-search-scroll-down ()
\r
258 "Move backward through the search results by one window's worth."
\r
260 - ; I don't know why scroll-down doesn't signal beginning-of-buffer
\r
261 - ; the way that scroll-up signals end-of-buffer, but c'est la vie.
\r
263 - ; So instead of trapping a signal we instead check whether the
\r
264 - ; window begins on the first line of the buffer and if so, move
\r
265 - ; directly to that position. (We have to count lines since the
\r
266 - ; window-start position is not the same as point-min due to the
\r
267 - ; invisible thread-ID characters on the first line.
\r
268 + ;; I don't know why scroll-down doesn't signal beginning-of-buffer
\r
269 + ;; the way that scroll-up signals end-of-buffer, but c'est la vie.
\r
271 + ;; So instead of trapping a signal we instead check whether the
\r
272 + ;; window begins on the first line of the buffer and if so, move
\r
273 + ;; directly to that position. (We have to count lines since the
\r
274 + ;; window-start position is not the same as point-min due to the
\r
275 + ;; invisible thread-ID characters on the first line.
\r
276 (if (equal (count-lines (point-min) (window-start)) 0)
\r
277 (goto-char (point-min))
\r
278 (scroll-down nil)))
\r