Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / d2 / b70e9ce655bef5b161cb8604ff3492b85980b8
1 Return-Path: <sojkam1@fel.cvut.cz>\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 2A6C240DEF3\r
6         for <notmuch@notmuchmail.org>; Thu, 18 Nov 2010 13:09:14 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.9\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9] autolearn=ham\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 VW94ckHkw7pq for <notmuch@notmuchmail.org>;\r
16         Thu, 18 Nov 2010 13:09:03 -0800 (PST)\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
18         by olra.theworths.org (Postfix) with ESMTP id 9AFA340DEEB\r
19         for <notmuch@notmuchmail.org>; Thu, 18 Nov 2010 13:09:03 -0800 (PST)\r
20 Received: from localhost (unknown [192.168.200.4])\r
21         by max.feld.cvut.cz (Postfix) with ESMTP id 078C819F3364;\r
22         Thu, 18 Nov 2010 22:09:02 +0100 (CET)\r
23 X-Virus-Scanned: IMAP AMAVIS\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])\r
25         by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,\r
26         port 10044)\r
27         with ESMTP id oWGtCYzT8YFx; Thu, 18 Nov 2010 22:09:00 +0100 (CET)\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
29         by max.feld.cvut.cz (Postfix) with ESMTP id BA17419F3340;\r
30         Thu, 18 Nov 2010 22:09:00 +0100 (CET)\r
31 Received: from wsheee.2x.cz (unknown [213.29.198.144])\r
32         (Authenticated sender: sojkam1)\r
33         by imap.feld.cvut.cz (Postfix) with ESMTPSA id B6396FA005;\r
34         Thu, 18 Nov 2010 22:09:00 +0100 (CET)\r
35 Received: from wsh by wsheee.2x.cz with local (Exim 4.72)\r
36         (envelope-from <sojkam1@fel.cvut.cz>)\r
37         id 1PJBj2-0004n8-3Y; Thu, 18 Nov 2010 22:09:00 +0100\r
38 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
39 To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org\r
40 Subject: Re: Bug in remote use of notmuch\r
41 In-Reply-To: <AANLkTin_2gWHg2omVdRwDbm8-m3FoJn6cvVakMRBnNEZ@mail.gmail.com>\r
42 References: <AANLkTin_2gWHg2omVdRwDbm8-m3FoJn6cvVakMRBnNEZ@mail.gmail.com>\r
43 User-Agent: Notmuch/0.5-11-g48b5e00 (http://notmuchmail.org) Emacs/23.2.1\r
44         (i486-pc-linux-gnu)\r
45 Date: Thu, 18 Nov 2010 22:08:59 +0100\r
46 Message-ID: <87wroa49w4.fsf@wsheee.2x.cz>\r
47 MIME-Version: 1.0\r
48 Content-Type: text/plain; charset=us-ascii\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Thu, 18 Nov 2010 21:09:14 -0000\r
62 \r
63 On Wed, 10 Nov 2010, Mark Walters wrote:\r
64 > I am experimenting with using notmuch remotely over ssh (as in the\r
65 > NEWS file; i.e. with a script containing ssh user@host notmuch "$@")\r
66 > This is mostly excellent but it seems to get confused by some queries.\r
67 > For example those containing brackets or just consisting of *. I think\r
68 > this is a problem with ssh spawning a shell on the remote machine\r
69 > which doesn't like the brackets or *.\r
70\r
71 > Explicitly to reproduce the problem start notmuch with a remote\r
72 > database using a script as above;\r
73 > type * in the search box;\r
74 > and emacs shows:\r
75 > End of search results. (process returned 1)\r
76 \r
77 Hi Mark,\r
78 \r
79 you are right, that there are problems with the queries containing shell\r
80 meta characters. AFAIK the probelm is not caused by the remote shell, as\r
81  notmuch is there invoked directly by ssh, but by the shell invoking the\r
82 ssh. I do not know precisely why, but the following script seems to work\r
83 correctly even for the queries containing shell meta characters. It uses\r
84 bash's printf extension to print shell-quoted version of a string.\r
85 \r
86   #!/bin/bash\r
87   printf -v args "%q " "$@"\r
88   ssh example.org notmuch $args\r
89 \r
90 -Michal\r