[prev in list] [next in list] [prev in thread] [next in thread]
List: mutt-dev
Subject: mutt: Add new optional index_format expandos %r and %R.
From: Brendan Cully <brendan () kublai ! com>
Date: 2015-09-26 3:22:09
Message-ID: hg.aec82c4dd826.1443237729.1928362535899276112 () dev ! cs ! ubc ! ca
[Download RAW message or body]
changeset: 6511:aec82c4dd826
user: Derek Schrock <dereks@lifeofadishwasher.com>
date: Sun Sep 20 20:37:47 2015 -0400
link: http://dev.mutt.org/hg/mutt/rev/aec82c4dd826
Add new optional index_format expandos %r and %R.
These generate a comma separated list of all the To and Cc recipients.
Also, increase the attribution buffer size to accommodate these new
expandos.
diffs (73 lines):
diff -r 93c6ae1ef01b -r aec82c4dd826 UPDATING
--- a/UPDATING Mon Sep 21 10:28:22 2015 +0800
+++ b/UPDATING Sun Sep 20 20:37:47 2015 -0400
@@ -4,6 +4,10 @@
The keys used are:
!: modified feature, -: deleted feature, +: new feature
+default (unreleased):
+ + New expandos %r and %R for comma separated list of To: and Cc:
+ recipients respectively
+
1.5.24 (2015-08-31):
+ terminal status-line (TS) support, a.k.a. xterm title. see the
diff -r 93c6ae1ef01b -r aec82c4dd826 hdrline.c
--- a/hdrline.c Mon Sep 21 10:28:22 2015 +0800
+++ b/hdrline.c Sun Sep 20 20:37:47 2015 -0400
@@ -219,6 +219,8 @@
* %N = score
* %O = like %L, except using address instead of name
* %P = progress indicator for builtin pager
+ * %r = comma separated list of To: recipients
+ * %R = comma separated list of Cc: recipients
* %s = subject
* %S = short message status (e.g., N/O/D/!/r/-)
* %t = `to:' field (recipients)
@@ -548,6 +550,22 @@
strfcpy(dest, NONULL(hfi->pager_progress), destlen);
break;
+ case 'r':
+ buf2[0] = 0;
+ rfc822_write_address(buf2, sizeof(buf2), hdr->env->to, 1);
+ if (optional && buf2[0] == '\0')
+ optional = 0;
+ mutt_format_s (dest, destlen, prefix, buf2);
+ break;
+
+ case 'R':
+ buf2[0] = 0;
+ rfc822_write_address(buf2, sizeof(buf2), hdr->env->cc, 1);
+ if (optional && buf2[0] == '\0')
+ optional = 0;
+ mutt_format_s (dest, destlen, prefix, buf2);
+ break;
+
case 's':
if (flags & M_FORMAT_TREE && !hdr->collapsed)
diff -r 93c6ae1ef01b -r aec82c4dd826 init.h
--- a/init.h Mon Sep 21 10:28:22 2015 +0800
+++ b/init.h Sun Sep 20 20:37:47 2015 -0400
@@ -1311,6 +1311,8 @@
** stashed the message: list name or recipient name
** if not sent to a list
** .dt %P .dd progress indicator for the built-in pager (how much of the file has been displayed)
+ ** .dt %r .dd comma separated list of ``To:'' recipients
+ ** .dt %R .dd comma separated list of ``Cc:'' recipients
** .dt %s .dd subject of the message
** .dt %S .dd status of the message (``N''/``D''/``d''/``!''/``r''/\(as)
** .dt %t .dd ``To:'' field (recipients)
diff -r 93c6ae1ef01b -r aec82c4dd826 send.c
--- a/send.c Mon Sep 21 10:28:22 2015 +0800
+++ b/send.c Sun Sep 20 20:37:47 2015 -0400
@@ -398,7 +398,7 @@
void mutt_make_attribution (CONTEXT *ctx, HEADER *cur, FILE *out)
{
- char buffer[STRING];
+ char buffer[LONG_STRING];
if (Attribution)
{
mutt_make_string (buffer, sizeof (buffer), Attribution, ctx, cur);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic