Re: [PATCH] VIM: Make an option to save sent mail locally
[notmuch-archives.git] / 79 / 753bc65d2394e059a5ff00ae577362f7ee26e1
1 Return-Path: <alpine.art.de@gmail.com>\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 2012F431FDF\r
6         for <notmuch@notmuchmail.org>; Thu,  5 Feb 2015 02:34:00 -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.639\r
10 X-Spam-Level: *\r
11 X-Spam-Status: No, score=1.639 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         DNS_FROM_AHBL_RHSBL=2.438, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id YBxNCs5PRr1I for <notmuch@notmuchmail.org>;\r
18         Thu,  5 Feb 2015 02:33:56 -0800 (PST)\r
19 Received: from mail-we0-f179.google.com (mail-we0-f179.google.com\r
20         [74.125.82.179]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id A6E0F431FBC\r
23         for <notmuch@notmuchmail.org>; Thu,  5 Feb 2015 02:33:56 -0800 (PST)\r
24 Received: by mail-we0-f179.google.com with SMTP id u56so1310562wes.10\r
25         for <notmuch@notmuchmail.org>; Thu, 05 Feb 2015 02:33:53 -0800 (PST)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=date:from:to:cc:message-id:in-reply-to:references:subject\r
28         :mime-version:content-type:content-transfer-encoding:attach;\r
29         bh=rR0eFjirJVfi6bbjGEYYsNdOB/pAV6Sl4YZHz5xgEQc=;\r
30         b=OVWN61kkaTDHBn6qYJeBgxTdY1EOK7KMdY/rT1mM7OkhSyVrJIZ3bb49rHlbAvPRP0\r
31         4XMZpU3Cc1NorAYXQQpyRN2ZPMjJUTRjPcoaxffogt5TqTxdzHSLOy75eTA5xXDI9wjq\r
32         Jb++MSEa0PjT9T1DX36mhmoN1Qzy9YOwlSupB8VEm0ToI1VJxfhZRcOpxo5b2oY87Fvk\r
33         LYb5juiWsIhhQO/US9hWBFoiYXWAgTrUWE/vsijmxEXPIMdwt5SmdjZ4/jNiyBNw7zrH\r
34         AVre6iGSmCywTDy8bRbSk2dUn7o6N6Uf7OfyoQhO5GVNSWmiznocqydjxuzqeiFcAAFU\r
35         npLA==\r
36 X-Received: by 10.194.23.39 with SMTP id j7mr6165976wjf.9.1423132433163;\r
37         Thu, 05 Feb 2015 02:33:53 -0800 (PST)\r
38 Received: from localhost (p4FFB8C0A.dip0.t-ipconnect.de. [79.251.140.10])\r
39         by mx.google.com with ESMTPSA id w3sm6751163wjf.3.2015.02.05.02.33.51\r
40         (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
41         Thu, 05 Feb 2015 02:33:52 -0800 (PST)\r
42 Date: Thu, 05 Feb 2015 11:34:22 +0100\r
43 From: Franz Fellner <alpine.art.de@gmail.com>\r
44 To: Bartosz Telenczuk <telenczuk@unic.cnrs-gif.fr>\r
45 Message-ID: <54d3472e9a3f8_848fb3308bb@TP_L520.notmuch>\r
46 In-Reply-To:\r
47  <54d00b64c9a73_47c3ff0b58781fc17@bartels-MacBook-Pro.local.notmuch>\r
48 References: <1412617904-27252-1-git-send-email-imain@stemwinder.org>\r
49         <1412619036-29203-1-git-send-email-imain@stemwinder.org>\r
50         <20141014154535.GJ23373@TP_L520.localdomain>\r
51         <543d5e2927b41_5918e8fe90f4@ovo.mains.priv.notmuch>\r
52         <54b4621983c45_7f93fe5bd4401f0ef@bts-MacBook-Pro.local.notmuch>\r
53         <54bff88d4b5dd_5b9d145d30431@TP_L520.notmuch>\r
54         <54d00b64c9a73_47c3ff0b58781fc17@bartels-MacBook-Pro.local.notmuch>\r
55 Subject: Re: [PATCH] VIM: Make an option to save sent mail locally\r
56 Mime-Version: 1.0\r
57 Content-Type: text/plain;\r
58  charset=utf-8\r
59 Content-Transfer-Encoding: 7bit\r
60 Attach: \r
61 Cc: notmuch@notmuchmail.org, Bartosz Telenczuk <telenczuk@unic.cnrs-gif.fr>\r
62 X-BeenThere: notmuch@notmuchmail.org\r
63 X-Mailman-Version: 2.1.13\r
64 Precedence: list\r
65 List-Id: "Use and development of the notmuch mail system."\r
66         <notmuch.notmuchmail.org>\r
67 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
69 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
70 List-Post: <mailto:notmuch@notmuchmail.org>\r
71 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
72 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
73         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
74 X-List-Received-Date: Thu, 05 Feb 2015 10:34:00 -0000\r
75 \r
76 Bartosz Telenczuk wrote:\r
77 > > > I would appreciate an option to configure the "sent" box per provider. I\r
78 > > > implemented this feature in this patch:\r
79 > > > \r
80 > > > id:1420891384-992-4-git-send-email-telenczuk@unic.cnrs-gif.fr\r
81 > > \r
82 > > Generally it might work. But there are other features that may rely on per-account-settings (drafts, outbox, templates, ...). Setting them all that way might get ugly. The best solution might be to introduce a setting for account information.\r
83\r
84 > Definitely, in my implementation this is done via a setting in the notmuch config file, which maps between accounts and provider dir. If this is not configure, it default to not storing sent emails. For example:\r
85\r
86 > [vim]\r
87 > sent_dirs=telenczb@hu-berlin.de=>HU/Sent;telenczuk@unic.cnrs-gif.fr=>CNRS/Sent\r
88 \r
89 That's what I called "ugly": Using a probably long and/or unreadable mail address as identifier is errorprone, if you have several accounts those things tend to get unreadable. Especially if you need to write them over and over again for different folders/features (sent, drafts, ...).\r
90 I thought of one string to store the whole account manager config, just like\r
91 \r
92 [default] # or call it "local" - not bound to any real account\r
93 sent=Sent\r
94 drafts=Drafts\r
95 \r
96 [account1]\r
97 mail=account1@mail.com\r
98 sent=account1/sent\r
99 drafts=account1/drafts\r
100 \r
101 [account2]\r
102 mail=account2@gmail.com\r
103 sent=Sent  # gmail specific: using gmails smtp server stores sent mails automatically on the server\r
104 drafts=account2/drafts\r
105 \r
106 // and so on\r
107 (used an ini format, but might be done in any other way like ruby hashes or yaml or...)\r
108 The default settings get default values by our vim plugin. They get used automatically if a user-defined account does not specifically set a folder - that way account2 could just have left out the "sent" setting.\r
109 If the user overwrites the default-account and leaves out a folder, such as sent, he might want that feature to be deactivated. Though I still think it is dangerous: it applies well for sent, but deactivating drafts (probably as automatic temporary storage for mails that are currently written and should be restorable after a crash) can cause issues, e.g. lost mails. So I would vote for a different solution. E.g. a separate boolean setting. Or we could treat an empty string for non-default accounts as "deactivate":\r
110 \r
111 [account2]\r
112 drafts=""\r
113 \r
114 I can start implementing this, but I currently have other important things to do, so it can take some time.\r
115 \r
116 Franz\r
117 \r
118\r
119 > Cheers,\r
120\r
121 > Bartosz\r
122 \r
123 \r