unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>
To: Mark Walters <markwalters1009@gmail.com>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH v3 1/2] cli: make --entire-thread=false work for format=json.
Date: Sat, 21 Apr 2012 12:10:14 -0600	[thread overview]
Message-ID: <CAMoJFUvOU1OzqPn7eCNMfECuFm+09B+YSkivTX79VTQJ6_wSjg@mail.gmail.com> (raw)
In-Reply-To: <1334999750-21811-2-git-send-email-markwalters1009@gmail.com>

On Sat, Apr 21, 2012 at 03:15, Mark Walters <markwalters1009@gmail.com> wrote:
> The --entire-thread option in notmuch-show.c defaults to true when
> format=json. Previously there was no way to turn this off. This patch
> makes it respect --entire-thread=false.
>
> The one subtlety is that we initialise a notmuch_bool_t to -1 to
> indicate that the option parsing has not set it. This allows the code
> to distinguish between the option being omitted from the command line,
> and the option being set to false on the command line.
>
> Finally, all formats except Json can output empty messages for non
> entire-thread, but in Json format we need to output {} to keep the
> other elements (e.g. the replies to this message) in the correct
> place.

LGTM. You can probably remove the relevant item from devel/TODO as well!

-- Adam

  reply	other threads:[~2012-04-21 18:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-21  9:15 [PATCH v3 0/2] Allow JSON to use non-entire thread, and use for elide Mark Walters
2012-04-21  9:15 ` [PATCH v3 1/2] cli: make --entire-thread=false work for format=json Mark Walters
2012-04-21 18:10   ` Adam Wolfe Gordon [this message]
2012-04-24  1:47   ` Austin Clements
2012-04-21  9:15 ` [PATCH v3 2/2] emacs: make elide messages use notmuch-show for omitting messages Mark Walters

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=CAMoJFUvOU1OzqPn7eCNMfECuFm+09B+YSkivTX79VTQJ6_wSjg@mail.gmail.com \
    --to=awg+notmuch@xvx.ca \
    --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).