Announcing Astroid v0.6
[notmuch-archives.git] / d5 / c9e07f8f41298468bf8ca00bde0d449d767d45
1 Return-Path: <tomi.ollila@iki.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 1968F431FAF\r
6         for <notmuch@notmuchmail.org>; Thu, 20 Mar 2014 03:31:37 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 mThNQuwEXpI3 for <notmuch@notmuchmail.org>;\r
16         Thu, 20 Mar 2014 03:31:29 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 4603D431FAE\r
19         for <notmuch@notmuchmail.org>; Thu, 20 Mar 2014 03:31:29 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id D07FF10009D;\r
22         Thu, 20 Mar 2014 12:31:24 +0200 (EET)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
25 Subject: Re: [PATCH] cli: add a tool for starting new message in the emacs ui\r
26 In-Reply-To: <877g7pn9bs.fsf@nikula.org>\r
27 References: <1395257153-29764-1-git-send-email-jani@nikula.org>\r
28         <m2eh1x6fwt.fsf@guru.guru-group.fi> <877g7pn9bs.fsf@nikula.org>\r
29 User-Agent: Notmuch/0.17+155~g3416ef5 (http://notmuchmail.org) Emacs/24.3.1\r
30         (x86_64-unknown-linux-gnu)\r
31 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
32         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
33         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
34 Date: Thu, 20 Mar 2014 12:31:24 +0200\r
35 Message-ID: <m2bnx1duv7.fsf@guru.guru-group.fi>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Thu, 20 Mar 2014 10:31:37 -0000\r
51 \r
52 On Wed, Mar 19 2014, Jani Nikula <jani@nikula.org> wrote:\r
53 \r
54 > On Wed, 19 Mar 2014, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
55 >> On Wed, Mar 19 2014, Jani Nikula <jani@nikula.org> wrote:\r
56 >>\r
57 >>> +\r
58 >>> +# Positional parameters.\r
59 >>> +while [ $# -gt 0 ]; do\r
60 >>> +    ELISP="${ELISP} (message-goto-to) (insert \"${1}, \")"\r
61 >>> +    shift\r
62 >>> +done\r
63 >>\r
64 >> for arg; do\r
65 >\r
66 > for arg in $@; ?\r
67 \r
68 \r
69 Yes, that is less obfuscated version of that, whichever you feel more\r
70 comfortable with... for more discussion about the alternatives here see:\r
71   http://www.in-ulm.de/~mascheck/various/bourne_args/\r
72 (but don't look that -- it is unnecessary and only causes headache ;D)\r
73 \r
74 \r
75 >> maybe arg=${arg//\\/\\\\}; arg=${arg//"/\\"}; \r
76 >>\r
77 >> ${parameter/pattern/string} -- Pattern substition in bash manual.\r
78 >\r
79 > I'm inclined to go with "don't do that then" ;)\r
80 \r
81 $ bash -c 'arg=${0//\\/\\\\}; echo ${arg//\"/\\\"}' 'this"is\a test'\r
82 this\"is\\a test\r
83 $ zsh -c 'arg=${0//\\/\\\\}; echo ${arg//\"/\\\"}' 'this"is\a test' \r
84 this\"is\a test \r
85 $ ksh -c 'arg=${0//\\/\\\\}; echo ${arg//\"/\\\"}' 'this"is\a test' \r
86 this\"is\\a test\r
87 \r
88 Interestigly zsh on Scientific Linux 6.2 fails here (zsh 4.3.10) -- I tried\r
89 various tricks and none helped. Hmm also zsh 4.3.17 on Ubuntu 12.04 fails.\r
90 zsh 5.0.2 on Fedora 20 works OK. ksh & bash installed on all these 3\r
91 systems work OK (and also bash 3.2.51... on Mac OS X). \r
92 \r
93 IMO this quoting should be done -- so I can send you email with:\r
94 \r
95 $ notmuch-emacs-mua '"Jani Nikula" <jani@nikula.org>'\r
96 \r
97 \r
98 Tomi\r