Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 3938B429E59 for ; Sun, 12 Feb 2012 13:08:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.8 X-Spam-Level: X-Spam-Status: No, score=-0.8 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A2Sm8kgBmrMK for ; Sun, 12 Feb 2012 13:08:27 -0800 (PST) Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com [209.85.215.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 6C543431FAE for ; Sun, 12 Feb 2012 13:08:27 -0800 (PST) Received: by eaak14 with SMTP id k14so2263402eaa.26 for ; Sun, 12 Feb 2012 13:08:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schoepe.org; s=google; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; bh=5ZpiAUAc7oaGV9FdhiLll/IDiV6pAuMryII/gJb6bdA=; b=WowLECwSepLtAKfxLbCCscHGxLR6xmV9CdSrmb4Ur9PBYmUoAeMDBCXPZpxrGADGGE ITIkiJol1C5g3yWLG5zM6zl5goHjXU43o92ePxfB7reeJXJq+XpkkqTpOwonHQ65tZ8F JJtIwooIk6M+O1AfcJ67S28aS08Rq90xtzQyA= Received: by 10.14.28.16 with SMTP id f16mr4451290eea.121.1329080906052; Sun, 12 Feb 2012 13:08:26 -0800 (PST) Received: from localhost (dslb-088-069-141-163.pools.arcor-ip.net. [88.69.141.163]) by mx.google.com with ESMTPS id z47sm52925004eeh.9.2012.02.12.13.08.24 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Feb 2012 13:08:25 -0800 (PST) From: Daniel Schoepe To: Mark Walters , notmuch@notmuchmail.org Subject: Re: [RFC PATCH v2 1/3] cli: notmuch-show changes to support pick In-Reply-To: <1329072579-27340-2-git-send-email-markwalters1009@gmail.com> References: <1329072579-27340-1-git-send-email-markwalters1009@gmail.com> <1329072579-27340-2-git-send-email-markwalters1009@gmail.com> User-Agent: Notmuch/0.11.1+191~gb324ce8 (http://notmuchmail.org) Emacs/24.0.93.1 (x86_64-pc-linux-gnu) Date: Sun, 12 Feb 2012 22:08:23 +0100 Message-ID: <874nuvu5dk.fsf@schoepe.localhost> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Gm-Message-State: ALoCoQkrOoCPy6nMP3ogXfdoEZrkrxAD0a34Iz2ZkyyHo0FMiBLeYuSweLhpkeKMDdg6eQL3lAL7 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 21:08:28 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 12 Feb 2012 18:49:37 +0000, Mark Walters wrote: > + int opt_index, ret, entire_thread; > + notmuch_sort_t sort =3D NOTMUCH_SORT_NEWEST_FIRST; > const notmuch_show_format_t *format =3D &format_text; > notmuch_show_params_t params =3D { .part =3D -1 }; > int format_sel =3D NOTMUCH_FORMAT_NOT_SPECIFIED; > notmuch_bool_t verify =3D FALSE; > + notmuch_bool_t headers_only =3D FALSE; >=20=20 > notmuch_opt_desc_t options[] =3D { > { NOTMUCH_OPT_KEYWORD, &format_sel, "format", 'f', > @@ -1042,10 +1093,19 @@ notmuch_show_command (void *ctx, unused (int argc= ), unused (char *argv[])) > { "mbox", NOTMUCH_FORMAT_MBOX }, > { "raw", NOTMUCH_FORMAT_RAW }, > { 0, 0 } } }, > + { NOTMUCH_OPT_KEYWORD, &sort, "sort", 's', > + (notmuch_keyword_t []){ { "oldest-first", NOTMUCH_SORT_OLDEST_FIRST }, > + { "newest-first", NOTMUCH_SORT_NEWEST_FIRST }, > + { 0, 0 } } }, > { NOTMUCH_OPT_INT, ¶ms.part, "part", 'p', 0 }, > - { NOTMUCH_OPT_BOOLEAN, ¶ms.entire_thread, "entire-thread", 't', 0 }, > + { NOTMUCH_OPT_KEYWORD, &entire_thread, "thread", 't', > + (notmuch_keyword_t []){ { "match", NOTMUCH_SHOW_THREAD_MATCH, }, > + { "entire", NOTMUCH_SHOW_THREAD_ENTIRE }, > + { "none", NOTMUCH_SHOW_THREAD_NONE }, > + { 0, 0 } } }, > { NOTMUCH_OPT_BOOLEAN, ¶ms.decrypt, "decrypt", 'd', 0 }, > { NOTMUCH_OPT_BOOLEAN, &verify, "verify", 'v', 0 }, > + { NOTMUCH_OPT_BOOLEAN, &headers_only, "headers-only", 'h', 0 }, > { 0, 0, 0, 0, 0 } > }; >=20=20 > @@ -1055,6 +1115,9 @@ notmuch_show_command (void *ctx, unused (int argc),= unused (char *argv[])) > return 1; > } >=20=20 > + params.entire_thread =3D entire_thread; entire_thread is not initialized here, if there is no --thread argument. The rest of the code makes this result in the same behavior as =2D-thread=3Dentire, but it should be initialized to NOTMUCH_SHOW_THREAD_MATCH. Cheers, Daniel --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJPOCpHAAoJEIaTAtce+Z+JV2IP/Asg3lM8LpIR4h4Bk66dtQ24 xqs8Qs2vioLAdxzdMgfwyMDuQnarw4LJUuOicVp22cYOI6Asu/oDatvW7La2yWvr hz/kCkyV5XBGAVkcme+CPfv/cJT7sxwpw49IpFYnCzVGgk8Y61MMWBNF0RkAfwnz 6OgKiTLYZ8KBlJS+5+095cv6uHaK983L3qkRsxT9V51az/gSzOde+MGJSrXI6C2W eoJ6rKVEjjWUfr2/Oi9F03XrKPiDIxovFPnhDEnQh43RpRveEX6FXfDSv4cCLdC5 t5lF70mnBnvcrwRYz2Guqt0DlYtgNzGYTK/IzaBEIOKecvIWpOLqrR/aMiu4cJQJ Bcn46NnLJ/2zdODMfVvtNm+jGQ3sbITcBoRyhW7C5H3uMl9ItUTVPTpszUuPct+d XrBpdbrhoAqwVkpSs3IaGyUKcZrdN+/TKk9zQi9f0b8uYFe7Q0bmk2czha4JQijH VUrMZGkarUcAro6ZCy+pRdeoD+aTZFaSUvlJnhqCJqWZRuxmPc8waMMFj3RbZzGA EdEIjQLM4Y99icFSj6524I2GmOKFyX8H8W8UFMnfOx9j/knT7ThjAPPg2awUdRLG rqASaarAZupzOn/xag4V0hKyvYPPt1ziyZJY3Jd+X0HHV7f80mJX/ewgzMWv4CrF Z4Rn2rZLDr7+wLOEtubq =zSj/ -----END PGP SIGNATURE----- --=-=-=--