Re: bug report: Emacs notmuch-mode fails attachments with spaces
[notmuch-archives.git] / 02 / 2af0b37b8ab5707e13f136fd8ca987da5fe414
1 Return-Path: <amdragon@mit.edu>\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 CAC0C431FC0\r
6         for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 19:17:47 -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: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 e48pGluUJCb2 for <notmuch@notmuchmail.org>;\r
16         Sat, 15 Dec 2012 19:17:43 -0800 (PST)\r
17 Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU\r
18         [18.9.25.13])\r
19         by olra.theworths.org (Postfix) with ESMTP id 127BB431FC4\r
20         for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 19:17:41 -0800 (PST)\r
21 X-AuditID: 1209190d-b7f266d00000092b-2c-50cd3d55bcfe\r
22 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
23         by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id EE.F6.02347.55D3DC05; Sat, 15 Dec 2012 22:17:41 -0500 (EST)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id qBG3He09012442; \r
27         Sat, 15 Dec 2012 22:17:40 -0500\r
28 Received: from drake.dyndns.org\r
29         (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
30         [209.6.116.242]) (authenticated bits=0)\r
31         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
32         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qBG3Hb2g012060\r
33         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
34         Sat, 15 Dec 2012 22:17:39 -0500 (EST)\r
35 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
36         (envelope-from <amdragon@mit.edu>)\r
37         id 1Tk4jP-0007cE-QQ; Sat, 15 Dec 2012 22:17:35 -0500\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: notmuch@notmuchmail.org\r
40 Subject: [PATCH 6/7] emacs: Special handling for version mismatch errors\r
41 Date: Sat, 15 Dec 2012 22:17:28 -0500\r
42 Message-Id: <1355627849-29099-7-git-send-email-amdragon@mit.edu>\r
43 X-Mailer: git-send-email 1.7.10.4\r
44 In-Reply-To: <1355627849-29099-1-git-send-email-amdragon@mit.edu>\r
45 References: <1355627849-29099-1-git-send-email-amdragon@mit.edu>\r
46 X-Brightmail-Tracker:\r
47  H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsUixG6nohtqezbAYN5NZYvVc3ksrt+cyezA\r
48         5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZdz584G1YClXxdM3y5gaGGdydDFyckgImEjc\r
49         blrHAmGLSVy4t56ti5GLQ0hgH6PE1w37GCGcDYwSXZO+skI4j5gkvq9/zwzhzGWU2L2umRmk\r
50         n01AQ2Lb/uWMILaIgLTEzruzWUFsZgFHic/7F7GB2MICHhI/nu0Bs1kEVCUadj8Gq+cVcJC4\r
51         e/0oI8QdihLdzyaA1XAC9W7e8hPMFgKqmX3kKNsERv4FjAyrGGVTcqt0cxMzc4pTk3WLkxPz\r
52         8lKLdI30cjNL9FJTSjcxgkKJU5J3B+O7g0qHGAU4GJV4eC2+ngkQYk0sK67MPcQoycGkJMqb\r
53         Y3k2QIgvKT+lMiOxOCO+qDQntfgQowQHs5IIb9J8oHLelMTKqtSifJiUNAeLkjjvlZSb/kIC\r
54         6YklqdmpqQWpRTBZGQ4OJQleZhugoYJFqempFWmZOSUIaSYOTpDhPEDDlUFqeIsLEnOLM9Mh\r
55         8qcYFaXEeaVAEgIgiYzSPLheWKy/YhQHekWYVwOkigeYJuC6XwENZgIavNwG5OrikkSElFQD\r
56         Y9xlh2e9H9fWFB0z3v1QZOnmB6zXCx7Me6ikdZzhUn+B3eIDkn2W/zV7MqQPHtHIyPcpWNV7\r
57         TL18ft40AdP6hhO3+pgfM6jdX2JTFjbvwXvrt+sETke0XV4XWLlkc4Bck2pbm7dwl0JT446P\r
58         sssPL26tYT8oZ23XbG6Y6TrHkOGpCuucS/d5lFiKMxINtZiLihMB2dR/FNACAAA=\r
59 X-BeenThere: notmuch@notmuchmail.org\r
60 X-Mailman-Version: 2.1.13\r
61 Precedence: list\r
62 List-Id: "Use and development of the notmuch mail system."\r
63         <notmuch.notmuchmail.org>\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
65         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
67 List-Post: <mailto:notmuch@notmuchmail.org>\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
71 X-List-Received-Date: Sun, 16 Dec 2012 03:17:48 -0000\r
72 \r
73 Since Emacs has more semantic information, we suppress the generic\r
74 format version error from the CLI and give a more informative error.\r
75 ---\r
76  emacs/notmuch-lib.el |   11 ++++++++++-\r
77  1 file changed, 10 insertions(+), 1 deletion(-)\r
78 \r
79 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
80 index 8f84087..9ec30ea 100644\r
81 --- a/emacs/notmuch-lib.el\r
82 +++ b/emacs/notmuch-lib.el\r
83 @@ -360,9 +360,18 @@ giving the output of command.  ERR-FILE, if provided, is the name\r
84  of a file containing the error output of command.  OUTPUT and the\r
85  contents of ERR-FILE will be included in the error message."\r
86  \r
87 -  ;; This is implemented as a cond to make it easy to expand.\r
88    (cond\r
89     ((eq exit-status 0) t)\r
90 +   ((eq exit-status 20)\r
91 +    (notmuch-pop-up-error "Error: Version mismatch.\r
92 +Emacs requested an older output format than supported by the notmuch CLI.\r
93 +You may need to restart Emacs or upgrade your notmuch Emacs package.")\r
94 +    (error "notmuch CLI version mismatch"))\r
95 +   ((eq exit-status 21)\r
96 +    (notmuch-pop-up-error "Error: Version mismatch.\r
97 +Emacs requested a newer output format than supported by the notmuch CLI.\r
98 +You may need to restart Emacs or upgrade your notmuch package.")\r
99 +    (error "notmuch CLI version mismatch"))\r
100     (t\r
101      (notmuch-pop-up-error\r
102       (concat\r
103 -- \r
104 1.7.10.4\r
105 \r