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 arlo.cworth.org (Postfix) with ESMTP id 2C5626DE192D
\r
6 for <notmuch@notmuchmail.org>; Thu, 12 Nov 2015 00:22:33 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=-0.169 tagged_above=-999 required=5 tests=[AWL=0.401,
\r
12 DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7,
\r
14 RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001]
\r
16 Received: from arlo.cworth.org ([127.0.0.1])
\r
17 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
18 with ESMTP id yktzz5ewBwg6 for <notmuch@notmuchmail.org>;
\r
19 Thu, 12 Nov 2015 00:22:30 -0800 (PST)
\r
20 Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com
\r
21 [74.125.82.41]) by arlo.cworth.org (Postfix) with ESMTPS id 3AC566DE14F2 for
\r
22 <notmuch@notmuchmail.org>; Thu, 12 Nov 2015 00:22:30 -0800 (PST)
\r
23 Received: by wmec201 with SMTP id c201so20537374wme.0
\r
24 for <notmuch@notmuchmail.org>; Thu, 12 Nov 2015 00:22:28 -0800 (PST)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=from:to:cc:subject:in-reply-to:references:user-agent:date
\r
27 :message-id:mime-version:content-type;
\r
28 bh=JA/Gabfs+zBTurDeA4YmLhx5RVygsTZ4jyyCRJu4ykM=;
\r
29 b=bDmWmG1aT76sYdTF4u8u02WtOdE5QALzpK/VoqPetUbORTha7Mz8rV1DRbJWpFPrc/
\r
30 v3yLp5a/Ra5RYCWB9GVW03B54Uwlun/imSzP9zQ6Se9zC46VPTfr1Nr54Itu/2b5kgoV
\r
31 LldSyhyU3TjgmHmS/1w7BjdhFzorOWgCp31ak7qJETbVqs5V4pFZTWy+1uQy/BBqjIlZ
\r
32 PTjxlLgn/UrBFJJjpPHuRLAZn1Xe9Au3CcS6RYwdaP0jDGu62VWrUI/wuYstU9OBUpZi
\r
33 /eEiH+dqr6vI+rFhUC6hedcE/ls3OxxGrOsbfMpvNY4wcVy8+q4PejaTyceWnyg3CijG
\r
35 X-Received: by 10.28.47.212 with SMTP id v203mr270743wmv.37.1447316548173;
\r
36 Thu, 12 Nov 2015 00:22:28 -0800 (PST)
\r
37 Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162])
\r
38 by smtp.gmail.com with ESMTPSA id ej10sm12236481wjd.32.2015.11.12.00.22.26
\r
39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
\r
40 Thu, 12 Nov 2015 00:22:27 -0800 (PST)
\r
41 From: Mark Walters <markwalters1009@gmail.com>
\r
42 To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org
\r
43 Cc: tomi.ollila@iki.fi
\r
44 Subject: Re: [PATCH] devel/emacs: add devel/try-emacs-mua.sh
\r
45 In-Reply-To: <1446390985-20989-1-git-send-email-tomi.ollila@iki.fi>
\r
46 References: <1446390985-20989-1-git-send-email-tomi.ollila@iki.fi>
\r
47 User-Agent: Notmuch/0.21~rc1+46~gbcd385e (http://notmuchmail.org) Emacs/23.4.1
\r
48 (x86_64-pc-linux-gnu)
\r
49 Date: Thu, 12 Nov 2015 08:22:25 +0000
\r
50 Message-ID: <87si4bwrsu.fsf@qmul.ac.uk>
\r
52 Content-Type: text/plain; charset=us-ascii
\r
53 X-BeenThere: notmuch@notmuchmail.org
\r
54 X-Mailman-Version: 2.1.20
\r
56 List-Id: "Use and development of the notmuch mail system."
\r
57 <notmuch.notmuchmail.org>
\r
58 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
61 List-Post: <mailto:notmuch@notmuchmail.org>
\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
63 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
65 X-List-Received-Date: Thu, 12 Nov 2015 08:22:33 -0000
\r
68 > devel/try-emacs-mua.sh provides an easy way to try and experiment with
\r
69 > the notmuch emacs client provided in emacs subdirectory of notmuch
\r
72 > User is required to choose whether to run emacs with -q, -Q or neither
\r
73 > -- and experienced ones may add other command line options, like
\r
76 > This script ensures that no .el files are newer than corresponding .elc
\r
77 > files so that user (/developer!) does not accidentally experiment with
\r
78 > outdated elisp files. The emacs variable to have the same effect,
\r
79 > `load-prefer-newer' is not available until emacs 24.4.
\r
81 > The *scratch* buffer is filled with some code user can execute before
\r
82 > running notmuch code.
\r
84 I like this -- a nice simple way to get to a working but uncustomised
\r
87 I don't know how easy the following would be but one addition that I
\r
88 would find very useful would be a way to make this use the test
\r
89 corpus. This would be useful for giving a completely standard
\r
90 environment for interactive testing, but also for debugging what is
\r
91 going on when tests fail.
\r
93 Of course that is a feature request and should not delay the feature.
\r
95 Finally, I think there is a bug:
\r
100 > Addressed David's comments in id:87d1xdtim1.fsf@maritornes.cs.unb.ca
\r
102 > 1) removed "address completion insinuate"
\r
103 > 2) added code to initialize package system when using -q or -Q
\r
105 > devel/try-emacs-mua.sh | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++
\r
106 > 1 file changed, 92 insertions(+)
\r
107 > create mode 100755 devel/try-emacs-mua.sh
\r
109 > diff --git a/devel/try-emacs-mua.sh b/devel/try-emacs-mua.sh
\r
110 > new file mode 100755
\r
111 > index 000000000000..71be152c2346
\r
113 > +++ b/devel/try-emacs-mua.sh
\r
117 > +# This script provides an easy way to try and experiment with the
\r
118 > +# notmuch emacs client provided in notmuch/emacs directory.
\r
122 > +test $# -gt 0 || {
\r
125 > + echo "Usage: $0 '' | q | Q [other-emacs-args]"
\r
127 > + printf " $0 %s\n" "'' starts emacs without either -q or -Q option" \
\r
128 > + "q starts emacs with -q" \
\r
129 > + "Q starts emacs with -Q"
\r
131 > + echo Note that if there are notmuch-emacs .elc files that are older than
\r
132 > + echo their corresponding .el files those older .elcs will be removed.
\r
137 > +case $1 in '') opt=
\r
138 > + ;; q | -q) opt=-q
\r
139 > + ;; Q | -Q) opt=-Q
\r
140 > + ;; *) echo "option '$1' not '', 'q' nor 'Q'" >&2; exit 1
\r
145 > + *\"*) echo "'$0' contain one or more '\"'s" >&2; exit 1 ;;
\r
146 > + */*) d0=${0%/*} ;;
\r
155 > +test -f "$nmd"/emacs/notmuch-lib.el || {
\r
156 > + echo "Cannot find notmuch-emacs source directory"
\r
160 > +if test -x "$nmd"/notmuch
\r
163 > +To use accompanied notmuch binary from the same source, evaluate
\r
164 > +(setq exec-path (cons \"'"$nmd"'\" exec-path))
\r
165 > +Note: Evaluating the above may be followed by unintended database
\r
166 > +upgrade and getting back to old version may require dump & restore.
\r
172 > +if test "$opt" = '-q' || test "$opt" = '-Q'
\r
175 > +If you want to use packages (like company from elpa) evaluate
\r
176 > +(progn (require '\''package) (package-initialize))
\r
182 As far as I can see at this point we are in $nmd not $emd so the
\r
183 following does not delete stale .elc files.
\r
186 > +# ensure we don't load .elc files that are older than corresponding .el file
\r
187 > +# the emacs variable `load-prefer-newer' is not available until emacs 24.4
\r
188 > +perl -e 'use strict; use warnings;
\r
189 > +while (<*.elc>) {
\r
190 > + my $elc = $_; s/elc$/el/;
\r
191 > + if (-M $_ < -M $elc) {
\r
192 > + warn "$_ is newer than $elc. Removing $elc\n";
\r
193 > + unlink $elc or die "Failed to remove '\''$elc'\'': $!\n";
\r
205 > +# note: whitespace in $EMACS splits to command and args
\r
206 > +exec ${EMACS:-emacs} $opt -L "$emd" -l "$emd"/notmuch.el "$@" --eval '
\r
207 > +(with-current-buffer "*scratch*"
\r
209 > +Go to the end of the following lines and type C-x C-e to evaluate
\r
210 > +(or C-j which is shorter but inserts evaluation results into buffer)
\r
212 > +To \"disable\" mail sending, evaluate
\r
213 > +(setq message-send-mail-function (lambda () t))
\r
215 > +To start notmuch (hello) screen, evaluate
\r
216 > +(notmuch-hello)") (set-buffer-modified-p nil))'
\r
220 > _______________________________________________
\r
221 > notmuch mailing list
\r
222 > notmuch@notmuchmail.org
\r
223 > https://notmuchmail.org/mailman/listinfo/notmuch
\r