Re: Add support for specifying tags during "notmuch new"
authorDavid Edmondson <dme@dme.org>
Fri, 2 May 2014 15:32:50 +0000 (16:32 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:02:06 +0000 (10:02 -0800)
e6/f183c762b7887b1ce094e72695600d7c0dcc41 [new file with mode: 0644]

diff --git a/e6/f183c762b7887b1ce094e72695600d7c0dcc41 b/e6/f183c762b7887b1ce094e72695600d7c0dcc41
new file mode 100644 (file)
index 0000000..69c3e9a
--- /dev/null
@@ -0,0 +1,115 @@
+Return-Path: <dme@dme.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id CC6DB429E41\r
+       for <notmuch@notmuchmail.org>; Fri,  2 May 2014 08:33:05 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 0iWrR0gF8aoo for <notmuch@notmuchmail.org>;\r
+       Fri,  2 May 2014 08:33:02 -0700 (PDT)\r
+Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com\r
+ [74.125.82.43])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ BF662429E32   for <notmuch@notmuchmail.org>; Fri,  2 May 2014 08:33:01 -0700\r
+ (PDT)\r
+Received: by mail-wg0-f43.google.com with SMTP id l18so3798366wgh.14\r
+       for <notmuch@notmuchmail.org>; Fri, 02 May 2014 08:32:59 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=1e100.net; s=20130820;\r
+       h=x-gm-message-state:to:cc:subject:in-reply-to:references:user-agent\r
+       :from:date:message-id:mime-version:content-type;\r
+       bh=a7ioiZCitu4sP+xFu3sRNL6jZ3NCBX3jawYjfalPvrw=;\r
+       b=fG7vNrgOpSyKv915dlMFvmXxir0/X3nU+0aJo8R3BQT2Amky6fsnJGwD6T8G3WZ+Jb\r
+       h1LiFeJY7UiReyYGPEjPaviZVk0TYAw0apob6GNEwoEruTr1pGNN3M9LMr9CbXPJI6js\r
+       Xv0XIzN7Sy5RppEaf39fd7Q5Y4WCR/k8CXLtql1sU9sNZ+E+dVkF0J6esc4ObGSrjxNZ\r
+       B9OKVnU6ACZzZuAZf6nbaNkzU06skmiMPZ1y0NnxqSAqtuagnW7PpVOdnl/jnKaaEzSw\r
+       +mLd8RpsDvhhhzjBdswzZPYj0QTulrSi0neP99PCPROY55ZvFpR6Xedv7/XDAn1dN8vZ\r
+       ybmg==\r
+X-Gm-Message-State:\r
+ ALoCoQmHOeMN18ZXn4SPonAYregKRX4JJvz8/FV3f+7lBkn9yJANPbctKFC6gxHVTyXwUQxdUgYE\r
+X-Received: by 10.180.91.1 with SMTP id ca1mr3526268wib.32.1399044778278;\r
+       Fri, 02 May 2014 08:32:58 -0700 (PDT)\r
+Received: from localhost ([2a01:348:1a2:1:a288:b4ff:fe8a:77d8])\r
+       by mx.google.com with ESMTPSA id vc2sm2661022wjc.2.2014.05.02.08.32.56\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Fri, 02 May 2014 08:32:57 -0700 (PDT)\r
+To: Austin Clements <amdragon@MIT.EDU>\r
+Subject: Re: Add support for specifying tags during "notmuch new"\r
+In-Reply-To: <20140502151800.GC8365@mit.edu>\r
+References: <1399018555-1994-1-git-send-email-dme@dme.org>\r
+       <20140502151800.GC8365@mit.edu>\r
+User-Agent: Notmuch/0.18~rc0 (http://notmuchmail.org) Emacs/24.3.1\r
+       (x86_64-pc-linux-gnu)\r
+From: David Edmondson <dme@dme.org>\r
+Date: Fri, 02 May 2014 16:32:50 +0100\r
+Message-ID: <cun38gsgpr1.fsf@hotblack-desiato.hh.sledj.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 02 May 2014 15:33:06 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain\r
+\r
+On Fri, May 02 2014, Austin Clements wrote:\r
+>>     2) A periodic mail processing script wants to add new messages to\r
+>>        the database, then process those newly added messages to add\r
+>>        convenience tags, etc. without worrying about the user or other\r
+>>        instances of the script manipulating tags at the same time. Use\r
+>>        this approach:\r
+>>          KEY=$RANDOM\r
+>>      notmuch new +$KEY\r
+>>      notmuch tag +notmuch tag:$KEY and to:notmuch@notmuchmail.org\r
+>>      notmuch tag +gnus tag:$KEY and to:ding@gnus.org\r
+>>      ...\r
+>>      notmuch tag -$KEY tag:$KEY\r
+>\r
+> What happens when this script dies in the middle (say, your computer\r
+> loses power or notmuch tag conflicts with something else on the write\r
+> lock)?\r
+\r
+It's a problem. I think that I would actually add both 'new' and\r
+'new-$seconds' tags (given that I can't search on wildcarded tags) and\r
+have 'notmuch tag' use only 'new-$seconds'.\r
+\r
+The 'new' tag would help recover from failures such as you describe.\r
+\r
+> One advantage of the standard "new" tag approach is that it's easy to\r
+> write a stateless post-new tagging script that can be killed at any\r
+> point and restarted.  (You're right that post-new has a concurrency\r
+> issue, but we should fix that in its own right.)\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1\r
+\r
+iKYEARECAGYFAlNjuqJfFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3Bl\r
+bnBncC5maWZ0aGhvcnNlbWFuLm5ldDc1M0Y5NDJDMEExNjc3MDE4OURGMUYyMDY5\r
+RUNEMEFCRjA0OTY1MTYACgkQaezQq/BJZRZP3gCfbWjsjtXd0IuVlKO5pOZx9p+N\r
+k0MAn1MlRr4mP5MID80FwxpYDnWhAHJF\r
+=DKrB\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r