From 40fda4224ff00b6fb0278e95db258ba63f4557c4 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Mon, 4 Jun 2012 07:01:57 +0000 Subject: [PATCH] Re: [PATCH 3/4] lib: Only synchronize maildir flags for messages in maildirs --- be/6502be8f4245b366f9c7d2d0577253144c78a9 | 110 ++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 be/6502be8f4245b366f9c7d2d0577253144c78a9 diff --git a/be/6502be8f4245b366f9c7d2d0577253144c78a9 b/be/6502be8f4245b366f9c7d2d0577253144c78a9 new file mode 100644 index 000000000..10a0c779b --- /dev/null +++ b/be/6502be8f4245b366f9c7d2d0577253144c78a9 @@ -0,0 +1,110 @@ +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 7E9EA431FB6 + for ; Mon, 4 Jun 2012 00:02:04 -0700 (PDT) +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 SbCA59G43PmT for ; + Mon, 4 Jun 2012 00:02:03 -0700 (PDT) +Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com + [209.85.212.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id DB5D3431FAF + for ; Mon, 4 Jun 2012 00:02:02 -0700 (PDT) +Received: by vbbfc26 with SMTP id fc26so3919400vbb.26 + for ; Mon, 04 Jun 2012 00:02:02 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type:x-gm-message-state; + bh=VkKljJxf22oxM1a9M2+k17c4w22D6txHOvs7YpqOLo4=; + b=S6FcH9KpdVExmccg+gCxrw/F5PX4fvUrxrn9+t3iWQuUdIz2c1je5ePxuPl70NHTxc + CY3KuQT0tPBFiF8c/iZP5qnlMktmK3BNC/ypfsjtPL+1QFHeAKyT6ZAhbp/BdbgKzq05 + XLpEs+r5kb/lEaRu99VjrCl3Oo/bMUzwUhrJyH87jj9LT/ZFqmSg+Kr8MR3QW5lFFUIF + 7LPbIaxNL//Hkekq+JwO5qPeyxMslAUPWdjir+vKg21fRRF/uAgRp1iVsjaNvUAteOIN + Iz4pjO5u2NZmdlRpn4Um+ce3DBQEnIXUDkRoppYQuhoNHRoC5YP2Yl4vYZncKhQnatpL + ngNQ== +Received: by 10.220.242.14 with SMTP id lg14mr11220265vcb.28.1338793320988; + Mon, 04 Jun 2012 00:02:00 -0700 (PDT) +Received: from localhost (nikula.org. [92.243.24.172]) + by mx.google.com with ESMTPS id c17sm16068196vdj.11.2012.06.04.00.01.59 + (version=SSLv3 cipher=OTHER); Mon, 04 Jun 2012 00:02:00 -0700 (PDT) +From: Jani Nikula +To: Austin Clements , notmuch@notmuchmail.org +Subject: Re: [PATCH 3/4] lib: Only synchronize maildir flags for messages in + maildirs +In-Reply-To: <1338742656-11640-4-git-send-email-amdragon@mit.edu> +References: <1338742656-11640-1-git-send-email-amdragon@mit.edu> + <1338742656-11640-4-git-send-email-amdragon@mit.edu> +User-Agent: Notmuch/0.13+9~ga1668d0 (http://notmuchmail.org) Emacs/23.1.1 + (i686-pc-linux-gnu) +Date: Mon, 04 Jun 2012 07:01:57 +0000 +Message-ID: <87pq9fr256.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Gm-Message-State: + ALoCoQniR+siFPDuzzUwxiSzxIR/qAR0MKGHqc4hsYuHuaEmKxqe9qc2rw5TTFQRtXd0HnZRmL64 +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, 04 Jun 2012 07:02:04 -0000 + + +The patch makes a lot of sense, and fixes the asymmetry introduced by +commit 95dd5fe5. I think it deserves a more verbose commit message, +along with that commit reference, and (eventually, not necessarily in +this series) a NEWS item of its own. + +On Sun, 03 Jun 2012, Austin Clements wrote: +> --- +> lib/message.cc | 6 +++++- +> 1 file changed, 5 insertions(+), 1 deletion(-) +> +> diff --git a/lib/message.cc b/lib/message.cc +> index ed96477..bbac2ff 100644 +> --- a/lib/message.cc +> +++ b/lib/message.cc +> @@ -1074,7 +1074,7 @@ notmuch_message_maildir_flags_to_tags (notmuch_message_t *message) +> const char *flags; +> notmuch_status_t status; +> notmuch_filenames_t *filenames; +> - const char *filename; +> + const char *filename, *dir; +> char *combined_flags = talloc_strdup (message, ""); +> unsigned i; +> int seen_maildir_info = 0; +> @@ -1084,6 +1084,10 @@ notmuch_message_maildir_flags_to_tags (notmuch_message_t *message) +> notmuch_filenames_move_to_next (filenames)) +> { +> filename = notmuch_filenames_get (filenames); +> + dir = _filename_is_in_maildir (filename); +> + +> + if (! dir) +> + continue; +> +> flags = strstr (filename, ":2,"); +> if (! flags) +> -- +> 1.7.10 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2