Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A051640DDDC for ; Sat, 13 Nov 2010 08:43:44 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.899 X-Spam-Level: X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_SORBS_DUL=0.001] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xtH+YOLuPp-c for ; Sat, 13 Nov 2010 08:43:34 -0800 (PST) Received: from ced.ryick.net (ced.ryick.net [82.229.97.62]) by olra.theworths.org (Postfix) with ESMTP id 3F8DF40DDDD for ; Sat, 13 Nov 2010 08:43:34 -0800 (PST) Received: from lappy.localnet (unknown [192.168.0.1]) by ced.ryick.net (Postfix) with ESMTPS id 32B8787A71 for ; Sat, 13 Nov 2010 17:43:33 +0100 (CET) From: =?iso-8859-15?q?C=E9dric_Cabessa?= To: notmuch@notmuchmail.org Subject: Re: [PATCH] How to improve the mail handling workflow? Date: Sat, 13 Nov 2010 17:43:38 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.34-gentoo-r2; KDE/4.5.2; x86_64; ; ) References: <87fwv65zw1.fsf@free.fr> In-Reply-To: <87fwv65zw1.fsf@free.fr> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Message-Id: <201011131743.39114.ced@ryick.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2010 16:43:44 -0000 On Friday 12 November 2010 16:23:58 Matthieu Lemerre wrote: > - Processing mails which do not have any automatically added tag is > boring, because I need to press several keys to archive them: "+" to > add a tag, and then "a". If I forget about +, then my mail is > impossible to find. I feel the same ! I do not know if notmuch/xapian can find mail with 0 tag or only "attachmen= t"=20 tag for exemple ? The dirty solution I found is to create a virtual folder called "orphan" th= at=20 contains none of all the other tags (ie not tag:foo and not tag:bar and not= =20 =2E..) I do not considere "attachment" as a real tag. I should now do the same for= =20 "replied" and all other new stuff """ (require 'cl) (defun tagreduce(a b) (if (or (string=3D a "attachment") (string=3D b "attachment")) (if (string=3D a "attachment") b a ) (if (not (string-match "and not" a)) (concat "not tag:" a " and not tag:" b) (concat a " and not tag:" b) ) ) ) (defun orphan()=20 (reduce 'tagreduce (split-string (with-output-to-string (with-current-buffer standard-output (apply 'call-process notmuch-command nil t nil=20 "search-tags" nil))) "\n+" t)) ) (setq pnotmuch-orphans (append '("orphan") (orphan))) (setq notmuch-folders (append notmuch-folders (list pnotmuch-orphans))) """ (excuse my lisp ...) =2D-=20 C=E9dric