From 17c0e54c5fb721b69f10448625b95aab3b78b9e3 Mon Sep 17 00:00:00 2001 From: Pieter Praet Date: Mon, 23 Jan 2012 08:35:42 +0100 Subject: [PATCH] Re: [PATCH 3/4] config: only set search.exclude_tags to "deleted; spam; " during setup --- 3b/7794bc40eddf4efc4cb72b6627b33c7faa7761 | 186 ++++++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 3b/7794bc40eddf4efc4cb72b6627b33c7faa7761 diff --git a/3b/7794bc40eddf4efc4cb72b6627b33c7faa7761 b/3b/7794bc40eddf4efc4cb72b6627b33c7faa7761 new file mode 100644 index 000000000..07b703c29 --- /dev/null +++ b/3b/7794bc40eddf4efc4cb72b6627b33c7faa7761 @@ -0,0 +1,186 @@ +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 892D0429E54 + for ; Sun, 22 Jan 2012 23:37:39 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +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 tAlaVl7TY5Jv for ; + Sun, 22 Jan 2012 23:37:38 -0800 (PST) +Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com + [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5737C429E40 + for ; Sun, 22 Jan 2012 23:37:38 -0800 (PST) +Received: by wibhi8 with SMTP id hi8so378037wib.26 + for ; Sun, 22 Jan 2012 23:37:37 -0800 (PST) +Received: by 10.180.93.193 with SMTP id cw1mr11453300wib.5.1327304256805; + Sun, 22 Jan 2012 23:37:36 -0800 (PST) +Received: from localhost ([109.131.95.182]) + by mx.google.com with ESMTPS id cb8sm6919051wib.0.2012.01.22.23.37.35 + (version=TLSv1/SSLv3 cipher=OTHER); + Sun, 22 Jan 2012 23:37:36 -0800 (PST) +From: Pieter Praet +To: Jameson Graef Rollins , + Xavier Maillard , Austin Clements +Subject: Re: [PATCH 3/4] config: only set search.exclude_tags to "deleted; + spam; " during setup +In-Reply-To: <87y5sz0ypj.fsf@servo.finestructure.net> +References: <1326586654-16840-3-git-send-email-amdragon@mit.edu> + <1327000744-25463-1-git-send-email-pieter@praet.org> + <1327000744-25463-4-git-send-email-pieter@praet.org> + + <874nvnqrgq.fsf@servo.finestructure.net> <87ipk3au08.fsf@praet.org> + <87y5sz0ypj.fsf@servo.finestructure.net> +User-Agent: Notmuch/0.11+101~g94bf862 (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-unknown-linux-gnu) +Date: Mon, 23 Jan 2012 08:35:42 +0100 +Message-ID: <87fwf6c1m9.fsf@praet.org> +MIME-Version: 1.0 +X-Gm-Message-State: + ALoCoQnmlWBMimlQ/xGspfrQ/iQCTaFsmBIElvbSqHUYQ0K8REXr1oErCLXGPZAw9qul1lvP70tT +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +Cc: Notmuch Mail +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: Mon, 23 Jan 2012 07:37:39 -0000 + +On Sun, 22 Jan 2012 21:34:00 -0800, Jameson Graef Rollins wrote: +> On Mon, 23 Jan 2012 06:05:27 +0100, Pieter Praet wrote: +> > You definitely have a point, but then again, who are we to assume that +> > the terms "deleted" and "spam" have the *exact* same meaning for +> > everyone? (also see id:"8739bbo0br.fsf@praet.org") +>=20 +> Hrm. I'm not sure I buy this. Words already have meanings. If we're +> going to start down a rabbit hole where we have to assume that users are +> making up crazy alternate meanings for words, we're going to run into a +> lot of problems. +>=20 + +True, but we're talking about tags here. Flexibility is their raison +d'=C3=AAtre. If we're going to impose semi-arbitrary limitations, we do aw= +ay +with alot of the benefits we were looking for in the first place. + +> Notmuch, or at least the emacs interface, already assumes a specific +> meaning for certain terms, like most notably "inbox". Given that we're +> dealing with english here, I think we have to assume common usage +> meanings for any of the words we're using to describe anything. +>=20 + +Actually, we're only a small step away from being free to use whatever +tag(s) we want for this. The term "inbox" is hardcoded in only 4 +places, all of which are trivial to fix: + +- @ binary + - `notmuch_config_open', where it's only used as a fallback when + 'new.tags' isn't set (and reused to suggest a default value for + 'new.tags' when running setup). + +- @ Emacs UI + - `notmuch-saved-searches' (the function), where it's only used as + a fallback when `notmuch-saved-searches' (the var) isn't set. + - `notmuch-search-archive-thread' + - `notmuch-show-archive-thread-internal' + +> This argument breaks a little in regards to "delete" since we're not +> actually deleting anything in the sense of rm'ing it form the +> filesystem, so we're already changing the meaning a bit. But see below. +>=20 + +[...] + +> > IMHO, this is one of those options that should remain disabled until +> > *explicitly* set by the user. +>=20 +> Ok, but then we're back to the incredibly prolonged discussion we've +> been having about adding "delete" keys. If we disable this by default, +> but add "delete" keys, the user might be in for a different surprise if +> "deleted" messages keep showing up in searches. +>=20 +> Basically we have two options as I see it: +>=20 +> - add keys bindings to add "deleted" tags, and then *also* exclude +> "tag:deleted" by default. +>=20 +> - don't exclude anything by default, but then don't add any special keys +> to handle "deleted" tags. +>=20 + +Adding a key to "delete" messages doesn't necessarily have to mean that +the tag it adds should be hardcoded to "deleted". + +For example, our config file could contain something like this: + + #+begin_src conf + [new] + tags=3Dunread;inbox; + + [tag] + deleted=3Ddeleted;-inbox; + archive=3D-inbox; + + [search] + exclude_tags=3Ddeleted;spam; + #+end_src + + (where all entries under the [tag] section could be used as + aliases for "complex" tagging operations) + +... and then we could "delete" messages using something like: + + #+begin_src emacs-lisp + (define-key notmuch-show-mode-map "d" + (lambda() + (interactive) + (notmuch-show-mod-tags + (split-string + (notmuch-config-get "tag.deleted") "\n")) + (notmuch-show-next-open-message))) + #+end_src + + (`notmuch-show-mod-tags' doesn't exist, of course, but see + `notmuch-message-mark-replied' for a good example of how + it could be work...) + +> There seemed to be a consensus forming that we in fact did want to add +> the "deleted" key bindings. [...] + ++1. + +> [...] If we do that, then I think we should +> generate the config file to exclude "deleted" tags by default. +>=20 +> jamie. +>=20 +> PS: when I say "exclude tags by default" I actually mean that the +> setting should be added to the config file upon (re)generation. Nothing +> should be excluded if nothing is set in the config file. + +Exactly! This is actually the *only* reason I involved myself with this +whole conversation in the first place :) + + +Peace + +--=20 +Pieter -- 2.26.2