[PATCH 0/2] emacs: wash: word-wrap bugfix and tweak
[notmuch-archives.git] / ff / a1044efdfed9226f4903d493dc6f53eab0b89d
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 EAABC429E25\r
6         for <notmuch@notmuchmail.org>; Fri,  9 Dec 2011 07:58:15 -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 sjBiLG41CjBf for <notmuch@notmuchmail.org>;\r
16         Fri,  9 Dec 2011 07:58:15 -0800 (PST)\r
17 Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
18         [18.9.25.14])\r
19         by olra.theworths.org (Postfix) with ESMTP id 65EA3431FB6\r
20         for <notmuch@notmuchmail.org>; Fri,  9 Dec 2011 07:58:15 -0800 (PST)\r
21 X-AuditID: 1209190e-b7f4a6d0000008e5-fc-4ee230165012\r
22 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
23         by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 47.EE.02277.61032EE4; Fri,  9 Dec 2011 10:58:14 -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 pB9FvxQO022944; \r
27         Fri, 9 Dec 2011 10:58:00 -0500\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pB9Fvwur014630\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Fri, 9 Dec 2011 10:57:59 -0500 (EST)\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1RZ2rL-0008Q4-74; Fri, 09 Dec 2011 10:59:39 -0500\r
37 Date: Fri, 9 Dec 2011 10:59:39 -0500\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Jani Nikula <jani@nikula.org>\r
40 Subject: Re: [PATCH v4 1/3] cli: introduce the concept of user defined hooks\r
41 Message-ID: <20111209155939.GF3190@mit.edu>\r
42 References: <cover.1323384304.git.jani@nikula.org>\r
43         <1e4ddb5e3a6b980e47418f67e16709a42e63bc47.1323384304.git.jani@nikula.org>\r
44         <20111208233429.GA3190@mit.edu> <87r50dyhmg.fsf@nikula.org>\r
45 MIME-Version: 1.0\r
46 Content-Type: text/plain; charset=us-ascii\r
47 Content-Disposition: inline\r
48 In-Reply-To: <87r50dyhmg.fsf@nikula.org>\r
49 User-Agent: Mutt/1.5.21 (2010-09-15)\r
50 X-Brightmail-Tracker:\r
51  H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IRYrdT0RUzeORnsGOfhUXTdGeL6zdnMjsw\r
52         edy6/5rd49mqW8wBTFFcNimpOZllqUX6dglcGevffWYpuMtbMXvdecYGxsNcXYycHBICJhI7\r
53         bk9igrDFJC7cW8/WxcjFISSwj1Hi/tzDjBDOekaJ91vnQ2VOMEksvb2TFcJZwiix+vMfVpB+\r
54         FgEViYkzdzOC2GwCGhLb9i8Hs0UEFCU2n9wPZjMLSEt8+90Mtk9YwEdix8l5bCA2r4C2xKOp\r
55         h1jhdrdcXsYMkRCUODnzCQtEs5bEjX8vgZo5wAYt/8cBYnIC7eq/CzZGFOiEKSe3sU1gFJqF\r
56         pHkWkuZZCM0LGJlXMcqm5Fbp5iZm5hSnJusWJyfm5aUW6Rrr5WaW6KWmlG5iBIU1pyTfDsav\r
57         B5UOMQpwMCrx8HZyP/QTYk0sK67MPcQoycGkJMq7U/eRnxBfUn5KZUZicUZ8UWlOavEhRgkO\r
58         ZiURXhV5oBxvSmJlVWpRPkxKmoNFSZy3dhfQJIH0xJLU7NTUgtQimKwMB4eSBK+SPlCjYFFq\r
59         empFWmZOCUKaiYMTZDgP0PBkkBre4oLE3OLMdIj8KUZFKXFeB5CEAEgiozQPrheWdl4xigO9\r
60         IsyrDFLFA0xZcN2vgAYzAQ3+kv0AZHBJIkJKqoGx32URH1865zJeY6Gk3/GMiw+UaKnPWXq3\r
61         Vy34/K/1L5xLt3wv+X2pZI3sypj1k4+sKwj8cmjNHNmHGy7y2v3u9r7eeu+MOtf/hMNsv54u\r
62         +vrkRG35FN2XQfkv+DNad/DO7d69zvnJPb2jQXvjuWYuz0qX6Juh+e34tJunDwfZ+v+a8/3V\r
63         aw6tM0osxRmJhlrMRcWJAJ8rprQWAwAA\r
64 Cc: notmuch@notmuchmail.org\r
65 X-BeenThere: notmuch@notmuchmail.org\r
66 X-Mailman-Version: 2.1.13\r
67 Precedence: list\r
68 List-Id: "Use and development of the notmuch mail system."\r
69         <notmuch.notmuchmail.org>\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
71         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
73 List-Post: <mailto:notmuch@notmuchmail.org>\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
76         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
77 X-List-Received-Date: Fri, 09 Dec 2011 15:58:16 -0000\r
78 \r
79 Quoth Jani Nikula on Dec 09 at  1:55 pm:\r
80 > On Thu, 8 Dec 2011 18:34:29 -0500, Austin Clements <amdragon@MIT.EDU> wrote:\r
81 > > Quoth Jani Nikula on Dec 09 at 12:48 am:\r
82 > > > +    /* Check access before fork() for speed and simplicity of error handling. */\r
83 > > > +    if (access (hook_path, X_OK) == -1) {\r
84 > > > + /* Ignore ENOENT. It's okay not to have a hook, hook dir, or even\r
85 > > > +  * notmuch dir. Dangling symbolic links also result in ENOENT, but\r
86 > > > +  * we'll ignore that too for simplicity. */\r
87 > > > + if (errno != ENOENT) {\r
88 > > > +     fprintf (stderr, "Error: %s hook access failed: %s\n", hook,\r
89 > > > +              strerror (errno));\r
90 > > > +     status = 1;\r
91 > > > + }\r
92 > > \r
93 > > Is it the intent that a present but non-executable hook (errno ==\r
94 > > EACCES) will print the above error message and return with a failure?\r
95 > > I'm pretty sure this differs from the behavior of git hooks.\r
96\r
97 > It differs from git, and it is intentional. Git bails out with success\r
98 > status, without even a warning, for *all* access() failures. That may be\r
99 > fine for git (which generally expects the user to know what he's doing)\r
100 > but I'd argue notmuch should let the user know something is wrong.\r
101\r
102 > Also for EACCES, IMHO failing is more useful to the user than silently\r
103 > ignoring. If the hook exists, but isn't executable, I think it's way\r
104 > more likely that the user forgot to chmod +x than intentionally dropped\r
105 > x so the hook would not be run. (And I think we agreed on IRC that in\r
106 > the future, sample hooks would be named hook.sample and have executable\r
107 > bit set.)\r
108\r
109 > Anyway, this is my opinion; it's not a big deal to change if there are\r
110 > compelling reasons to ignore EACCES that I didn't think of.\r
111 \r
112 Consider me convinced.\r