This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System".
The branch, master has been updated via 1dd8eb505ef646b8489a08edd60309ee97248143 (commit) via 4515ad4efbd7016b1104205ef3d7302de82aba9c (commit) from b0b7ee58c482bf36063e6158f610dd337f3ca568 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=1dd8eb505ef646b8489a08edd60309ee97248143 commit 1dd8eb505ef646b8489a08edd60309ee97248143 Author: Ken Hornstein <k...@pobox.com> Date: Tue Feb 21 15:56:06 2012 -0500 Add support for a -subject switch to comp. diff --git a/etc/components b/etc/components index 64a0337..d4d4f7c 100644 --- a/etc/components +++ b/etc/components @@ -21,5 +21,5 @@ %; make the default mailbox +outbox %; Fcc: %<{fcc}%(putstr)%|+outbox%> -Subject: +Subject:%<{subject} %(putstr)%> -------- diff --git a/man/comp.man b/man/comp.man index aa0c184..4a7152d 100644 --- a/man/comp.man +++ b/man/comp.man @@ -33,6 +33,8 @@ comp \- compose a message .IR address ] .RB [ \-fcc .IR +folder ] +.RB [ \-subject +.IR text ] .RB [ \-whatnowproc .IR program ] .RB [ \-nowhatnowproc ] @@ -57,7 +59,7 @@ From: {from switch} or <Local-Mailbox> or <username@hostname> To: {to switch} or blank cc: {cc switch} or blank Fcc: {fcc switch} or +outbox -Subject: +Subject: {subject switch} or blank -------- .fi .RE @@ -140,6 +142,7 @@ fcc string Any folders specified with `\-fcc\ folder' from string Any addresses specified with `\-from\ address' to string Any addresses specified with `\-to\ address' cc string Any addresses specified with `\-cc\ address' +subject string Any text specified with `\-subject\ text' .fi .RE .PP @@ -161,6 +164,10 @@ overridden by using the .I address switch. .PP +Any text you give to the +.B \-subject +switch will be placed in the \*(lqSubject:\*(rq field in the draft. +.PP If the draft already exists, .B comp will ask you as to the disposition diff --git a/uip/comp.c b/uip/comp.c index 812f596..c8189d1 100644 --- a/uip/comp.c +++ b/uip/comp.c @@ -49,6 +49,8 @@ static struct swit switches[] = { { "fcc mailbox", 0 }, #define WIDTHSW 17 { "width colums", 0 }, +#define SUBJECTSW 18 + { "subject text", 0 }, { NULL, 0 } }; @@ -93,6 +95,7 @@ main (int argc, char **argv) char *ed = NULL, *file = NULL, *form = NULL; char *folder = NULL, *msg = NULL, buf[BUFSIZ]; char *to = NULL, *from = NULL, *cc = NULL, *fcc = NULL, *dp; + char *subject = NULL; char drft[BUFSIZ], **argp, **arguments; struct msgs *mp = NULL; struct format *fmt; @@ -219,6 +222,12 @@ main (int argc, char **argv) if ((outputlinelen = atoi(cp)) < 10) adios (NULL, "impossible width %d", outputlinelen); continue; + + case SUBJECTSW: + if (!(cp = *argp++) || *cp == '-') + adios (NULL, "missing argument to %s", argp[-2]); + subject = cp; + continue; } } if (*cp == '+' || *cp == '@') { @@ -317,6 +326,11 @@ main (int argc, char **argv) if (cptr) cptr->c_text = fcc; } + if (subject) { + FINDCOMP(cptr, "subject"); + if (cptr) + cptr->c_text = subject; + } } try_it_again: http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=4515ad4efbd7016b1104205ef3d7302de82aba9c commit 4515ad4efbd7016b1104205ef3d7302de82aba9c Author: Ken Hornstein <k...@pobox.com> Date: Tue Feb 21 12:58:50 2012 -0500 Switch from (me) to (localmbox) to make -cc me work correctly. diff --git a/etc/replcomps b/etc/replcomps index 204f117..68ca84b 100644 --- a/etc/replcomps +++ b/etc/replcomps @@ -22,7 +22,7 @@ %(formataddr{x-cc})\ %(formataddr{resent-cc})\ %(formataddr{prev-resent-cc})\ -%(formataddr(me))\ +%(formataddr(localmbox))\ %(void(width))%(putaddr cc: ) Fcc: %<{fcc}%{fcc}%|+outbox%> Subject: %<{subject}Re: %(void{subject})%(trim)%(putstr)%> diff --git a/etc/replgroupcomps b/etc/replgroupcomps index 7b48e18..8398f50 100644 --- a/etc/replgroupcomps +++ b/etc/replgroupcomps @@ -26,7 +26,7 @@ %|\ %(lit)%(formataddr %<{mail-reply-to}%?{reply-to}%?{from}%?{sender}%?{return-path}%>)\ %<(nonnull)%(void(width))%(putaddr To: )\n%>\ -%(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\ +%(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(localmbox))\ %<(nonnull)%(void(width))%(putaddr cc: )\n%>%>\ %; Fcc: %<{fcc}%{fcc}%|+outbox%> ----------------------------------------------------------------------- Summary of changes: etc/components | 2 +- etc/replcomps | 2 +- etc/replgroupcomps | 2 +- man/comp.man | 9 ++++++++- uip/comp.c | 14 ++++++++++++++ 5 files changed, 25 insertions(+), 4 deletions(-) hooks/post-receive -- The nmh Mail Handling System _______________________________________________ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits