unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Mark Walters <markwalters1009@gmail.com>
Cc: notmuch mailing list <notmuch@notmuchmail.org>
Subject: Re: [PATCH] emacs: hello: make --batch error gracefully
Date: Tue, 23 Jul 2013 23:28:11 -0300	[thread overview]
Message-ID: <87ob9svghw.fsf@zancas.localnet> (raw)
In-Reply-To: <1372976299-30389-1-git-send-email-markwalters1009@gmail.com>

Mark Walters <markwalters1009@gmail.com> writes:
> -    (call-process-region (point-min) (point-max) notmuch-command
> -			 t t nil "count" "--batch")
> +    (unless (= (call-process-region (point-min) (point-max) notmuch-command
> +				    t t nil "count" "--batch") 0)
> +      (notmuch-logged-error "notmuch CLI version mismatch error (count --batch)
> +The most likely cause of this error is that the CLI is too old
> +to support count --batch and needs to be upgraded to the same
> +version as notmuch-emacs"))
> +

I had a look at this, and I agree the current failure mode is not nice
(it just says something mysterious about nil not being a string). On the
other hand, I think we should use the two argument form of
notmuch-logged-error, and the the first argument should say only what we
know. Something like

(notmuch-logged-error "notmuch count --batch failed"
"notmuch count --batch failed
Please check that the notmuch CLI is new enough to  support `count
--batch'. In general we recommend running matching versions of the CLI
and emacs interface.")

d

  parent reply	other threads:[~2013-07-24  2:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04 22:18 [PATCH] emacs: hello: make --batch error gracefully Mark Walters
2013-07-06  9:06 ` Tomi Ollila
2013-07-07 10:21   ` Mark Walters
2013-07-13  8:06     ` Tomi Ollila
2013-07-24  2:28 ` David Bremner [this message]
2013-07-27 21:52   ` 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=87ob9svghw.fsf@zancas.localnet \
    --to=david@tethera.net \
    --cc=markwalters1009@gmail.com \
    --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).