Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 04 / 594f14f56fc34fa184d9718a5d359529749bfd
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 14BAA431FC7\r
6         for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 12:04:36 -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 Zxfbhc3euh5q for <notmuch@notmuchmail.org>;\r
16         Sat, 15 Dec 2012 12:04:35 -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 B24A4431FC2\r
20         for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 12:04:34 -0800 (PST)\r
21 X-AuditID: 1209190d-b7f266d00000092b-81-50ccd7d1c647\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
23         by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id BD.DB.02347.1D7DCC05; Sat, 15 Dec 2012 15:04:33 -0500 (EST)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id qBFK4WQG022933; \r
27         Sat, 15 Dec 2012 15:04:32 -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 qBFK4SYq025680\r
33         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
34         Sat, 15 Dec 2012 15:04:31 -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 1TjxyG-0007sP-Gd; Sat, 15 Dec 2012 15:04:28 -0500\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: notmuch@notmuchmail.org\r
40 Subject: [PATCH v2 0/7] Improve Emacs CLI error handling\r
41 Date: Sat, 15 Dec 2012 15:04:13 -0500\r
42 Message-Id: <1355601860-30121-1-git-send-email-amdragon@mit.edu>\r
43 X-Mailer: git-send-email 1.7.10.4\r
44 X-Brightmail-Tracker:\r
45  H4sIAAAAAAAAA+NgFlrPIsWRmVeSWpSXmKPExsUixCmqrXvx+pkAg3ddMhar5/JYXL85k9ni\r
46         zcp5rA7MHjtn3WX3OPx1IYvHs1W3mAOYo7hsUlJzMstSi/TtErgydvU8YyrYK16x7sQB5gbG\r
47         XuEuRk4OCQETiYuvOhkhbDGJC/fWs3UxcnEICexjlGj4MIcdwtnAKHF6+XEmCOcRk8TUzxeZ\r
48         IZy5jBL3+lvZQfrZBDQktu1fDjZLREBaYufd2awgNrOAocTlrx0sILawgIXE2YVfmUFsFgFV\r
49         iVeTn4PFeQUcJLbt2M0McYeiRPezCWwTGHkXMDKsYpRNya3SzU3MzClOTdYtTk7My0st0jXS\r
50         y80s0UtNKd3ECA4XSd4djO8OKh1iFOBgVOLh3RFxOkCINbGsuDL3EKMkB5OSKG/G5TMBQnxJ\r
51         +SmVGYnFGfFFpTmpxYcYJTiYlUR4k+YD5XhTEiurUovyYVLSHCxK4rxXUm76CwmkJ5akZqem\r
52         FqQWwWRlODiUJHinXgNqFCxKTU+tSMvMKUFIM3FwggznARreDVLDW1yQmFucmQ6RP8WoKCXO\r
53         uxAkIQCSyCjNg+uFxfMrRnGgV4R5q0CqeICpAK77FdBgJqDBy23ABpckIqSkGhg1WcInhGdK\r
54         x5X9Nl6dYSp5OGCuy0Gl/exXXqadsfvftfzM6bP+qkx7ozjePZzGoZCr9T66Q2DCpvI5c2/9\r
55         WRFaqbe+La7+hJIuqxXbTYdjHD926S1udGUovTRdfQ9PwdH6rx85Tu50+ODQ7eBbX7Pa+ulr\r
56         me983B7r25h2zbOLWSaa5epvL6/EUpyRaKjFXFScCACrPKL1wgIAAA==\r
57 Cc: tomi.ollila@iki.fi\r
58 X-BeenThere: notmuch@notmuchmail.org\r
59 X-Mailman-Version: 2.1.13\r
60 Precedence: list\r
61 List-Id: "Use and development of the notmuch mail system."\r
62         <notmuch.notmuchmail.org>\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
66 List-Post: <mailto:notmuch@notmuchmail.org>\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
70 X-List-Received-Date: Sat, 15 Dec 2012 20:04:36 -0000\r
71 \r
72 This obsoletes id:1355548513-10085-1-git-send-email-amdragon@mit.edu\r
73 and fixes the things Mark and Tomi commented on.  The interdiff is\r
74 below.\r
75 \r
76 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
77 index cf61635..8f84087 100644\r
78 --- a/emacs/notmuch-lib.el\r
79 +++ b/emacs/notmuch-lib.el\r
80 @@ -326,10 +326,12 @@ the user dismisses it."\r
81      (with-current-buffer buf\r
82        (view-mode-enter nil #'kill-buffer)\r
83        (let ((inhibit-read-only t))\r
84 +       (goto-char (point-max))\r
85 +       (unless (bobp)\r
86 +         (insert "\n"))\r
87         (insert msg)\r
88         (unless (bolp)\r
89 -         (insert "\n"))\r
90 -       (goto-char (point-min))))\r
91 +         (insert "\n"))))\r
92      (pop-to-buffer buf)))\r
93  \r
94  (defun notmuch-check-async-exit-status (proc msg)\r
95 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
96 index c20de13..b0fd387 100644\r
97 --- a/emacs/notmuch.el\r
98 +++ b/emacs/notmuch.el\r
99 @@ -536,8 +536,9 @@ If BARE is set then do not prefix with \"thread:\""\r
100  (defun notmuch-call-notmuch-process (&rest args)\r
101    "Synchronously invoke \"notmuch\" with the given list of arguments.\r
102  \r
103 -Output from the process will be presented to the user as an error\r
104 -and will also appear in a buffer named \"*Notmuch errors*\"."\r
105 +If notmuch exits with a non-zero status, output from the process\r
106 +will appear in a buffer named \"*Notmuch errors*\" and an error\r
107 +will be signaled."\r
108    (with-temp-buffer\r
109      (let ((status (apply #'call-process notmuch-command nil t nil args)))\r
110        (notmuch-check-exit-status status (cons notmuch-command args)\r
111 @@ -649,7 +650,7 @@ of the result."\r
112                       (insert "Incomplete search results (search process was killed).\n"))\r
113                   (when (eq status 'exit)\r
114                     (insert "End of search results.\n")\r
115 -                   (condition-case err\r
116 +                   (condition-case nil\r
117                         (notmuch-check-async-exit-status proc msg)\r
118                       ;; Suppress the error signal since strange\r
119                       ;; things happen if a sentinel signals.\r
120 diff --git a/test/emacs b/test/emacs\r
121 index 88b062c..5067d67 100755\r
122 --- a/test/emacs\r
123 +++ b/test/emacs\r
124 @@ -873,7 +873,7 @@ This is output\r
125  Error: Unexpected output from notmuch search:\r
126  This is an error\r
127  End of search results.\r
128 -Error invoking notmuch.  /tmp/nmtest/tmp.emacs/notmuch_fail search --format=json --sort=newest-first tag:inbox exited with status 1."\r
129 +Error invoking notmuch.  $PWD/notmuch_fail search --format=json --sort=newest-first tag:inbox exited with status 1."\r
130  \r
131  \r
132  test_done\r
133 diff --git a/test/emacs-show b/test/emacs-show\r
134 index c67c6a4..40fab61 100755\r
135 --- a/test/emacs-show\r
136 +++ b/test/emacs-show\r
137 @@ -178,7 +178,7 @@ test_emacs "(let ((notmuch-command \"$PWD/notmuch_fail\"))\r
138                (with-current-buffer \"*Notmuch errors*\"\r
139                   (test-output \"ERROR\")))"\r
140  test_expect_equal "$(cat OUTPUT ERROR)" "\\r
141 -Error invoking notmuch.  /tmp/nmtest/tmp.emacs-show/notmuch_fail show --format=json --exclude=false ' * ' exited with status 1.\r
142 +Error invoking notmuch.  $PWD/notmuch_fail show --format=json --exclude=false ' * ' exited with status 1.\r
143  Error:\r
144  This is an error\r
145  Output:\r
146 \r
147 \r