diff -rc alpine-2.10/alpine/reply.c alpine-2.10.preservefields/alpine/reply.c *** alpine-2.10/alpine/reply.c 2013-01-11 17:43:09.000000000 -0700 --- alpine-2.10.preservefields/alpine/reply.c 2013-01-11 20:43:22.000000000 -0700 *************** *** 931,938 **** int reply_to_all_query(int *flagp) { ! switch(want_to("Reply to all recipients", ! 'n', 'x', NO_HELP, WT_SEQ_SENSITIVE)){ case 'x' : return(-1); --- 931,966 ---- int reply_to_all_query(int *flagp) { ! char prompt[80]; ! ESCKEY_S ekey[4]; ! char cmd; ! ! ekey[0].name = "Y"; ! ekey[0].ch = 'y'; ! ekey[0].rval = 'y'; ! ekey[0].label = N_("Yes"); ! ekey[1].name = "N"; ! ekey[1].ch = 'n'; ! ekey[1].rval = 'n'; ! ekey[1].label = N_("No"); ! ekey[2].name = "P"; ! ekey[2].ch = 'p'; ! ekey[2].rval = 'p'; ! ekey[3].ch = -1; ! ! ps_global->preserve = F_ON(F_PRESERVE_ORIGINAL_FIELD, ps_global); ! ! ! loop: ! ekey[2].label = ps_global->preserve ? N_("Not Preserve") : N_("Preserve"); ! snprintf(prompt, sizeof(prompt), _("Reply to all recipients%s"), ! ps_global->preserve ? _(" (preserving fields)? ") : "? "); ! ! prompt[sizeof(prompt)-1] = '\0'; ! ! switch(cmd = radio_buttons(prompt, -FOOTER_ROWS(ps_global), ekey, ! 'n', 'x', h_preserve_field, RB_NORM)){ ! case 'x' : return(-1); *************** *** 943,948 **** --- 971,981 ---- case 'n' : /* clear reply-all bit */ (*flagp) &= ~RSF_FORCE_REPLY_ALL; break; + + case 'p' : + ps_global->preserve = !ps_global->preserve; + goto loop; /* ugly, but saves me a variable */ + break; } return(0); diff -rc alpine-2.10/pith/conf.c alpine-2.10.preservefields/pith/conf.c *** alpine-2.10/pith/conf.c 2013-01-11 19:45:41.000000000 -0700 --- alpine-2.10.preservefields/pith/conf.c 2013-01-11 20:43:22.000000000 -0700 *************** *** 2800,2805 **** --- 2800,2807 ---- F_ENABLE_STRIP_SIGDASHES, h_config_strip_sigdashes, PREF_RPLY, 0}, {"forward-as-attachment", "Forward messages as attachments", F_FORWARD_AS_ATTACHMENT, h_config_forward_as_attachment, PREF_RPLY, 0}, + {"preserve-original-fields", NULL, + F_PRESERVE_ORIGINAL_FIELD, h_config_preserve_field, PREF_RPLY, 0}, /* Sending Prefs */ {"disable-sender", "Do Not Generate Sender Header", diff -rc alpine-2.10/pith/conftype.h alpine-2.10.preservefields/pith/conftype.h *** alpine-2.10/pith/conftype.h 2013-01-11 19:45:41.000000000 -0700 --- alpine-2.10.preservefields/pith/conftype.h 2013-01-11 20:43:22.000000000 -0700 *************** *** 516,521 **** --- 516,522 ---- F_RENDER_HTML_INTERNALLY, F_ENABLE_JUMP_CMD, F_FORWARD_AS_ATTACHMENT, + F_PRESERVE_ORIGINAL_FIELD, #ifndef _WINDOWS F_USE_SYSTEM_TRANS, #endif /* ! _WINDOWS */ diff -rc alpine-2.10/pith/pine.hlp alpine-2.10.preservefields/pith/pine.hlp *** alpine-2.10/pith/pine.hlp 2013-01-11 20:33:27.000000000 -0700 --- alpine-2.10.preservefields/pith/pine.hlp 2013-01-11 20:43:22.000000000 -0700 *************** *** 3252,3257 **** --- 3252,3258 ----
  • FEATURE:
  • FEATURE:
  • FEATURE: +
  • FEATURE:
  • FEATURE:
  • FEATURE:
  • FEATURE: *************** *** 27747,27752 **** --- 27748,27789 ---- <End of help on this topic> + ====== h_config_preserve_field ===== + + + FEATURE: <!--#echo var="FEAT_preserve-original-fields"--> + + +

    FEATURE:

    + + When you reply to a message that has been sent to several recipients, some of + them may have been added in different parts of the headers. For example, + some of the recipients will be listed in the To: header, while others will + be listed in the Cc: header. +

    + If this feature is disabled, the default behavior of Alpine will be used, + and that is, that almost all recipients of the message will be + listed in the Cc: field. However, if you enable this feature, then, + excepting you, recipients originally listed in the Cc: field will be + listed again in the Cc: field, and those listed in the To: field in the + original message will be listed in the To: field again. The person in the + From: field will be added to the To: field. +

    + Note that this will cause some messages that you send in Alpine to look + different. In particular, the To: field of a message will not be put in the + Cc: field, as is normally done. In fact, most people expect this to happen. + If you find that this is a problem you should disable this feature. You can + still make Alpine have this behavior on a per message basis. In order to do + this, you will see a new option in the menu for the "Reply to all + recipients?" question. In this case, pressing "p" will make + Alpine toggle its question so you can preserve the To: and Cc: fields for that + message. +

    + <End of help on this topic> + + ====== h_config_sub_lists ===== *************** *** 35305,35307 **** --- 35342,35347 ---- ========== h_select_by_smaller_size ========== Enter a number or ^C to cancel. All messages less than this many characters in size will be selected. Examples: 2176, 1.53K (1530), or 3M (3000000). + ========== h_preserve_field ========== + Use 'p' to toggle between preserving or not preserving the original To: + and Cc: fields of the message. Enter ^C to cancel message. diff -rc alpine-2.10/pith/reply.c alpine-2.10.preservefields/pith/reply.c *** alpine-2.10/pith/reply.c 2013-01-11 11:26:44.000000000 -0700 --- alpine-2.10.preservefields/pith/reply.c 2013-01-11 20:43:22.000000000 -0700 *************** *** 373,392 **** /* Put Reply-To or From in To. */ *to_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->to, (ADDRESS *) NULL, saved_from, RCA_ALL); - /* and the rest in cc */ if(replytoall){ ! *cc_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc, outgoing->to, saved_to, RCA_ALL); ! while(*cc_tail) /* stay on last address */ ! cc_tail = &(*cc_tail)->next; ! *cc_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc, outgoing->to, saved_cc, RCA_ALL); ! while(*cc_tail) ! cc_tail = &(*cc_tail)->next; ! *cc_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc, outgoing->to, saved_resent, RCA_ALL); } } else if(saved_to){ --- 373,409 ---- /* Put Reply-To or From in To. */ *to_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->to, (ADDRESS *) NULL, saved_from, RCA_ALL); if(replytoall){ ! if(ps->preserve){ ! while(*to_tail) ! to_tail = &(*to_tail)->next; ! ! *to_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->to, ! (ADDRESS *) NULL, saved_to, RCA_ALL); ! ! while(*to_tail) ! to_tail = &(*to_tail)->next; ! ! *to_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc, ! outgoing->to, saved_resent, RCA_ALL); ! ! *cc_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc, ! outgoing->to, saved_cc, RCA_ALL); ! } ! else{ /* and the rest in cc */ ! *cc_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc, outgoing->to, saved_to, RCA_ALL); ! while(*cc_tail) /* stay on last address */ ! cc_tail = &(*cc_tail)->next; ! *cc_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc, outgoing->to, saved_cc, RCA_ALL); ! while(*cc_tail) ! cc_tail = &(*cc_tail)->next; ! *cc_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->cc, outgoing->to, saved_resent, RCA_ALL); + } } } else if(saved_to){ diff -rc alpine-2.10/pith/state.h alpine-2.10.preservefields/pith/state.h *** alpine-2.10/pith/state.h 2013-01-11 19:45:41.000000000 -0700 --- alpine-2.10.preservefields/pith/state.h 2013-01-11 20:43:22.000000000 -0700 *************** *** 286,291 **** --- 286,293 ---- SortOrder def_sort, /* Default sort type */ sort_types[22]; + int preserve; + int last_expire_year, last_expire_month; int printer_category;