1 Return-Path: <tomi.ollila@nixu.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 1421F429E25
\r
6 for <notmuch@notmuchmail.org>; Wed, 26 Oct 2011 03:04:58 -0700 (PDT)
\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 Y-fN-yKHUfjc for <notmuch@notmuchmail.org>;
\r
16 Wed, 26 Oct 2011 03:04:57 -0700 (PDT)
\r
17 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])
\r
18 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 40BB9431FB6
\r
21 for <notmuch@notmuchmail.org>; Wed, 26 Oct 2011 03:04:57 -0700 (PDT)
\r
22 Received: from taco2.nixu.fi (localhost [127.0.0.1])
\r
23 by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id
\r
25 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
\r
26 for <notmuch@notmuchmail.org>; Wed, 26 Oct 2011 13:04:55 +0300
\r
27 Received: (from too@localhost)
\r
28 by taco2.nixu.fi (8.14.3/8.14.3/Submit) id p9QA4tPj032699;
\r
29 Wed, 26 Oct 2011 13:04:55 +0300
\r
30 X-Authentication-Warning: taco2.nixu.fi: too set sender to
\r
31 tomi.ollila@nixu.com using -f
\r
32 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
33 To: notmuch@notmuchmail.org
\r
34 Subject: remote-notmuch.sh
\r
35 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
36 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
37 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
38 Date: Wed, 26 Oct 2011 13:04:55 +0300
\r
39 Message-ID: <yf6ipncm5ko.fsf@taco2.nixu.fi>
\r
40 User-Agent: Gnus/5.110014 (No Gnus v0.14) Emacs/22.2 (gnu/linux)
\r
42 Content-Type: text/plain
\r
43 X-BeenThere: notmuch@notmuchmail.org
\r
44 X-Mailman-Version: 2.1.13
\r
46 List-Id: "Use and development of the notmuch mail system."
\r
47 <notmuch.notmuchmail.org>
\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
51 List-Post: <mailto:notmuch@notmuchmail.org>
\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
55 X-List-Received-Date: Wed, 26 Oct 2011 10:04:58 -0000
\r
59 The remote-notmuch.sh script on page http://notmuchmail.org/remoteusage/
\r
60 starts to show it's age. As the notmuch command line interface has evolved
\r
61 (and emacs ui followed) it is not working in many cases anymore.
\r
63 I took the script and modified it to work in my cases so far.
\r
65 If you have problems with remote-notmuch.sh take a look this modified
\r
66 version. For the time being it is located at
\r
67 http://www.iki.fi/too/nottoomuch/remote-notmuch.sh
\r
69 If this proves to be working better in other users use then I can
\r
70 update the script on the remoteusage page also.
\r
74 Changed shebang to '#!/bin/sh' -- tested the script works with /bin/bash &
\r
75 /bin/dash -- It should also work with http://heirloom.sourceforge.net/sh.html
\r
78 Changed sha1sum to 'openssl sha1' -- should work identically everywhere
\r
79 where openssl is installed (Linux, *BSD, Mac OS X, ...).
\r
81 Changed arg quote mangling for ssh command line: Every arg is encapsulated
\r
82 between ':s and ':s in args replaced with '\'' construct. Note that shell
\r
83 builtin echo expansions cannot be handled here but in this case this
\r
84 doesn't cause problems; example: foo=-n bar='\n'; echo "$foo" x "$bar" y
\r
85 (but see at the end of this email..)
\r
87 'notmuch show' checks that first arg is --format=raw and last begins with id:
\r
88 -- and in this case uses the whole command line as hash key.
\r
90 'case' used to choose internal command and shifts there removed.
\r
95 PS: I tested replacement for "'`echo "$arg" | sed "s/'/'\\\\\\''/"`'":
\r
98 do x=`awk -v arg="$a" "BEGIN { while (index(\"'\", arg))
\r
99 sub(\"'\", \"'\\\\\\''\", arg); printf \"'%s'\", arg }"`
\r
103 on command line. I include this into my script and test first before putting
\r
104 to the 'released' version.
\r