summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2016-08-27 09:32:23 -0600
committerEduardo Chappa <chappa@washington.edu>2016-08-27 09:32:23 -0600
commit33dbd12738cc42efbdf0442050dd2ddfbff253e0 (patch)
tree159334ae3432bbec09b0ececf2576a4fc9d6bd1e
parent0556fa1fb3098640340b10ebe045600531336581 (diff)
downloadalpine-33dbd12738cc42efbdf0442050dd2ddfbff253e0.tar.xz
* New configuration option Alternate Reply Menu which adds more ways
to control features and variables when you start to reply to a message.
-rw-r--r--alpine/mailpart.c2
-rw-r--r--alpine/reply.c241
-rw-r--r--alpine/reply.h2
-rw-r--r--pith/conf.c2
-rw-r--r--pith/conftype.h1
-rw-r--r--pith/pine.hlp89
-rw-r--r--pith/reply.c32
-rw-r--r--pith/state.h12
-rw-r--r--po/Makefile.in8
9 files changed, 312 insertions, 77 deletions
diff --git a/alpine/mailpart.c b/alpine/mailpart.c
index 651786cf..e9f6a6e3 100644
--- a/alpine/mailpart.c
+++ b/alpine/mailpart.c
@@ -3363,7 +3363,7 @@ reply_msg_att(MAILSTREAM *stream, long int msgno, ATTACH_S *a)
/*
* For consistency, the first question is always "include text?"
*/
- if((include_text = reply_text_query(ps_global, 1, &prefix)) >= 0
+ if((include_text = reply_text_query(ps_global, 1, NULL, &prefix)) >= 0
&& reply_news_test(a->body->nested.msg->env, outgoing) > 0
&& reply_harvest(ps_global, msgno, a->number,
a->body->nested.msg->env, &saved_from,
diff --git a/alpine/reply.c b/alpine/reply.c
index dfe389a1..1865dcae 100644
--- a/alpine/reply.c
+++ b/alpine/reply.c
@@ -144,7 +144,8 @@ reply(struct pine *pine_state, ACTION_S *role_arg)
* reply-indent-string to offer...
*/
if(mn_total_cur(pine_state->msgmap) > 1 &&
- F_ON(F_ENABLE_EDIT_REPLY_INDENT, pine_state) &&
+ (F_ON(F_ALT_REPLY_MENU, pine_state)
+ || F_ON(F_ENABLE_EDIT_REPLY_INDENT, pine_state)) &&
reply_quote_str_contains_tokens()){
for(msgno = mn_first_cur(pine_state->msgmap);
msgno > 0L && !tmpfix;
@@ -230,7 +231,7 @@ reply(struct pine *pine_state, ACTION_S *role_arg)
if(!times){ /* only first time */
char *p = cpystr(prefix);
- if((include_text=reply_text_query(pine_state,totalm,&prefix)) < 0)
+ if((include_text=reply_text_query(pine_state,totalm,env,&prefix)) < 0)
goto done_early;
/* edited prefix? */
@@ -307,12 +308,14 @@ reply(struct pine *pine_state, ACTION_S *role_arg)
goto done_early;
/* Setup possible role */
- if(role_arg)
- role = copy_action(role_arg);
+ if (ps_global->reply.role_chosen)
+ role = ps_global->reply.role_chosen;
+ else if(role_arg)
+ role = copy_action(role_arg);
if(!role){
rflags = ROLE_REPLY;
- if(nonempty_patterns(rflags, &dummy)){
+ if(!ps_global->reply.role_chosen && nonempty_patterns(rflags, &dummy)){
/* setup default role */
nrole = NULL;
j = mn_first_cur(pine_state->msgmap);
@@ -466,7 +469,7 @@ reply(struct pine *pine_state, ACTION_S *role_arg)
impl = 0;
filtered = detoken(role, env, 0,
- F_ON(F_SIG_AT_BOTTOM, ps_global) ? 1 : 0,
+ ps_global->reply.signature_bottom,
0, &redraft_pos, &impl);
if(filtered){
if(*filtered){
@@ -486,7 +489,7 @@ reply(struct pine *pine_state, ACTION_S *role_arg)
impl = 1;
if((sig = reply_signature(role, env, &redraft_pos, &impl)) &&
- F_OFF(F_SIG_AT_BOTTOM, ps_global)){
+ !ps_global->reply.signature_bottom){
/*
* If CURSORPOS was set explicitly in sig_file, and there was a
@@ -548,7 +551,7 @@ reply(struct pine *pine_state, ACTION_S *role_arg)
if(orig_body == NULL || orig_body->type == TYPETEXT || reply_raw_body) {
reply_delimiter(env, role, pc);
- if(F_ON(F_INCLUDE_HEADER, pine_state))
+ if(ps_global->reply.include_header)
reply_forward_header(pine_state->mail_stream,
mn_m2raw(pine_state->msgmap,msgno),
NULL, env, pc, prefix);
@@ -567,7 +570,7 @@ reply(struct pine *pine_state, ACTION_S *role_arg)
&& orig_body->nested.part->body.type == TYPETEXT) {
/*---- First part of the message is text -----*/
reply_delimiter(env, role, pc);
- if(F_ON(F_INCLUDE_HEADER, pine_state))
+ if(ps_global->reply.include_header)
reply_forward_header(pine_state->mail_stream,
mn_m2raw(pine_state->msgmap,
msgno),
@@ -948,13 +951,11 @@ reply_to_all_query(int *flagp)
ekey[2].rval = 'p';
ekey[3].ch = -1;
- ps_global->preserve = F_ON(F_PRESERVE_ORIGINAL_FIELD, ps_global);
-
-
+ ps_global->reply.preserve_fields = F_ON(F_PRESERVE_ORIGINAL_FIELD, ps_global);
loop:
- ekey[2].label = ps_global->preserve ? N_("Not Preserve") : N_("Preserve");
+ ekey[2].label = ps_global->reply.preserve_fields ? N_("Not Preserve") : N_("Preserve");
snprintf(prompt, sizeof(prompt), _("Reply to all recipients%s"),
- ps_global->preserve ? _(" (preserving fields)? ") : "? ");
+ ps_global->reply.preserve_fields ? _(" (preserving fields)? ") : "? ");
prompt[sizeof(prompt)-1] = '\0';
@@ -973,7 +974,8 @@ loop:
break;
case 'p' :
- ps_global->preserve = !ps_global->preserve;
+ ps_global->reply.preserve_fields =
+ (ps_global->reply.preserve_fields + 1) % 2;
goto loop; /* ugly, but saves me a variable */
break;
}
@@ -997,61 +999,193 @@ reply_using_replyto_query(void)
/*
- * reply_text_query - Ask user about replying with text...
+ * reply_text_query - Ask user about replying with text, or in the case
+ * of alternate reply menu, set values to the answer to all questions
+ * asked during reply.
*
* Returns: 1 if include the text
* 0 if we're NOT to include the text
* -1 on cancel or error
*/
+#define MAX_REPLY_OPTIONS 10
int
-reply_text_query(struct pine *ps, long int many, char **prefix)
+reply_text_query(struct pine *ps, long int many, ENVELOPE *env, char **prefix)
{
- int ret, edited = 0;
- static ESCKEY_S rtq_opts[] = {
- {'y', 'y', "Y", N_("Yes")},
- {'n', 'n', "N", N_("No")},
- {-1, 0, NULL, NULL}, /* may be overridden below */
- {-1, 0, NULL, NULL}
- };
-
- if(F_ON(F_AUTO_INCLUDE_IN_REPLY, ps)
- && F_OFF(F_ENABLE_EDIT_REPLY_INDENT, ps))
- return(1);
+ int ret, edited = 0, headers = 0;
+ static ESCKEY_S compose_style[MAX_REPLY_OPTIONS];
+ int ekey_num;
+ int orig_sf;
+
+ if(F_OFF(F_ALT_REPLY_MENU, ps)
+ && F_ON(F_AUTO_INCLUDE_IN_REPLY, ps)
+ && F_OFF(F_ENABLE_EDIT_REPLY_INDENT, ps)
+ && F_OFF(F_ALT_REPLY_MENU,ps))
+ return(1);
- while(1){
- if(many > 1L)
- /* TRANSLATORS: The final three %s's can probably be safely ignored */
- snprintf(tmp_20k_buf, SIZEOF_20KBUF, _("Include %s original messages in Reply%s%s%s? "),
- comatose(many),
- F_ON(F_ENABLE_EDIT_REPLY_INDENT, ps) ? " (using \"" : "",
- F_ON(F_ENABLE_EDIT_REPLY_INDENT, ps) ? *prefix : "",
- F_ON(F_ENABLE_EDIT_REPLY_INDENT, ps) ? "\")" : "");
- else
- snprintf(tmp_20k_buf, SIZEOF_20KBUF, _("Include original message in Reply%s%s%s? "),
+ if(F_ON(F_ALT_REPLY_MENU, ps)){
+ orig_sf = ps->reply.use_flowed = *prefix && **prefix ? (F_OFF(F_QUELL_FLOWED_TEXT, ps)
+ && F_OFF(F_STRIP_WS_BEFORE_SEND, ps)
+ && (strcmp(*prefix, "> ") == 0
+ || strcmp(*prefix, ">") == 0)) : 0;
+ ps->reply.strip_signature = ps->full_header == 0
+ && (F_ON(F_ENABLE_STRIP_SIGDASHES, ps)
+ || F_ON(F_ENABLE_SIGDASHES, ps));
+ ps->reply.keep_attach = F_ON(F_ATTACHMENTS_IN_REPLY, ps);
+ ps->reply.include_header = F_ON(F_INCLUDE_HEADER, ps);
+ }
+ ps->reply.preserve_fields = F_ON(F_PRESERVE_ORIGINAL_FIELD, ps);
+ ps->reply.signature_bottom = F_ON(F_SIG_AT_BOTTOM, ps);
+ ps->reply.role_chosen = NULL;
+
+ while(1){
+ compose_style[ekey_num = 0].ch = 'y';
+ compose_style[ekey_num].rval = 'y';
+ compose_style[ekey_num].name = "Y";
+ compose_style[ekey_num++].label = N_("Yes");
+
+ compose_style[ekey_num].ch = 'n';
+ compose_style[ekey_num].rval = 'n';
+ compose_style[ekey_num].name = "N";
+ compose_style[ekey_num++].label = N_("No");
+
+ if (F_OFF(F_ALT_REPLY_MENU, ps)){ /**** Standard menu ****/
+ /* TRANSLATORS: The final five %s's can probably be safely ignored */
+ snprintf(tmp_20k_buf, SIZEOF_20KBUF, _("Include %s%soriginal message%s in Reply%s%s%s%s%s%s? "),
+ (many > 1L) ? comatose(many) : "",
+ (many > 1L) ? " " : "",
+ (many > 1L) ? "s" : "",
+ (many > 1L) ? "s" : "",
F_ON(F_ENABLE_EDIT_REPLY_INDENT, ps) ? " (using \"" : "",
F_ON(F_ENABLE_EDIT_REPLY_INDENT, ps) ? *prefix : "",
+ ps->reply.role_chosen ? "\" and role \"" : "",
+ ps->reply.role_chosen ? ps->reply.role_chosen->nick : "",
F_ON(F_ENABLE_EDIT_REPLY_INDENT, ps) ? "\")" : "");
+ tmp_20k_buf[SIZEOF_20KBUF-1] = '\0';
- if(F_ON(F_ENABLE_EDIT_REPLY_INDENT, ps)){
- rtq_opts[2].ch = ctrl('R');
- rtq_opts[2].rval = 'r';
- rtq_opts[2].name = "^R";
- rtq_opts[2].label = N_("Edit Indent String");
+ if (F_ON(F_ENABLE_EDIT_REPLY_INDENT, ps)){
+ compose_style[ekey_num].ch = ctrl('R');
+ compose_style[ekey_num].rval = 'r';
+ compose_style[ekey_num].name = "^R";
+ compose_style[ekey_num++].label = N_("Edit Indent String");
+ }
+ } else { /***** Alternate Reply Menu ********/
+ unsigned which_help;
+
+ snprintf(tmp_20k_buf, SIZEOF_20KBUF, _("Include %s%soriginal message%s in Reply (using \"%s%s%s\")? "),
+ (many > 1L) ? comatose(many) : "",
+ (many > 1L) ? " " : "",
+ (many > 1L) ? "s" : "",
+ *prefix,
+ ps->reply.role_chosen ? "\" and role \"" : "",
+ ps->reply.role_chosen ? ps->reply.role_chosen->nick : "");
+ tmp_20k_buf[SIZEOF_20KBUF-1] = '\0';
+
+ compose_style[ekey_num].ch = 'h';
+ compose_style[ekey_num].rval = 'H';
+ compose_style[ekey_num].name = "H";
+ compose_style[ekey_num++].label = ps->reply.include_header
+ ? N_("No Header") : N_("Inc Headr");
+
+ compose_style[ekey_num].ch = 's';
+ compose_style[ekey_num].rval = 'S';
+ compose_style[ekey_num].name = "S";
+ compose_style[ekey_num++].label = ps->reply.strip_signature
+ ? N_("No Strip"): N_("Strip Sig");
+
+#if 0
+ if(orig_sf){
+ compose_style[ekey_num].ch = 'f';
+ compose_style[ekey_num].rval = 'F';
+ compose_style[ekey_num].name = "F";
+ compose_style[ekey_num++].label = ps->reply.use_flowed
+ ? N_("Use Flowed") : N_("Not Flowed");
+ }
+#endif /* 0 */
+
+ compose_style[ekey_num].ch = 'a';
+ compose_style[ekey_num].rval = 'A';
+ compose_style[ekey_num].name = "A";
+ compose_style[ekey_num++].label = ps->reply.keep_attach
+ ? N_("No Attach"): N_("Inc Attach");
+
+ compose_style[ekey_num].ch = 'b';
+ compose_style[ekey_num].rval = 'B';
+ compose_style[ekey_num].name = "B";
+ compose_style[ekey_num++].label = ps->reply.signature_bottom
+ ? N_("Sig Top") : N_("Sig Bottom");
+
+ compose_style[ekey_num].ch = 'r';
+ compose_style[ekey_num].rval = 'R';
+ compose_style[ekey_num].name = "R";
+ compose_style[ekey_num++].label = N_("Set Role");
+
+ compose_style[ekey_num].ch = ctrl('R');
+ compose_style[ekey_num].rval = 'r';
+ compose_style[ekey_num].name = "^R";
+ compose_style[ekey_num++].label = N_("Edit Indent String");
+
+ /***** End Alt Reply Menu *********/
}
- else
- rtq_opts[2].ch = -1;
+
+ compose_style[ekey_num].ch = -1;
+ compose_style[ekey_num].name = NULL;
+ compose_style[ekey_num].label = NULL;
switch(ret = radio_buttons(tmp_20k_buf,
ps->ttyo->screen_rows > 4
- ? -FOOTER_ROWS(ps_global) : -1,
- rtq_opts,
- (edited || F_ON(F_AUTO_INCLUDE_IN_REPLY, ps))
- ? 'y' : 'n',
+ ? -FOOTER_ROWS(ps) : -1,
+ compose_style,
+ (edited || headers || F_ON(F_AUTO_INCLUDE_IN_REPLY, ps))
+ ? 'y' : 'n',
'x', NO_HELP, RB_SEQ_SENSITIVE)){
case 'x':
cmd_cancelled("Reply");
return(-1);
+ case 'A':
+ ps->reply.keep_attach = (ps->reply.keep_attach + 1) % 2;
+ break;
+
+ case 'B':
+ ps->reply.signature_bottom = (ps->reply.signature_bottom + 1) % 2;
+ break;
+
+ case 'F':
+ ps->reply.use_flowed = (ps->reply.use_flowed + 1) % 2;
+ break;
+
+ case 'S':
+ ps->reply.strip_signature = (ps->reply.strip_signature + 1) % 2;
+ break;
+
+ case 'H':
+ ps->reply.include_header = (ps->reply.include_header + 1) % 2;
+ headers = ps->reply.include_header;
+ break;
+
+ case 'R':
+ {
+ void (*prev_screen)(struct pine *) = ps->prev_screen,
+ (*redraw)(void) = ps->redrawer;
+ ps->redrawer = NULL;
+ ps->next_screen = SCREEN_FUN_NULL;
+ if(role_select_screen(ps, &ps->reply.role_chosen, 1) < 0){
+ cmd_cancelled("Reply");
+ ps->next_screen = prev_screen;
+ ps->redrawer = redraw;
+ if (ps->redrawer)
+ (*ps->redrawer)();
+ continue;
+ }
+ ps->next_screen = prev_screen;
+ ps->redrawer = redraw;
+ if(ps->reply.role_chosen)
+ ps->reply.role_chosen = combine_inherited_role(ps->reply.role_chosen);
+ }
+ if (ps->redrawer)
+ (*ps->redrawer)();
+ break;
+
case 'r':
if(prefix && *prefix){
int done = 0;
@@ -1068,13 +1202,18 @@ reply_text_query(struct pine *ps, long int many, char **prefix)
OE_SEQ_SENSITIVE;
switch(optionally_enter(buf, ps->ttyo->screen_rows > 4
- ? -FOOTER_ROWS(ps_global) : -1,
+ ? -FOOTER_ROWS(ps) : -1,
0, sizeof(buf), "Reply prefix : ",
NULL, NO_HELP, &flags)){
case 0: /* entry successful, continue */
if(flags & OE_USER_MODIFIED){
fs_give((void **)prefix);
*prefix = removing_quotes(cpystr(buf));
+ orig_sf = ps->reply.use_flowed = *prefix && **prefix ?
+ (F_OFF(F_QUELL_FLOWED_TEXT, ps)
+ && F_OFF(F_STRIP_WS_BEFORE_SEND, ps)
+ && (strcmp(*prefix, "> ") == 0
+ || strcmp(*prefix, ">") == 0)) : 0;
edited = 1;
}
@@ -1092,7 +1231,7 @@ reply_text_query(struct pine *ps, long int many, char **prefix)
ClearScreen();
redraw_titlebar();
if(ps_global->redrawer != NULL)
- (*ps_global->redrawer)();
+ (*ps->redrawer)();
redraw_keymenu();
break;
diff --git a/alpine/reply.h b/alpine/reply.h
index 2c239071..134f8fc2 100644
--- a/alpine/reply.h
+++ b/alpine/reply.h
@@ -28,7 +28,7 @@ int reply(struct pine *, ACTION_S *);
int confirm_role(long, ACTION_S **);
int reply_to_all_query(int *);
int reply_using_replyto_query(void);
-int reply_text_query(struct pine *, long, char **);
+int reply_text_query(struct pine *, long, ENVELOPE *, char **);
int reply_news_test(ENVELOPE *, ENVELOPE *);
char *get_signature_file(char *, int, int, int);
int forward(struct pine *, ACTION_S *);
diff --git a/pith/conf.c b/pith/conf.c
index 9868013e..82b539b5 100644
--- a/pith/conf.c
+++ b/pith/conf.c
@@ -2838,6 +2838,8 @@ feature_list(int index)
F_ALWAYS_SPELL_CHECK, h_config_always_spell_check, PREF_COMP, 0},
/* Reply Prefs */
+ {"alternate-reply-menu", NULL,
+ F_ALT_REPLY_MENU, h_config_alt_reply_menu, PREF_RPLY, 0},
{"copy-to-address-to-from-if-it-is-us", "Copy To Address to From if it is Us",
F_COPY_TO_TO_FROM, h_config_copy_to_to_from, PREF_RPLY, 0},
{"enable-reply-indent-string-editing", NULL,
diff --git a/pith/conftype.h b/pith/conftype.h
index 9549e49d..2d81f2bf 100644
--- a/pith/conftype.h
+++ b/pith/conftype.h
@@ -508,6 +508,7 @@ typedef enum {
F_MAILDROPS_PRESERVE_STATE,
F_EXPOSE_HIDDEN_CONFIG,
F_ALT_COMPOSE_MENU,
+ F_ALT_REPLY_MENU,
F_ALT_ROLE_MENU,
F_ALWAYS_SPELL_CHECK,
F_QUELL_TIMEZONE,
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 2a7159fd..7590d850 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 162 2016-08-26 16:30:49
+Alpine Commit 163 2016-08-27 09:32:18
============= h_news =================
<HTML>
<HEAD>
@@ -188,6 +188,11 @@ Additions include:
<LI> Unix-Alpine: Connect securely to a LDAP server on a secure port.
Based on a contribution by Wang Kang.
+ <LI> New configuration option
+ <a href="h_config_alt_reply_menu"><!--#echo var="FEAT_alternate-reply-menu"--></a>
+ which adds more ways to control features and variables when you
+ start to reply to a message.
+
<LI> Added support for RFC 2971 - IMAP ID extension.
<LI> Add configuration <A href="h_config_ignore_size"><!--#echo var="FEAT_ignore-size-changes"--></A>
@@ -3744,6 +3749,7 @@ There are also additional details on
<li><a href="h_config_allow_talk">FEATURE: <!--#echo var="FEAT_allow-talk"--></a>
<li><a href="h_config_alt_compose_menu">FEATURE: <!--#echo var="FEAT_alternate-compose-menu"--></a>
<li><a href="h_config_alt_role_menu">FEATURE: <!--#echo var="FEAT_alternate-role-menu"--></a>
+<li><a href="h_config_alt_reply_menu">FEATURE: <!--#echo var="FEAT_alternate-reply-menu"--></a>
<li><a href="h_config_force_low_speed">FEATURE: <!--#echo var="FEAT_assume-slow-link"--></a>
<li><a href="h_config_auto_read_msgs">FEATURE: <!--#echo var="FEAT_auto-move-read-msgs"--></a>
<li><a href="h_config_auto_open_unread">FEATURE: <!--#echo var="FEAT_auto-open-next-unread"--></a>
@@ -29398,6 +29404,87 @@ of flowed text.
&lt;End of help on this topic&gt;
</BODY>
</HTML>
+====== h_config_alt_reply_menu =====
+<HTML>
+<HEAD>
+<TITLE>FEATURE: <!--#echo var="FEAT_alternate-reply-menu"--></TITLE>
+</HEAD>
+<BODY>
+<H1>FEATURE: <!--#echo var="FEAT_alternate-reply-menu"--></H1>
+
+Note that if this option is enabled, then the option
+<A HREF="h_config_auto_include_reply"><!--#echo var="FEAT_include-text-in-reply"--></A>
+is ignored. See below to understand why.
+<P>
+When you reply to a message, a series of questions are asked that
+determines how your reply will be handled by Alpine. This feature only
+affects the result of the first question you are asked, and its purpose is
+to set values that could override defaults set in Alpine's main
+configuration screen. As a result, this menu allows you to configure even
+more features than you would be able to do without this option. For
+example, this menu always allows you to override or select a <A
+HREF="h_rules_roles">Role</A> if you have defined one, or allows you to
+override your indent string, regardless of if you have enabled
+<A HREF="h_config_prefix_editing"><!--#echo var="FEAT_enable-reply-indent-string-editing"--></A>.
+The full list of options can be found below.
+<P>
+Here is an example of how this option works. After you press Reply,
+if you see &quot;A Inc Attach&quot; in the menu, it means that
+if you press &quot;A&quot;, then Alpine will include the attachments
+of the original message, and the default is not to include them.
+Conversely, if you see &quot;A No Attach&quot;
+then by pressing &quot;A&quot; Alpine will not include
+attachments in your reply, and the default is that Alpine will
+include them in your reply. The value that you see when you
+start your reply is controlled by the option
+<A HREF="h_config_attach_in_reply">
+<!--#echo var="FEAT_include-attachments-in-reply"-->
+</A>. If the feature is enabled, then Alpine will display
+&quot;A No Attach&quot; to override the default behavior. You can
+toggle between the two values of this option by pressing &quot;A&quot;.
+Remember that the value that you see in the menu is the action that will
+be done when you press the associated command.
+<P>
+Below are your options:
+<OL>
+<LI><B>A</B>: This determines if Alpine will include or not the
+attachments sent to you in the message that you are replying to. The default
+is to use the value of the configuration option
+<A HREF="h_config_attach_in_reply"><!--#echo var="FEAT_include-attachments-in-reply"--></A> and can be overriden by using this command.
+
+<LI><B>H</B>: This command determines if the headers of a message are
+included in the body of the message that is being replied to. By default
+Alpine will use the value of the configuration option
+<A HREF="h_config_include_header"><!--#echo var="FEAT_include-header-in-reply"--></A>.
+Observe that by toggling this option to include headers, text will be toggled
+to be included by default.
+
+<LI><B>R</B>: Can be used to set a role different from the default.
+
+<LI><B>S</B>: Determines if Alpine will strip the signature from a
+message. The default is to strip the signature when the message is not
+viewed in headers mode, and you either have enabled
+<A HREF="h_config_sigdashes"><!--#echo var="FEAT_enable-sigdashes"--></A>
+or
+<A HREF="h_config_strip_sigdashes"><!--#echo var="FEAT_strip-from-sigdashes-on-reply"--></A>.
+
+<LI><B>Ctrl-R</B>: Can be used to edit the
+<A HREF="h_config_reply_indent_string">&quot;<!--#echo var="VAR_reply-indent-string"-->&quot;</A>.
+</OL>
+<P>
+In order to include the text of the original message in the reply
+you either need to press 'y' to include the original text, or 'n' to
+exclude it from the reply. Pressing return will execute the default
+action, which is to include text only if the option
+<A HREF="h_config_auto_include_reply"><!--#echo var="FEAT_include-text-in-reply"--></A>
+is enabled. However, notice that the default is to include text if you edit the
+reply indent string or if you explicitly set through this menu that you
+want headers included in the reply message.
+
+<P>
+&lt;End of help on this topic&gt;
+</BODY>
+</HTML>
====== h_config_del_from_dot =====
<HTML>
<HEAD>
diff --git a/pith/reply.c b/pith/reply.c
index 9361781f..fac2348b 100644
--- a/pith/reply.c
+++ b/pith/reply.c
@@ -135,7 +135,7 @@ reply_harvest(struct pine *ps, long int msgno, char *section, ENVELOPE *env,
* nobody else.
*/
if(env->reply_to && !addr_lists_same(env->reply_to, env->from)
- && (F_ON(F_AUTO_REPLY_TO, ps_global)
+ && (F_ON(F_AUTO_REPLY_TO, ps)
|| ((*flags) & RSF_FORCE_REPLY_TO)
|| (pith_opt_replyto_prompt && (*pith_opt_replyto_prompt)() == 'y'))){
rep_field = "reply-to";
@@ -408,7 +408,7 @@ reply_seed(struct pine *ps, ENVELOPE *outgoing, ENVELOPE *env,
*to_tail = reply_cp_addr(ps, 0, NULL, NULL, outgoing->to,
(ADDRESS *) NULL, saved_from, RCA_ALL);
if(replytoall){
- if(ps->preserve){
+ if(ps->reply.preserve_fields){
while(*to_tail)
to_tail = &(*to_tail)->next;
@@ -962,7 +962,7 @@ reply_body(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruct *orig_body,
impl = 0;
filtered = detoken(role, env, 0,
- F_ON(F_SIG_AT_BOTTOM, ps_global) ? 1 : 0,
+ ps_global->reply.signature_bottom,
0, redraft_pos, &impl);
if(filtered){
if(*filtered){
@@ -983,7 +983,7 @@ reply_body(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruct *orig_body,
if(toplevel &&
(sig = reply_signature(role, env, redraft_pos, &impl)) &&
- F_OFF(F_SIG_AT_BOTTOM, ps_global)){
+ !ps_global->reply.signature_bottom){
/*
* If CURSORPOS was set explicitly in sig_file, and there was a
@@ -1023,7 +1023,7 @@ reply_body(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruct *orig_body,
if(!orig_body
|| orig_body->type == TYPETEXT
|| reply_raw_body
- || F_OFF(F_ATTACHMENTS_IN_REPLY, ps_global)){
+ || !ps_global->reply.keep_attach){
char *charset = NULL;
/*------ Simple text-only message ----*/
@@ -1031,7 +1031,7 @@ reply_body(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruct *orig_body,
body->type = TYPETEXT;
body->contents.text.data = msgtext;
reply_delimiter(env, role, pc);
- if(F_ON(F_INCLUDE_HEADER, ps_global))
+ if(ps_global->reply.include_header)
reply_forward_header(stream, msgno, sect_prefix,
env, pc, prefix);
@@ -1089,7 +1089,7 @@ reply_body(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruct *orig_body,
if(reply_body_text(orig_body, &tmp_body)){
reply_delimiter(env, role, pc);
- if(F_ON(F_INCLUDE_HEADER, ps_global))
+ if(ps_global->reply.include_header)
reply_forward_header(stream, msgno, sect_prefix,
env, pc, prefix);
@@ -1127,7 +1127,7 @@ reply_body(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruct *orig_body,
body->nested.part->body.subtype = cpystr("Plain");
}
reply_delimiter(env, role, pc);
- if(F_ON(F_INCLUDE_HEADER, ps_global))
+ if(ps_global->reply.include_header)
reply_forward_header(stream, msgno, sect_prefix,
env, pc, prefix);
@@ -1150,7 +1150,7 @@ reply_body(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruct *orig_body,
int partnum;
reply_delimiter(env, role, pc);
- if(F_ON(F_INCLUDE_HEADER, ps_global))
+ if(ps_global->reply.include_header)
reply_forward_header(stream, msgno, sect_prefix,
env, pc, prefix);
/* SECTBUFLEN = sizeof(sect_buf) */
@@ -1348,10 +1348,10 @@ reply_signature(ACTION_S *role, ENVELOPE *env, REDRAFT_POS_S **redraft_pos, int
size_t l;
sig = detoken(role, env,
- 2, F_ON(F_SIG_AT_BOTTOM, ps_global) ? 0 : 1, 1,
+ 2, ps_global->reply.signature_bottom ? 0 : 1, 1,
redraft_pos, impl);
- if(F_OFF(F_SIG_AT_BOTTOM, ps_global) && (!sig || !*sig)){
+ if(!ps_global->reply.signature_bottom && (!sig || !*sig)){
if(sig)
fs_give((void **)&sig);
@@ -2701,7 +2701,7 @@ get_body_part_text(MAILSTREAM *stream, struct mail_bodystruct *body,
* tied our hands, alter the prefix to continue flowed
* formatting...
*/
- if(flow_res)
+ if(flow_res && ps_global->reply.use_flowed)
wrapflags |= GFW_FLOW_RESULT;
filters[filtcnt].filter = gf_wrap;
@@ -2737,9 +2737,9 @@ get_body_part_text(MAILSTREAM *stream, struct mail_bodystruct *body,
* We also want to fold "> " quotes so we get the
* attributions correct.
*/
- if(flow_res && prefix && !strucmp(prefix, "> "))
+ if(flow_res && ps_global->reply.use_flowed && prefix && !strucmp(prefix, "> "))
*(prefix_p = prefix + 1) = '\0';
-
+ ps_global->reply.use_flowed = 1; /* reset for next call */
if(!(wrapflags & GFW_FLOWED)
&& flow_res){
filters[filtcnt].filter = gf_line_test;
@@ -2772,9 +2772,7 @@ get_body_part_text(MAILSTREAM *stream, struct mail_bodystruct *body,
}
if(prefix){
- if(ps_global->full_header != 2
- && (F_ON(F_ENABLE_SIGDASHES, ps_global)
- || F_ON(F_ENABLE_STRIP_SIGDASHES, ps_global))){
+ if(ps_global->reply.strip_signature){
dashdata = 0;
filters[filtcnt].filter = gf_line_test;
filters[filtcnt++].data = gf_line_test_opt(sigdash_strip, &dashdata);
diff --git a/pith/state.h b/pith/state.h
index f6b85d9b..3941a7f8 100644
--- a/pith/state.h
+++ b/pith/state.h
@@ -251,6 +251,16 @@ struct pine {
short init_context;
+ struct {
+ unsigned keep_attach:1;
+ unsigned strip_signature:1;
+ unsigned use_flowed:1;
+ unsigned include_header:1;
+ unsigned preserve_fields:1;
+ unsigned signature_bottom:1;
+ ACTION_S *role_chosen;
+ } reply;
+
int *initial_cmds; /* cmds to execute on startup */
int *free_initial_cmds; /* used to free when done */
@@ -292,8 +302,6 @@ struct pine {
SortOrder def_sort, /* Default sort type */
sort_types[22];
- int preserve;
-
int last_expire_year, last_expire_month;
int printer_category;
diff --git a/po/Makefile.in b/po/Makefile.in
index d80f8801..e72ba769 100644
--- a/po/Makefile.in
+++ b/po/Makefile.in
@@ -11,7 +11,7 @@
# Origin: gettext-0.16
PACKAGE = alpine
-VERSION = 2.20.10
+VERSION = 2.20.14
PACKAGE_BUGREPORT = chappa@washington.edu
SHELL = /bin/sh
@@ -34,12 +34,12 @@ INSTALL_DATA = ${INSTALL} -m 644
# We use $(mkdir_p).
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
-# ${SHELL} /run/media/echappa/Alpine/alpine/alpinegit/install-sh does not start with $(SHELL), so we add it.
+# ${SHELL} /run/media/echappa/Work/alpine/alpinegit/install-sh does not start with $(SHELL), so we add it.
# In automake >= 1.10, $(MKDIR_P) is derived from ${MKDIR_P}, which is defined
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
# versions, $(mkinstalldirs) and $(install_sh) are unused.
-mkinstalldirs = $(SHELL) ${SHELL} /run/media/echappa/Alpine/alpine/alpinegit/install-sh -d
-install_sh = $(SHELL) ${SHELL} /run/media/echappa/Alpine/alpine/alpinegit/install-sh
+mkinstalldirs = $(SHELL) ${SHELL} /run/media/echappa/Work/alpine/alpinegit/install-sh -d
+install_sh = $(SHELL) ${SHELL} /run/media/echappa/Work/alpine/alpinegit/install-sh
MKDIR_P = /usr/bin/mkdir -p
mkdir_p = $(MKDIR_P)