diff --git a/man/mu-find.1 b/man/mu-find.1 index 62916366..5b3492c6 100644 --- a/man/mu-find.1 +++ b/man/mu-find.1 @@ -340,13 +340,9 @@ Note, if you specify a sortfield, by default, messages are sorted in reverse (descending) order (e.g., from lowest to highest). This is usually a good choice, but for dates it may be more useful to sort in the opposite direction. -.TP -\fB\-\-summary\fR -output a summary based upon the first lines of the message. - .TP \fB\-\-summary-len=\fR -Number of lines to use for the summary. Default: 5. +If > 0, use that number of lines of the message to provide a summary. .TP \fB\-\-include\-unreadable\fR diff --git a/man/mu-view.1 b/man/mu-view.1 index 4bd5d35f..ddf6eaef 100644 --- a/man/mu-view.1 +++ b/man/mu-view.1 @@ -1,4 +1,4 @@ -.TH MU VIEW 1 "April 2012" "User Manuals" +.TH MU VIEW 1 "July 2012" "User Manuals" .SH NAME @@ -21,14 +21,9 @@ any). .SH OPTIONS .TP -\fB\-\-summary\fR +\fB\-\-summary-len\fR=\fI\fR instead of displaying the full message, output a summary based upon the first -lines of the message. - -.TP -\fB\-\-summary-len=\fR -Number of lines to use for the summary. Default: 5. - +\fI\fR lines of the message. \fB\-\-terminate\fR terminate messaages with a \\f (\fIform-feed\fR) characters when displaying diff --git a/mu/mu-config.c b/mu/mu-config.c index 84df592f..fffd20c1 100644 --- a/mu/mu-config.c +++ b/mu/mu-config.c @@ -32,12 +32,8 @@ #include "mu-config.h" #include "mu-cmd.h" - static MuConfig MU_CONFIG; -#define DEFAULT_SUMMARY_LEN 5 - - static MuConfigFormat get_output_format (const char *formatstr) { @@ -88,7 +84,6 @@ set_group_mu_defaults (void) if (!isatty(fileno(stdout))) MU_CONFIG.nocolor = TRUE; - } static GOptionGroup* @@ -186,19 +181,6 @@ set_group_find_defaults (void) else MU_CONFIG.format = get_output_format (MU_CONFIG.formatstr); - - if (MU_CONFIG.linksdir) { - gchar *old = MU_CONFIG.linksdir; - MU_CONFIG.linksdir = mu_util_dir_expand(MU_CONFIG.linksdir); - if (!MU_CONFIG.linksdir) /* we'll check the dir later */ - MU_CONFIG.linksdir = old; - else - g_free(old); - } - - if ((MU_CONFIG.summary && !MU_CONFIG.summary_len)|| - (MU_CONFIG.summary_len < 1)) - MU_CONFIG.summary_len = DEFAULT_SUMMARY_LEN; } static GOptionGroup* @@ -216,8 +198,8 @@ config_options_group_find (void) "use a bookmarked query", NULL}, {"reverse", 'z', 0, G_OPTION_ARG_NONE, &MU_CONFIG.reverse, "sort in reverse (descending) order (z -> a)", NULL}, - {"summary", 'k', 0, G_OPTION_ARG_NONE, &MU_CONFIG.summary, - "include a short summary of the message (false)", NULL}, + /* {"summary", 'k', 0, G_OPTION_ARG_NONE, &MU_CONFIG.summary, */ + /* "(deprecated; use --summary-len)", NULL}, */ {"summary-len", 0, 0, G_OPTION_ARG_INT, &MU_CONFIG.summary_len, "use up to lines for the summary (5)", NULL}, {"linksdir", 0, 0, G_OPTION_ARG_STRING, &MU_CONFIG.linksdir, @@ -303,10 +285,6 @@ set_group_view_defaults (void) MU_CONFIG.format = MU_CONFIG_FORMAT_PLAIN; else MU_CONFIG.format = get_output_format (MU_CONFIG.formatstr); - - if ((MU_CONFIG.summary && !MU_CONFIG.summary_len)|| - (MU_CONFIG.summary_len < 1)) - MU_CONFIG.summary_len = DEFAULT_SUMMARY_LEN; } static GOptionGroup * @@ -315,9 +293,9 @@ config_options_group_view (void) GOptionGroup *og; GOptionEntry entries[] = { {"summary", 0, 0, G_OPTION_ARG_NONE, &MU_CONFIG.summary, - "only show a short summary of the message (false)", NULL}, - {"summary-len", 0, 0, G_OPTION_ARG_INT, &MU_CONFIG.summary_len, - "use up to lines for the summary (5)", NULL}, + "(deprecated; use --summary-len)", NULL}, + /* {"summary-len", 0, 0, G_OPTION_ARG_INT, &MU_CONFIG.summary_len, */ + /* "use up to lines for the summary (5)", NULL}, */ {"terminate", 0, 0, G_OPTION_ARG_NONE, &MU_CONFIG.terminator, "terminate messages with ascii-0x07 (\\f, form-feed)", NULL}, {"format", 'o', 0, G_OPTION_ARG_STRING, &MU_CONFIG.formatstr, diff --git a/mu/mu-config.h b/mu/mu-config.h index f0aaf9a8..4883c323 100644 --- a/mu/mu-config.h +++ b/mu/mu-config.h @@ -119,7 +119,7 @@ struct _MuConfig { gboolean reverse; /* sort in revers order (z->a) */ gboolean threads; /* show message threads */ - gboolean summary; /* include a summary? */ + gboolean summary; /* OBSOLETE: use summary_len */ int summary_len; /* max # of lines for summary */ char *bookmark; /* use bookmark */