From: Franz Fellner <alpine.art.de@gmail.com>
To: Bartosz Telenczuk <telenczuk@unic.cnrs-gif.fr>
Cc: notmuch@notmuchmail.org, Bartosz Telenczuk <telenczuk@unic.cnrs-gif.fr>
Subject: Re: [PATCH] VIM: Make an option to save sent mail locally
Date: Thu, 05 Feb 2015 11:34:22 +0100 [thread overview]
Message-ID: <54d3472e9a3f8_848fb3308bb@TP_L520.notmuch> (raw)
In-Reply-To: <54d00b64c9a73_47c3ff0b58781fc17@bartels-MacBook-Pro.local.notmuch>
Bartosz Telenczuk wrote:
> > > I would appreciate an option to configure the "sent" box per provider. I
> > > implemented this feature in this patch:
> > >
> > > id:1420891384-992-4-git-send-email-telenczuk@unic.cnrs-gif.fr
> >
> > 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.
>
> 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:
>
> [vim]
> sent_dirs=telenczb@hu-berlin.de=>HU/Sent;telenczuk@unic.cnrs-gif.fr=>CNRS/Sent
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, ...).
I thought of one string to store the whole account manager config, just like
[default] # or call it "local" - not bound to any real account
sent=Sent
drafts=Drafts
[account1]
mail=account1@mail.com
sent=account1/sent
drafts=account1/drafts
[account2]
mail=account2@gmail.com
sent=Sent # gmail specific: using gmails smtp server stores sent mails automatically on the server
drafts=account2/drafts
// and so on
(used an ini format, but might be done in any other way like ruby hashes or yaml or...)
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.
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":
[account2]
drafts=""
I can start implementing this, but I currently have other important things to do, so it can take some time.
Franz
>
> Cheers,
>
> Bartosz
next prev parent reply other threads:[~2015-02-05 10:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-06 17:51 [PATCH] VIM: Make an option to save sent mail locally Ian Main
2014-10-06 18:10 ` Ian Main
2014-10-06 18:28 ` Tomi Ollila
2014-10-07 4:16 ` Ian Main
2014-10-19 9:53 ` Tomi Ollila
2014-10-14 13:45 ` Franz Fellner
2014-10-14 17:32 ` Ian Main
2014-10-18 20:27 ` Franz Fellner
2015-01-13 0:08 ` Bartosz Telenczuk
2015-01-21 19:05 ` Franz Fellner
2015-02-02 23:42 ` Bartosz Telenczuk
2015-02-05 10:34 ` Franz Fellner [this message]
2014-10-20 17:58 ` [PATCH v2] " Ian Main
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54d3472e9a3f8_848fb3308bb@TP_L520.notmuch \
--to=alpine.art.de@gmail.com \
--cc=notmuch@notmuchmail.org \
--cc=telenczuk@unic.cnrs-gif.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).