From: Ian Main <imain@stemwinder.org>
To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org
Subject: Re: [PATCH] VIM: Make an option to save sent mail locally
Date: Mon, 06 Oct 2014 21:16:52 -0700 [thread overview]
Message-ID: <5433693499518_7e54e45e9424@ovo.mains.priv.notmuch> (raw)
In-Reply-To: <m27g0dt5lk.fsf@guru.guru-group.fi>
Tomi Ollila wrote:
> On Mon, Oct 06 2014, Ian Main <imain@stemwinder.org> wrote:
>
> > Add an option to use 'notmuch insert' to save your sent mail.
> > ---
> >
> > Add -inbox as well.
> >
> > vim/notmuch.vim | 17 +++++++++++++++++
> > 1 file changed, 17 insertions(+)
> >
> > diff --git a/vim/notmuch.vim b/vim/notmuch.vim
> > index 331e930..a9044c4 100644
> > --- a/vim/notmuch.vim
> > +++ b/vim/notmuch.vim
> > @@ -58,6 +58,7 @@ let s:notmuch_date_format_default = '%d.%m.%y'
> > let s:notmuch_datetime_format_default = '%d.%m.%y %H:%M:%S'
> > let s:notmuch_reader_default = 'mutt -f %s'
> > let s:notmuch_sendmail_default = 'sendmail'
> > +let s:notmuch_save_sent_locally_default = 1
> > let s:notmuch_folders_count_threads_default = 0
> >
> > function! s:new_file_buffer(type, fname)
> > @@ -108,6 +109,18 @@ EOF
> > echohl None
> > return
> > endif
>
> AFAIU looks mmm. readable ;)
>
> > +
> > + if g:notmuch_save_sent_locally
> > + let out = system('cat ' . fname . ' | notmuch insert --create-folder --folder=Sent +sent -unread -inbox')
>
> as this is (looks like) shell invocation, this could be in format
>
> let out = system('notmuch insert --create-folder --folder=Sent +sent -unread -inbox < ' . fname)
You are right, that's better.
> or even
>
> let out = system('exec notmuch insert --create-folder --folder=Sent +sent -unread -inbox < ' . fname)
>
> (well, the latter would be out of the status quo)
>
> Ok, I looked a bit into the notmuch.vim -code, and noticed sometimes
> system() command lines use "notmuch" and sometimes g:notmuch_cmd
> -- I think the latter should be used in new code and the previous ones
> should be fixed.
>
> i.e. system ( g:notmuch_cmd . ' insert ... ' < . fname)
>
> Totally untested from my part...
>
> When the change alike this lands to the notmuch repository this needs NEWS
> item which informs that from now sent mails are notmuch-inserted to
> user's mail store (as this seems to be the default...) -- well, let's see
> that when there are real reviewers (i.e. those who are interested to and can
> test this).
Also a good suggestion. From what I see they always use 'notmuch' straight up
which is probably a reasonable assumption. I do think the actual init code for
vim could have a few more checks, such as verifying that 'notmuch' is in $PATH
etc.
Thanks for the review!! I'll send out a new rev tomorrow - very tired right now.
Ian
next prev parent reply other threads:[~2014-10-07 4:17 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 [this message]
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
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=5433693499518_7e54e45e9424@ovo.mains.priv.notmuch \
--to=imain@stemwinder.org \
--cc=notmuch@notmuchmail.org \
--cc=tomi.ollila@iki.fi \
/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).