From: nmeum <nmeum@users.noreply.github.com> To: ml@inbox.vuxu.org Subject: [PR PATCH] mthread: hide message count behind -n Date: Sat, 16 May 2020 20:54:08 +0200 [thread overview] Message-ID: <gh-mailinglist-notifications-fa6558a0-26e0-48f6-803f-f5a8af34f6a8-mblaze-174@inbox.vuxu.org> (raw) [-- Attachment #1: Type: text/plain, Size: 509 bytes --] There is a new pull request by nmeum against master on the mblaze repository https://github.com/nmeum/mblaze mthread-verbose https://github.com/leahneukirchen/mblaze/pull/174 mthread: hide message count behind -n See also: ddd7e54fbbf6747ccefabbbad0087debcaec2ca5 It would probably be preferable to use the same flag as used by mscan (i.e. -v). Unfortunately, mthread uses the `-v` flag for another purpose already. A patch file from https://github.com/leahneukirchen/mblaze/pull/174.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-mthread-verbose-174.patch --] [-- Type: text/x-diff, Size: 2119 bytes --] From 062fb7b32519a494ae154cfd44bbb0feba486021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net> Date: Sat, 16 May 2020 20:52:21 +0200 Subject: [PATCH] mthread: hide message count behind -n See also: ddd7e54fbbf6747ccefabbbad0087debcaec2ca5 It would probably be preferable to use the same flag as used by mscan (i.e. -v). Unfortunately, mthread uses the `-v` flag for another purpose already. --- man/mthread.1 | 6 ++++-- mthread.c | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/man/mthread.1 b/man/mthread.1 index 00bef88..b456732 100644 --- a/man/mthread.1 +++ b/man/mthread.1 @@ -1,4 +1,4 @@ -.Dd May 4, 2020 +.Dd May 16, 2020 .Dt MTHREAD 1 .Os .Sh NAME @@ -6,7 +6,7 @@ .Nd arrange messages into discussions .Sh SYNOPSIS .Nm -.Op Fl vpr +.Op Fl nvpr .Op Fl S Ar msg .Op Ar msgs\ ... .Sh DESCRIPTION @@ -31,6 +31,8 @@ Unresolved Message-IDs are printed as-is. .Pp The options are as follows: .Bl -tag -width Ds +.It Fl n +Print how many messages were threaded to standard error. .It Fl v Do not prune unresolved Message-IDs at the top-level. .It Fl p diff --git a/mthread.c b/mthread.c index 023029d..af2b694 100644 --- a/mthread.c +++ b/mthread.c @@ -20,6 +20,7 @@ #include "blaze822.h" +static int nflag; static int vflag; static int pflag; static int rflag; @@ -420,14 +421,15 @@ main(int argc, char *argv[]) optional = 1; - while ((c = getopt(argc, argv, "S:prv")) != -1) + while ((c = getopt(argc, argv, "S:nprv")) != -1) switch (c) { case 'S': blaze822_loop1(optarg, thread); break; + case 'n': nflag = 1; break; case 'v': vflag = 1; break; case 'p': pflag = 1; break; case 'r': rflag = 1; break; default: - fprintf(stderr, "Usage: mthread [-vpr] [-S dir] [msgs...]\n"); + fprintf(stderr, "Usage: mthread [-nvpr] [-S dir] [msgs...]\n"); exit(1); } @@ -447,7 +449,8 @@ main(int argc, char *argv[]) sort_tree(top, -1); print_tree(top, -1); - fprintf(stderr, "%ld mails threaded\n", i); + if (nflag) + fprintf(stderr, "%ld mails threaded\n", i); return 0; }
next reply other threads:[~2020-05-16 18:54 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-16 18:54 nmeum [this message] 2020-05-16 18:54 ` [PR PATCH] [Updated] " nmeum 2020-05-16 19:19 ` leahneukirchen 2020-05-16 19:31 ` [PR PATCH] [Closed]: " leahneukirchen
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 * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=gh-mailinglist-notifications-fa6558a0-26e0-48f6-803f-f5a8af34f6a8-mblaze-174@inbox.vuxu.org \ --to=nmeum@users.noreply.github.com \ --cc=ml@inbox.vuxu.org \ --subject='Re: [PR PATCH] mthread: hide message count behind -n' \ /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
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 NNTP newsgroup(s).