From: Mark Walters Date: Fri, 10 Jun 2016 23:02:46 +0000 (+0100) Subject: [PATCH 0/6] Use notmuch insert for fcc X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8d16f27b59552ac95a525838378e06b1cd790d86;p=notmuch-archives.git [PATCH 0/6] Use notmuch insert for fcc --- diff --git a/ef/54748501fc73d87494b6c15d92d0f33ac80b95 b/ef/54748501fc73d87494b6c15d92d0f33ac80b95 new file mode 100644 index 000000000..226a878ca --- /dev/null +++ b/ef/54748501fc73d87494b6c15d92d0f33ac80b95 @@ -0,0 +1,122 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id BC57B6DE02AD + for ; Fri, 10 Jun 2016 16:03:10 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.335 +X-Spam-Level: +X-Spam-Status: No, score=-0.335 tagged_above=-999 required=5 tests=[AWL=0.235, + DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, + RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id FbvilGyUefp6 for ; + Fri, 10 Jun 2016 16:03:03 -0700 (PDT) +Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com + [74.125.82.51]) by arlo.cworth.org (Postfix) with ESMTPS id A321D6DE0032 for + ; Fri, 10 Jun 2016 16:03:02 -0700 (PDT) +Received: by mail-wm0-f51.google.com with SMTP id k204so9829156wmk.0 + for ; Fri, 10 Jun 2016 16:03:02 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id; + bh=mu4zwzcso80+LKONH7HuOFyFs9Jnmv+LXakPgInR9pE=; + b=wf3zcpcNwU6uMYU6TZ3avl4TW95t/sxXnKybMq+mAsNPwLh6KfpL5IEGcjkbO7j4bE + O87eOGR6iRKH13l2oFy/5hUHimh5XDrHFyv7f2VtFTlmaTbgBLeReAg4nnk+BzXONSpy + xxXoPKOJXNEUsODmtkIGUc/hHM1id+/PLffwpdamOUscqHpdkWADX7rWQRERxhLrqlso + FFXmzfDRRuDYWKkZceI8wcC+4TKMrBBUsGxpfZtBLgfRq0Fjp8gh51gg4QCMsMx62vj3 + wDthaCsmVdrQXQ2zttOnq8ZtLOcKFt+jj4QAb0wx3V87ItM1PSQ7uuSHSSzomFYqbXFx + RdLw== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:date:message-id; + bh=mu4zwzcso80+LKONH7HuOFyFs9Jnmv+LXakPgInR9pE=; + b=BtMOVdS2zwmwRDmew9PM++Xe9jf/3frcsUDNSL4Fg7KkEsCWnFuF5ry0rwflbdT6pA + 4aqoxBQLyT5PaGXlAzY1qeYTKQgzHgtuB2WmBaTKD2ZivRh8n+Qcu7IsHSc6mwYhsZuB + un78viiFPPMvsiJQQWMy6BbIl1ErpBW/d+voRcZGdwIG/nss5auLxPqd7XVGcEZj1l4u + x7ItZuz3Wz3/2qTS5/xCirEKMOVE3blqrWXCoLnJScmzmdtsmOAYoMZxMSjPwahzAjkX + 9iueUlwoy96OySCX5tNaHGpeDv2/S/g5V4V193N02PUxkxcWGRks7zmanT3Ox1Rck7Zf + bgdg== +X-Gm-Message-State: + ALyK8tLcoNEEuvs5wdjc0gyBCrgTtY+xXUWcbNpp3WZ6zLEuk1V+um3icI77QjMjWlFyWw== +X-Received: by 10.194.48.7 with SMTP id h7mr4102213wjn.9.1465599780788; + Fri, 10 Jun 2016 16:03:00 -0700 (PDT) +Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) + by smtp.gmail.com with ESMTPSA id 75sm1266904wml.15.2016.06.10.16.02.59 + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Fri, 10 Jun 2016 16:03:00 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 0/6] Use notmuch insert for fcc +Date: Sat, 11 Jun 2016 00:02:46 +0100 +Message-Id: <1465599772-10297-1-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 2.1.4 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Fri, 10 Jun 2016 23:03:10 -0000 + +This series allows the use of notmuch insert for fcc. It is rather +larger than I would like but I am fairly happy with the user +experience. A defcustom controls whether to use notmuch insert or file +fcc. + +The syntax in the insert case is + +Fcc: folder +tag1 -tag2 + +which inserts the message in folder, and +tag1 and -tag2 changes (if +present) are applied afterwards. + +Since setting an fcc-header to "| notmuch insert --folder=sent" +essentially works, I will try to justify why the series ends this +big. The main reason is error handling: the pipe as above does no +error handling, so if the notmuch database is locked the fcc will be +silently lost. Unfortunately message-do-fcc which handles fcc is quite +inflexible and always passes full filename as fcc, which prevents the +syntax given above. + +Thus to get this syntax we need to extract a local copy of +message-do-fcc which we simplify and rejig for our needs. The exact +rejigged form is in preparation for the postpone/resume/draft patches. + +We could get rid of file fcc, but some people might still want it, and +it is used in the test suite, including by some non-emacs tests (via +emacs_fcc_message in test-lib.sh) so I am happier to keep it for now. + +Best wishes + +Mark + + + +Mark Walters (6): + emacs: notmuch-check-exit-status bugfix + emacs: maildir-fcc: prepare for use of notmuch insert + emacs: maildir import message-do-fcc + emacs: simplify our local copy of message-do-fcc + Modify our local copy of message-do-fcc + emacs: maildir: add the actual insert code + + emacs/notmuch-lib.el | 10 ++- + emacs/notmuch-maildir-fcc.el | 192 +++++++++++++++++++++++++++++++++++++------ + emacs/notmuch-mua.el | 10 +-- + test/test-lib.el | 5 ++ + 4 files changed, 185 insertions(+), 32 deletions(-) + +-- +2.1.4 +