notmuch release 0.22.1 now available
[notmuch-archives.git] / 02 / ebebc14e941e9296513cb513e28d54f52476d7
1 Return-Path: <nils@dieweltistgarnichtso.net>\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 0FE056DE1638\r
6  for <notmuch@notmuchmail.org>; Sat, 30 May 2015 18:01:45 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.722\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.722 tagged_above=-999 required=5\r
12  tests=[RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01,\r
13  RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001]\r
14  autolearn=disabled\r
15 Received: from arlo.cworth.org ([127.0.0.1])\r
16  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
17  with ESMTP id byOc80PpqNaL for <notmuch@notmuchmail.org>;\r
18  Sat, 30 May 2015 18:01:39 -0700 (PDT)\r
19 X-Greylist: delayed 1156 seconds by postgrey-1.35 at arlo;\r
20  Sat, 30 May 2015 18:01:39 PDT\r
21 Received: from mail.tiggerswelt.net (mail.tiggerswelt.net [94.186.151.130])\r
22  by arlo.cworth.org (Postfix) with ESMTPS id 300F56DE119C\r
23  for <notmuch@notmuchmail.org>; Sat, 30 May 2015 18:01:39 -0700 (PDT)\r
24 Received: from localhost (f053141102.adsl.alicedsl.de [78.53.141.102])\r
25  (using TLSv1 with cipher AES128-SHA (128/128 bits))\r
26  (No client certificate requested)\r
27  by mail.tiggerswelt.net (Postfix) with ESMTP id 03CFC2900;\r
28  Sun, 31 May 2015 02:46:18 +0200 (CEST)\r
29 From: Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net>\r
30 To: David Edmondson <dme@dme.org>, Tomi Ollila <tomi.ollila@iki.fi>,\r
31  notmuch@notmuchmail.org\r
32 Subject: Re: bug report: Emacs notmuch-mode fails attachments with spaces\r
33 In-Reply-To: <cunh9ut650e.fsf@gargravarr.hh.sledj.net>\r
34 References: <87twyurc78.fsf@dieweltistgarnichtso.net>\r
35  <m24mqu455x.fsf@guru.guru-group.fi> <8761b9pu11.fsf@dieweltistgarnichtso.net>\r
36  <cunh9ut650e.fsf@gargravarr.hh.sledj.net>\r
37 User-Agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/23.4.1\r
38  (i486-pc-linux-gnu)\r
39 Date: Sun, 31 May 2015 02:42:01 +0200\r
40 Message-ID: <87zj4lbmsm.fsf@dieweltistgarnichtso.net>\r
41 MIME-Version: 1.0\r
42 Content-Type: multipart/signed; boundary="=-=-=";\r
43  micalg=pgp-sha256; protocol="application/pgp-signature"\r
44 X-BeenThere: notmuch@notmuchmail.org\r
45 X-Mailman-Version: 2.1.18\r
46 Precedence: list\r
47 List-Id: "Use and development of the notmuch mail system."\r
48  <notmuch.notmuchmail.org>\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
50  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
52 List-Post: <mailto:notmuch@notmuchmail.org>\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
55  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
56 X-List-Received-Date: Sun, 31 May 2015 01:01:45 -0000\r
57 \r
58 --=-=-=\r
59 Content-Type: text/plain; charset=utf-8\r
60 Content-Transfer-Encoding: quoted-printable\r
61 \r
62 David Edmondson <dme@dme.org> writes:\r
63 \r
64 > On Tue, Feb 10 2015, Nils Dagsson Moskopp wrote:\r
65 >> Tomi Ollila <tomi.ollila@iki.fi> writes:\r
66 >>\r
67 >>> On Mon, Feb 09 2015, Nils Dagsson Moskopp <nils@dieweltistgarnichtso.ne=\r
68 t> wrote:\r
69 >>>\r
70 >>>> Dear notmuch developers,\r
71 >>>>\r
72 >>>>\r
73 >>>> I use notmuch-mode for GNU Emacs for managing my email.\r
74 >>>>\r
75 >>>> I think I have found a bug in notmuch-mode: If I do =E2=80=9C.-v=E2=80=\r
76 =9D on the line =E2=80=9C[\r
77 >>>> 2015 _ Richtlinien.pdf: application/pdf ]=E2=80=9D, then notmuch will =\r
78 open three\r
79 >>>> windows of zathura (the PDF viewer I use).\r
80 >>>>\r
81 >>>> It seems to me that someone here either forgot quoting or decided to\r
82 >>>> split filenames on spaces. I suggest that =E2=80=9C2015 _ Richtlinien.=\r
83 pdf:\r
84 >>>> application/pdf=E2=80=9D should be quoted in notmuch-show-view-part.\r
85 >>>>\r
86 >>>> Note that saving attachment (=E2=80=9C.-s=E2=80=9D, notmuch-show-save-=\r
87 part) generally\r
88 >>>> works even if the attachment file names have spaces. In case it matter=\r
89 s,\r
90 >>>> I normally use the rc(1) shell in Debian <http://tobold.org/article/rc=\r
91 >.\r
92 >>>\r
93 >>> This code handles the saving and displaying in question (quick look hop=\r
94  i\r
95 >>> am right :)\r
96 >>>\r
97 >>>    2282 (defun notmuch-show-save-part ()\r
98 >>>    2283   "Save the MIME part containing point to a file."\r
99 >>>    2284   (interactive)\r
100 >>>    2285   (notmuch-show-apply-to-current-part-handle #'mm-save-part))\r
101 >>>    2286=20\r
102 >>>    2287 (defun notmuch-show-view-part ()\r
103 >>>    2288   "View the MIME part containing point in an external viewer."\r
104 >>>    2289   (interactive)\r
105 >>>    2290   ;; Set mm-inlined-types to nil to force an external viewer\r
106 >>>    2291   (let ((mm-inlined-types nil))\r
107 >>>    2292     (notmuch-show-apply-to-current-part-handle #'mm-display-par=\r
108 t)))\r
109 >>>\r
110 >>> SO, there is 2 options:\r
111 >>>\r
112 >>> 1) mm executes save part correctly but not display part\r
113 >>\r
114 >> It seems I cannot investigate this with my knowledge, as =E2=80=9CM-x\r
115 >> find-function RET mm-display-part=E2=80=9D gives =E2=80=9CCan't find lib=\r
116 rary\r
117 >> /usr/share/emacs/23.4/lisp/gnus/mm-decode.el=E2=80=9D. Any ideas?\r
118 >>\r
119 >>> 2) there is (shell) wrapper program executing zathura which cannot hand=\r
120 le\r
121 >>>    arguments with spaces (there is plenty of examples of this!)\r
122 >>>\r
123 >>>\r
124 >>> You could try to check how th external processes are executed by execut=\r
125 ing:\r
126 >>>\r
127 >>> strace -f -e trace=3Dprocess emacs -f notmuch\r
128 >>>\r
129 >>> (emacs on X is preferable in this case ;)\r
130 >>\r
131 >> Thank you for that suggestion. It seems that there does happen both some\r
132 >> (wrong) escaping and splitting at spaces. I can see the following trace:\r
133 >>\r
134 >> --- snib ---\r
135 >> execve("/usr/bin/zathura", ["/usr/bin/zathura", "/tmp/emm.23178ut2/2015\=\r
136 \", "_\\", "Richtlinien.pdf"] [/* 51 vars */]) =3D 0\r
137 >> --- snab ---\r
138 >>\r
139 >> Somewhat unusually, it is preceeded by an invocation of the shell:\r
140 >>\r
141 >> --- sneb ---\r
142 >> execve("/usr/bin/rc", ["/usr/bin/rc", "-c", "/usr/bin/zathura /tmp/emm.2=\r
143 3178u"...], [/* 51 vars */] <unfinished ...>\r
144 >\r
145 > It would be useful to see the rest of this string ^^. Can you persuade\r
146 > strace to show more please?\r
147 \r
148 I have no idea how. Do you?\r
149 \r
150 =2D-=20\r
151 Nils Dagsson Moskopp // erlehmann\r
152 <http://dieweltistgarnichtso.net>\r
153 \r
154 --=-=-=\r
155 Content-Type: application/pgp-signature\r
156 \r
157 -----BEGIN PGP SIGNATURE-----\r
158 Version: GnuPG v1\r
159 \r
160 iF4EAREIAAYFAlVqWNkACgkQZGjbY/Ag5QlhYwEAgzdhGhNqr9NbD23t/wWp2wQS\r
161 Id4TvJlxg79cmYVkSfkBAKxXM0FBfKNLxCJ97ltJ6kYN9Nvnk5yXoQec8Ccv3Vj2\r
162 =FJJZ\r
163 -----END PGP SIGNATURE-----\r
164 --=-=-=--\r