unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Ian Main <imain@stemwinder.org>
To: David Bremner <david@tethera.net>,
	David Bremner <david@tethera.net>,
	notmuch@notmuchmail.org
Subject: Re: [PATCH v2] VIM: Use notmuch CLI for config
Date: Fri, 03 Oct 2014 11:41:12 -0700	[thread overview]
Message-ID: <542eedc8cb635_ed1ddfe8cd0@ovo.mains.priv.notmuch> (raw)
In-Reply-To: <87r3ypr6cm.fsf@maritornes.cs.unb.ca>

David Bremner wrote:
> Ian Main <imain@stemwinder.org> writes:
> 
> > This patch switches from reading .notmuch-config directly to using
> > the CLI the same way that emacs does it.  It actually uses less code
> > and is probably less error prone.
> >
> >     Ian
> 
> The general approach seems sane; it seems quite brittle to read the
> config file directly. I notice there is not really any error handling;
> OTOH, as far as I can read Ruby, there is not any in the previous
> version either.  Technically, this does add a dependency of the vim
> client on the CLI that did not exist before. Personally I don't find
> this onerous (even notmuch-vim users need "notmuch new", except in
> rather unusual circumstances.).
> 
> I'd like feedback/testing from actual vim interface users before
> merging.

I am actually just following suit on what was already being done.
The Vim client was already calling out to notmuch CLI for other things,
eg:

   system "notmuch show --format=mbox id:#{m.message_id} > #{mbox} && #{cmd}"

Is used to save the email for display in another program.  Also with no
error checking.  I think basically we are relying on rubys exception handling
to display errors to the user.. not the best idea but it is functional.

I could add a check for 'notmuch' binary.. especially there because loading
the config is the first thing that is done on startup.

    Ian

  parent reply	other threads:[~2014-10-03 18:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02 21:53 [PATCH] VIM: Use notmuch CLI for config Ian Main
2014-10-02 23:47 ` [PATCH v2] " Ian Main
2014-10-03  6:54   ` David Bremner
2014-10-03 10:50     ` Sergei Shilovsky
2014-10-03 18:41     ` Ian Main [this message]
2014-10-10  9:32   ` Franz Fellner
2014-10-19 18:11   ` David Bremner
2014-10-20 17:47     ` Ian Main
2014-10-21  8:31   ` David Bremner

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=542eedc8cb635_ed1ddfe8cd0@ovo.mains.priv.notmuch \
    --to=imain@stemwinder.org \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /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).