notmuch and "mute" -- useful to anyone?
[notmuch-archives.git] / 1d / c7df9590b432a0d3fda28fdd6a861969169b60
1 Return-Path: <wking@tremily.us>\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 9A2C6429E44\r
6         for <notmuch@notmuchmail.org>; Mon, 10 Feb 2014 10:42:19 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
9 X-Spam-Flag: NO\r
10 X-Spam-Score: 0\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
13         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001]\r
14         autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id bbdV5PU532p9 for <notmuch@notmuchmail.org>;\r
18         Mon, 10 Feb 2014 10:42:14 -0800 (PST)\r
19 Received: from qmta13.westchester.pa.mail.comcast.net\r
20         (qmta13.westchester.pa.mail.comcast.net [76.96.59.243])\r
21         by olra.theworths.org (Postfix) with ESMTP id 9692A431E62\r
22         for <notmuch@notmuchmail.org>; Mon, 10 Feb 2014 10:41:56 -0800 (PST)\r
23 Received: from omta21.westchester.pa.mail.comcast.net ([76.96.62.72])\r
24         by qmta13.westchester.pa.mail.comcast.net with comcast\r
25         id Qh2Z1n0041ZXKqc5DihwkL; Mon, 10 Feb 2014 18:41:56 +0000\r
26 Received: from odin.tremily.us ([24.18.63.50])\r
27         by omta21.westchester.pa.mail.comcast.net with comcast\r
28         id Qihv1n006152l3L3hihvsS; Mon, 10 Feb 2014 18:41:56 +0000\r
29 Received: from mjolnir.tremily.us (unknown [192.168.0.140])\r
30         by odin.tremily.us (Postfix) with ESMTPS id 0F19210167AF;\r
31         Mon, 10 Feb 2014 10:41:55 -0800 (PST)\r
32 Received: (nullmailer pid 1257 invoked by uid 1000);\r
33         Mon, 10 Feb 2014 18:40:45 -0000\r
34 From: "W. Trevor King" <wking@tremily.us>\r
35 To: notmuch@notmuchmail.org\r
36 Subject: [PATCH v2 07/20] nmbug-status: Don't require write access\r
37 Date: Mon, 10 Feb 2014 10:40:28 -0800\r
38 Message-Id:\r
39  <ad3828a4c670876c16352a7bc7a147152a7cbb5b.1392056624.git.wking@tremily.us>\r
40 X-Mailer: git-send-email 1.8.5.2.8.g0f6c0d1\r
41 In-Reply-To: <cover.1392056624.git.wking@tremily.us>\r
42 References: <cover.1392056624.git.wking@tremily.us>\r
43 In-Reply-To: <cover.1392056624.git.wking@tremily.us>\r
44 References: <cover.1392056624.git.wking@tremily.us>\r
45 MIME-Version: 1.0\r
46 Content-Type: text/plain; charset=UTF-8\r
47 Content-Transfer-Encoding: 8bit\r
48 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
49         s=q20121106; t=1392057716;\r
50         bh=mOi9DNGt/9vulM62iNpwG3mj3ZW5v7HGmIXcbYknaVA=;\r
51         h=Received:Received:Received:Received:From:To:Subject:Date:\r
52         Message-Id:MIME-Version:Content-Type;\r
53         b=RXowinSxD4MhwwZBsJzCwC2p2X0soQMSPoby4XO6U1dD/pihaxyrMTVrdN5pffiNn\r
54         xBpGgu1u4r9eSQdSxtUeB2AZyIdGp7l0asAoIiG2dG8M2w+hnRBtEQdXhAauE9eAmc\r
55         Lz8NipPzS1dpK7KmUJMewptR3yqFpjVToUrLu15+Sur/yBvdXj6qqTcdOR6N0/Cp9V\r
56         Gf2NouKDlwGem7DkmWYfXRj/UT+Vl8FlX2cXR/cKitUiPqvQWf6fux44kh5DpsOAX9\r
57         RnIc/oaZAuzmH1MVV1aDK9m//ObHvaSyrpf+ARtbtDpfZUkywoV619Ooed5KIwISs4\r
58         rCX+IAWuFq/4Q==\r
59 Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
60 X-BeenThere: notmuch@notmuchmail.org\r
61 X-Mailman-Version: 2.1.13\r
62 Precedence: list\r
63 List-Id: "Use and development of the notmuch mail system."\r
64         <notmuch.notmuchmail.org>\r
65 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
67 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
68 List-Post: <mailto:notmuch@notmuchmail.org>\r
69 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
70 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
71         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
72 X-List-Received-Date: Mon, 10 Feb 2014 18:42:19 -0000\r
73 \r
74 The database in only used for notmuch.Query, so there's no need for\r
75 write access.  This allows nmbug-status to run while the database is\r
76 being updated, without raising:\r
77 \r
78   A Xapian exception occurred opening database: Unable to get write lock on …: already locked\r
79   Traceback (most recent call last):\r
80     File "./nmbug-status", line 182, in <module>\r
81       db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE)\r
82     File "/…/notmuch/database.py", line 154, in __init__\r
83       self.open(path, mode)\r
84     File "/…/notmuch/database.py", line 214, in open\r
85       raise NotmuchError(status)\r
86   notmuch.errors.XapianError\r
87 ---\r
88  devel/nmbug/nmbug-status | 2 +-\r
89  1 file changed, 1 insertion(+), 1 deletion(-)\r
90 \r
91 diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
92 index 199892f..be3e28e 100755\r
93 --- a/devel/nmbug/nmbug-status\r
94 +++ b/devel/nmbug/nmbug-status\r
95 @@ -180,7 +180,7 @@ else:\r
96  \r
97  # main program\r
98  \r
99 -db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE)\r
100 +db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)\r
101  \r
102  if output_format == 'html':\r
103      print('''<?xml version="1.0" encoding="utf-8" ?>\r
104 -- \r
105 1.8.5.2.8.g0f6c0d1\r
106 \r