From: Mark Walters <markwalters1009@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 1/2] emacs/cli: remove entire-thread default from show: JSON
Date: Thu, 23 Feb 2012 21:41:33 +0000 [thread overview]
Message-ID: <1330033294-21980-2-git-send-email-markwalters1009@gmail.com> (raw)
In-Reply-To: <1330033294-21980-1-git-send-email-markwalters1009@gmail.com>
Previously notmuch-show.c defaulted to --entire-thread when
format=json. Make the default just the matching messages, but make
the single emacs caller add --entire-thread to the arguments supplied
so the end result should be unchanged.
---
emacs/notmuch-show.el | 7 ++++---
notmuch-show.c | 1 -
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index aa9ccee..dcef3d5 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1063,14 +1063,15 @@ function is used."
(args (if notmuch-show-query-context
(append (list "\'") basic-args
(list "and (" notmuch-show-query-context ")\'"))
- (append (list "\'") basic-args (list "\'")))))
- (notmuch-show-insert-forest (notmuch-query-get-threads args))
+ (append (list "\'") basic-args (list "\'"))))
+ (cli-args (list "--entire-thread")))
+ (notmuch-show-insert-forest (notmuch-query-get-threads (append cli-args args)))
;; If the query context reduced the results to nothing, run
;; the basic query.
(when (and (eq (buffer-size) 0)
notmuch-show-query-context)
(notmuch-show-insert-forest
- (notmuch-query-get-threads basic-args))))
+ (notmuch-query-get-threads (append cli-args basic-args)))))
(jit-lock-register #'notmuch-show-buttonise-links)
diff --git a/notmuch-show.c b/notmuch-show.c
index d930f94..5a9db8f 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -1066,7 +1066,6 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))
switch (format_sel) {
case NOTMUCH_FORMAT_JSON:
format = &format_json;
- params.entire_thread = TRUE;
break;
case NOTMUCH_FORMAT_TEXT:
format = &format_text;
--
1.7.2.3
next prev parent reply other threads:[~2012-02-23 21:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 21:41 [PATCH 0/2] Make elide messages use cli side Mark Walters
2012-02-23 21:41 ` Mark Walters [this message]
2012-02-23 21:45 ` [PATCH 1/2] emacs/cli: remove entire-thread default from show: JSON Adam Wolfe Gordon
2012-02-23 22:04 ` Mark Walters
2012-02-23 21:41 ` [PATCH 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=1330033294-21980-2-git-send-email-markwalters1009@gmail.com \
--to=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).