Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / c1 / 6a33f4af999a431f6766310d707d27cdad83cd
1 Return-Path: <ced@ryick.net>\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 A051640DDDC\r
6         for <notmuch@notmuchmail.org>; Sat, 13 Nov 2010 08:43:44 -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: -1.899\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9, RCVD_IN_SORBS_DUL=0.001] autolearn=ham\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 xtH+YOLuPp-c for <notmuch@notmuchmail.org>;\r
16         Sat, 13 Nov 2010 08:43:34 -0800 (PST)\r
17 Received: from ced.ryick.net (ced.ryick.net [82.229.97.62])\r
18         by olra.theworths.org (Postfix) with ESMTP id 3F8DF40DDDD\r
19         for <notmuch@notmuchmail.org>; Sat, 13 Nov 2010 08:43:34 -0800 (PST)\r
20 Received: from lappy.localnet (unknown [192.168.0.1])\r
21         by ced.ryick.net (Postfix) with ESMTPS id 32B8787A71\r
22         for <notmuch@notmuchmail.org>; Sat, 13 Nov 2010 17:43:33 +0100 (CET)\r
23 From: =?iso-8859-15?q?C=E9dric_Cabessa?= <ced@ryick.net>\r
24 To: notmuch@notmuchmail.org\r
25 Subject: Re: [PATCH] How to improve the mail handling workflow?\r
26 Date: Sat, 13 Nov 2010 17:43:38 +0100\r
27 User-Agent: KMail/1.13.5 (Linux/2.6.34-gentoo-r2; KDE/4.5.2; x86_64; ; )\r
28 References: <87fwv65zw1.fsf@free.fr>\r
29 In-Reply-To: <87fwv65zw1.fsf@free.fr>\r
30 MIME-Version: 1.0\r
31 Content-Type: Text/Plain;\r
32   charset="iso-8859-15"\r
33 Content-Transfer-Encoding: quoted-printable\r
34 Message-Id: <201011131743.39114.ced@ryick.net>\r
35 X-BeenThere: notmuch@notmuchmail.org\r
36 X-Mailman-Version: 2.1.13\r
37 Precedence: list\r
38 List-Id: "Use and development of the notmuch mail system."\r
39         <notmuch.notmuchmail.org>\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
43 List-Post: <mailto:notmuch@notmuchmail.org>\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
47 X-List-Received-Date: Sat, 13 Nov 2010 16:43:44 -0000\r
48 \r
49 On Friday 12 November 2010 16:23:58 Matthieu Lemerre wrote:\r
50 >  - Processing mails which do not have any automatically added tag is\r
51 >    boring, because I need to press several keys to archive them: "+" to\r
52 >    add a tag, and then "a". If I forget about +, then my mail is\r
53 >    impossible to find.\r
54 \r
55 I feel the same !\r
56 I do not know if notmuch/xapian can find mail with 0 tag or only "attachmen=\r
57 t"=20\r
58 tag for exemple ?\r
59 \r
60 The dirty solution I found is to create a virtual folder called "orphan" th=\r
61 at=20\r
62 contains none of all the other tags (ie not tag:foo and not tag:bar and not=\r
63 =20\r
64 =2E..)\r
65 \r
66 \r
67 I do not considere "attachment" as a real tag. I should now do the same for=\r
68 =20\r
69 "replied" and all other new stuff\r
70 \r
71 """\r
72 (require 'cl)\r
73 \r
74 (defun tagreduce(a b)\r
75   (if (or (string=3D a "attachment") (string=3D b "attachment"))\r
76       (if (string=3D a "attachment")\r
77         b\r
78         a\r
79         )\r
80     (if (not (string-match "and not" a))\r
81         (concat "not tag:" a " and not tag:" b)\r
82       (concat a " and not tag:" b)\r
83       )\r
84     )\r
85   )\r
86 \r
87 \r
88 (defun orphan()=20\r
89   (reduce 'tagreduce (split-string (with-output-to-string\r
90                                      (with-current-buffer standard-output\r
91                                        (apply 'call-process notmuch-command nil t nil=20\r
92 "search-tags" nil))) "\n+" t))\r
93 )\r
94 \r
95 (setq pnotmuch-orphans (append '("orphan") (orphan)))\r
96 (setq notmuch-folders (append notmuch-folders (list pnotmuch-orphans)))\r
97 \r
98 """\r
99 \r
100 (excuse my lisp ...)\r
101 \r
102 =2D-=20\r
103 C=E9dric\r