From: pdmef Date: Mon, 25 Jul 2005 07:27:33 +0000 (+0000) Subject: Rocco Rutte: X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=e83ad1be25aefea3ed21ec08edbaf2d5a72c4a9d Rocco Rutte: - merge in latest mutt changes - update ACK list of manual to reflect muttng contributors (any feeling missing? ;-) git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@342 e385b8ad-14ed-0310-8656-cc95a2468c6d --- diff --git a/ChangeLog.mutt b/ChangeLog.mutt index 022b03d..1c3eecf 100644 --- a/ChangeLog.mutt +++ b/ChangeLog.mutt @@ -1,4 +1,51 @@ -2005-07-24 14:23:25 Thomas Roessler (roessler) +2005-07-25 04:37:20 Brendan Cully (brendan) + + * imap/message.c: Minor cosmetic cleanup (fewer #ifdef HCACHE blocks) + +2005-07-25 04:31:51 Brendan Cully (brendan) + + * muttlib.c: Suppress a printf format warning + +2005-07-24 18:33:31 Brendan Cully (brendan) + + * muttlib.c: Typo in last commit. + +2005-07-24 18:28:36 Brendan Cully (brendan) + + * imap/message.c, muttlib.c, protos.h: Merge full envelope from + message fetch into original sparse envelope, instead of replacing + it. This should be gentler on the various threading hashes and may + (knock on wood) fix the threading segfault. Threading behaviour is + observably better. + + * imap/util.c: Revert Glanzmann's imap_parse_mailbox patch. + +2005-07-24 16:53:59 Thomas Roessler (roessler) + + * thread.c: Try to fix threading bug triggered by duplicate + references. + +2005-07-24 16:51:38 Cedric Duval (brendan) + + * OPS, copy.c, curs_main.c, doc/manual.sgml.head, functions.h, + imap/imap.c, mh.c, mutt.h, mx.c, pager.c, protos.h, thread.c: Add + thread editing commands. + +2005-07-24 16:12:12 Paul Walker (roessler) + + * doc/manual.sgml.head, main.c, protos.h, init.c: This patch + adds an option -D to dump mutt's configuration after all + configuration files have been read. Changes against PW's version: + (1) curses isn't initialized; (2) variables are dumped to stdout, + not to stderr. + +2005-07-24 15:46:26 Thomas Roessler (roessler) + + * hash.c, imap/message.c, imap/util.c: This patch includes (1) + a rewrite of hash_delete_hash, and (2) some changes to the IMAP + code that Thomas Glanzmann made during an attempt to squash some + segmentation fault in May. There is no guarantee that this patch + doesn't break things. If it does, please complain to mutt-dev. * recvattach.c, smime.c: Fix S/MIME segmentation fault. Bug reported by Mads Martin Joergensen; part fixed by Brendan Cully. @@ -478,7 +525,7 @@ 2005-01-29 19:15:07 Thomas Glanzmann (roessler) * hcache.c: - make hcache.c conform to mutt codingstyle - - use $Id: ChangeLog,v 3.435 2005/07/24 14:24:00 roessler Exp $ CVS keyword instead of %K% BitKeeper keyword + - use $Id: ChangeLog,v 3.444 2005/07/25 04:38:56 brendan Exp $ CVS keyword instead of %K% BitKeeper keyword 2005-01-29 19:15:07 Thomas Glanzmann (roessler) diff --git a/UPGRADING b/UPGRADING index 831b0ea..dc9ede5 100644 --- a/UPGRADING +++ b/UPGRADING @@ -10,7 +10,14 @@ This document is not the place for verbose documentation; it only offers the necessary keywords to look them up in the manual, ChangeLog or other sources of information. -2005-24-07: +2005-07-25: + + The '-D' command line option has been added. + + Editing threads functionality is no longer only available + in muttng as it has been integrated into mutt, too. + +2005-07-24: The $xterm_leave option has been added. diff --git a/doc/manual.sgml.head b/doc/manual.sgml.head index f11b711..f67bfe1 100644 --- a/doc/manual.sgml.head +++ b/doc/manual.sgml.head @@ -3422,6 +3422,7 @@ to send messages from the command line as well. -a attach a file to a message -b specify a blind carbon-copy (BCC) address -c specify a carbon-copy (Cc) address +-D print the value of all variables on stdout -e specify a config command to be run after initialization files are read -f specify a mailbox to load -F specify an alternate file to read initialization commands diff --git a/doc/manual.sgml.tail b/doc/manual.sgml.tail index 947e365..851a7c5 100644 --- a/doc/manual.sgml.tail +++ b/doc/manual.sgml.tail @@ -391,7 +391,9 @@ Rocco Rutte -Andreas Kneib +Andreas Kneib +Carsten Schoelzki +Elimar Riesebieter About this document

diff --git a/doc/manual.txt b/doc/manual.txt index e87de1e..9fe58b3 100644 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -317,7 +317,7 @@ _2_._3_._3 _T_h_r_e_a_d_e_d _M_o_d_e - When the mailbox is _s_o_r_t_e_d (section 6.3.288 , page 133) by _t_h_r_e_a_d_s, there are + When the mailbox is _s_o_r_t_e_d (section 6.3.288 , page 134) by _t_h_r_e_a_d_s, there are a few additional functions available in the _i_n_d_e_x and _p_a_g_e_r modes. ^D delete-thread delete all messages in the current thread @@ -425,7 +425,7 @@ match the regular expressions given by the _l_i_s_t_s _o_r _s_u_b_s_c_r_i_b_e (section 3.10 , page 24) commands, but also honor any Mail-Followup-To header(s) if the - _$_h_o_n_o_r___f_o_l_l_o_w_u_p___t_o (section 6.3.87 , page 84) configuration variable is set. + _$_h_o_n_o_r___f_o_l_l_o_w_u_p___t_o (section 6.3.87 , page 85) configuration variable is set. Using this when replying to messages posted to mailing lists helps avoid dupli- cate copies being sent to the author of the message you are replying to. @@ -434,7 +434,7 @@ Asks for an external Unix command and pipes the current or tagged message(s) to it. The variables _$_p_i_p_e___d_e_c_o_d_e (section 6.3.199 , page 113), _$_p_i_p_e___s_p_l_i_t - (section 6.3.201 , page 114), _$_p_i_p_e___s_e_p (section 6.3.200 , page 113) and + (section 6.3.201 , page 114), _$_p_i_p_e___s_e_p (section 6.3.200 , page 114) and _$_w_a_i_t___k_e_y (section 6.3.329 , page 145) control the exact behavior of this function. @@ -496,7 +496,7 @@ Mutt-ng will then enter the _c_o_m_p_o_s_e menu and prompt you for the recipients to place on the ``To:'' header field. Next, it will ask you for the ``Subject:'' field for the message, providing a default if you are replying to or forwarding - a message. See also _$_a_s_k_c_c (section 6.3.10 , page 66), _$_a_s_k_b_c_c (section + a message. See also _$_a_s_k_c_c (section 6.3.10 , page 67), _$_a_s_k_b_c_c (section 6.3.9 , page 66), _$_a_u_t_o_e_d_i_t (section 6.3.17 , page 69), _$_b_o_u_n_c_e (section 6.3.20 , page 69), and _$_f_a_s_t___r_e_p_l_y (section 6.3.59 , page 78) for changing how Mutt-ng asks these questions. @@ -506,7 +506,7 @@ is set, the headers will be at the top of the message in your editor. Any mes- sages you are replying to will be added in sort order to the message, with appropriate _$_a_t_t_r_i_b_u_t_i_o_n (section 6.3.15 , page 68), _$_i_n_d_e_n_t___s_t_r_i_n_g (section - 6.3.108 , page 89) and _$_p_o_s_t___i_n_d_e_n_t___s_t_r_i_n_g (section 6.3.211 , page 116). + 6.3.108 , page 90) and _$_p_o_s_t___i_n_d_e_n_t___s_t_r_i_n_g (section 6.3.211 , page 116). When forwarding a message, if the _$_m_i_m_e___f_o_r_w_a_r_d (section 6.3.135 , page 97) variable is unset, a copy of the forwarded message will be included. If you have specified a _$_s_i_g_n_a_t_u_r_e (section 6.3.258 , page 127), it will be appended @@ -597,7 +597,7 @@ encrypted using the selected public keys, and sent out. Most fields of the entries in the key selection menu (see also _$_p_g_p___e_n_t_r_y___f_o_r_- - _m_a_t (section 6.3.178 , page 108)) have obvious meanings. But some explana- + _m_a_t (section 6.3.178 , page 109)) have obvious meanings. But some explana- tions on the capabilities, flags, and validity fields are in order. The flags sequence (%f) will expand to one of the following flags: @@ -698,7 +698,7 @@ At times it is desirable to delay sending a message that you have already begun to compose. When the _p_o_s_t_p_o_n_e_-_m_e_s_s_a_g_e function is used in the _c_o_m_p_o_s_e menu, the body of your message and attachments are stored in the mailbox specified by - the _$_p_o_s_t_p_o_n_e_d (section 6.3.213 , page 116) variable. This means that you can + the _$_p_o_s_t_p_o_n_e_d (section 6.3.213 , page 117) variable. This means that you can recall the message even if you exit Mutt-ng and then restart it at a later time. @@ -1010,7 +1010,7 @@ folder-hook's, they are executed in the order given in the muttrc. NNoottee:: if you use the ``!'' shortcut for _$_s_p_o_o_l_f_i_l_e (section 6.3.294 , page - 135) at the beginning of the pattern, you must place it inside of double or + 136) at the beginning of the pattern, you must place it inside of double or single quotes in order to distinguish it from the logical _n_o_t operator for the expression. @@ -1337,7 +1337,7 @@ The Mutt-ng E-Mail Client 26 - 6.3.294 , page 135)) should be executed before the mailboxes command. + 6.3.294 , page 136)) should be executed before the mailboxes command. _3_._1_3 _U_s_e_r _d_e_f_i_n_e_d _h_e_a_d_e_r_s @@ -1651,7 +1651,7 @@ Usage: reset _v_a_r_i_a_b_l_e [_v_a_r_i_a_b_l_e ... ] This command is used to set (and unset) _c_o_n_f_i_g_u_r_a_t_i_o_n _v_a_r_i_a_b_l_e_s (section 6.3 , - page 64). There are four basic types of variables: boolean, number, string and + page 65). There are four basic types of variables: boolean, number, string and quadoption. _b_o_o_l_e_a_n variables can be _s_e_t (true) or _u_n_s_e_t (false). _n_u_m_b_e_r variables can be assigned a positive integer value. @@ -2345,7 +2345,7 @@ These shortcuts can be used anywhere you are prompted for a file or mailbox path. - +o ! -- refers to your _$_s_p_o_o_l_f_i_l_e (section 6.3.294 , page 135) (incoming) + +o ! -- refers to your _$_s_p_o_o_l_f_i_l_e (section 6.3.294 , page 136) (incoming) mailbox +o > -- refers to your _$_m_b_o_x (section 6.3.123 , page 95) file @@ -2404,7 +2404,7 @@ Conversely, when group-replying or list-replying to a message which has a Mail- Followup-To header, mutt will respect this header if the _$_h_o_n_o_r___f_o_l_l_o_w_u_p___t_o - (section 6.3.87 , page 84) configuration variable is set. Using list-reply + (section 6.3.87 , page 85) configuration variable is set. Using list-reply will in this case also make sure that the reply goes to the mailing list, even if it's not specified in the list of recipients in the Mail-Followup-To. @@ -2433,7 +2433,7 @@ The Mutt-ng E-Mail Client 47 - Lastly, Mutt-ng has the ability to _s_o_r_t (section 6.3.288 , page 133) the mail- + Lastly, Mutt-ng has the ability to _s_o_r_t (section 6.3.288 , page 134) the mail- box into _t_h_r_e_a_d_s (section 2.3.3 , page 7). A thread is a group of messages which all relate to the same subject. This is usually organized into a tree- like structure where a message and all of its replies are represented graphi- @@ -2512,7 +2512,7 @@ Another way to access your POP3 mail is the _f_e_t_c_h_-_m_a_i_l function (default: G). It allows to connect to _p_o_p___h_o_s_t (section 6.3.205 , page 115), fetch all your - new mail and place it in the local _s_p_o_o_l_f_i_l_e (section 6.3.294 , page 135). + new mail and place it in the local _s_p_o_o_l_f_i_l_e (section 6.3.294 , page 136). After this point, Mutt-ng runs exactly as if the mail had always been local. NNoottee:: If you only need to fetch all messages to local mailbox you should con- @@ -2616,7 +2616,7 @@ tors. This is overridden by an explicit username in the mailbox path (i.e. by using a mailbox name of the form {user@host}). - +o _$_i_m_a_p___p_a_s_s (section 6.3.99 , page 87) - a password which you may preset, + +o _$_i_m_a_p___p_a_s_s (section 6.3.99 , page 88) - a password which you may preset, used by all authentication methods where a password is needed. +o _$_i_m_a_p___a_u_t_h_e_n_t_i_c_a_t_o_r_s (section 6.3.90 , page 85) - a colon-delimited list @@ -2687,7 +2687,7 @@ compressed. This is important because it allows the use of programs that do not have well defined extensions. Just use '.' as a regexp. But this may be sur- prising if your compressing script produces empty files. In this situation, - unset _$_s_a_v_e___e_m_p_t_y (section 6.3.239 , page 122), so that the compressed file + unset _$_s_a_v_e___e_m_p_t_y (section 6.3.239 , page 123), so that the compressed file will be removed if you delete all of the messages. _4_._1_6_._1 _O_p_e_n _a _c_o_m_p_r_e_s_s_e_d _m_a_i_l_b_o_x _f_o_r _r_e_a_d_i_n_g @@ -2998,7 +2998,7 @@ The interpretation of shell meta-characters embedded in MIME parameters can lead to security problems in general. Mutt-ng tries to quote parameters in expansion of %s syntaxes properly, and avoids risky characters by substituting - them, see the _m_a_i_l_c_a_p___s_a_n_i_t_i_z_e (section 6.3.116 , page 93) variable. + them, see the _m_a_i_l_c_a_p___s_a_n_i_t_i_z_e (section 6.3.116 , page 94) variable. Although mutt's procedures to invoke programs with mailcap seem to be safe, there are other applications parsing mailcap, maybe taking less care of it. @@ -3310,6 +3310,7 @@ -a attach a file to a message -b specify a blind carbon-copy (BCC) address -c specify a carbon-copy (Cc) address + -D print the value of all variables on stdout -e specify a config command to be run after initialization files are read -f specify a mailbox to load -F specify an alternate file to read initialization commands @@ -3352,10 +3353,10 @@ +o _a_c_c_o_u_n_t_-_h_o_o_k (section 4.14 , page 49) _p_a_t_t_e_r_n _c_o_m_m_a_n_d - +o _a_l_i_a_s (section 3.2 , page 16) _k_e_y _a_d_d_r_e_s_s [ , _a_d_d_r_e_s_s, ... ] - The Mutt-ng E-Mail Client 64 + +o _a_l_i_a_s (section 3.2 , page 16) _k_e_y _a_d_d_r_e_s_s [ , _a_d_d_r_e_s_s, ... ] + +o _u_n_a_l_i_a_s (section 3.2 , page 16) [ * | _k_e_y ... ] +o _a_l_t_e_r_n_a_t_e_s (section 3.9 , page 23) _r_e_g_e_x_p [ _r_e_g_e_x_p ... ] @@ -3408,10 +3409,10 @@ +o _m_a_i_l_b_o_x_e_s (section 3.12 , page 25) _f_i_l_e_n_a_m_e [ _f_i_l_e_n_a_m_e ... ] - +o _m_b_o_x_-_h_o_o_k (section 3.11 , page 25) _p_a_t_t_e_r_n _m_a_i_l_b_o_x - The Mutt-ng E-Mail Client 65 + +o _m_b_o_x_-_h_o_o_k (section 3.11 , page 25) _p_a_t_t_e_r_n _m_a_i_l_b_o_x + +o _m_e_s_s_a_g_e_-_h_o_o_k (section 3.19 , page 28) _p_a_t_t_e_r_n _c_o_m_m_a_n_d +o _m_i_m_e___l_o_o_k_u_p (section 5.6 , page 61) _m_i_m_e_t_y_p_e [ _m_i_m_e_t_y_p_e ... ] @@ -3464,10 +3465,10 @@ _6_._3 _C_o_n_f_i_g_u_r_a_t_i_o_n _v_a_r_i_a_b_l_e_s - _6_._3_._1 _a_b_o_r_t___n_o_s_u_b_j_e_c_t - The Mutt-ng E-Mail Client 66 + _6_._3_._1 _a_b_o_r_t___n_o_s_u_b_j_e_c_t + Type: quadoption Default: ask-yes @@ -3519,11 +3520,11 @@ %r address which alias expands to + The Mutt-ng E-Mail Client 67 + %t character which indicates if the alias is tagged for inclusion - The Mutt-ng E-Mail Client 67 - _6_._3_._5 _a_l_l_o_w___8_b_i_t Type: boolean @@ -3575,12 +3576,12 @@ If _s_e_t, Mutt-ng will prompt you for blind-carbon-copy (Bcc) recipients before editing an outgoing message. + The Mutt-ng E-Mail Client 68 + _6_._3_._1_0 _a_s_k_c_c Type: boolean - The Mutt-ng E-Mail Client 68 - Default: no If _s_e_t, Mutt-ng will prompt you for carbon-copy (Cc) recipients before editing @@ -3632,11 +3633,11 @@ %f filename + The Mutt-ng E-Mail Client 69 + %I MIME Content-Disposition: header field (I=inline, A=attachment) - The Mutt-ng E-Mail Client 69 - %m major MIME type @@ -3689,10 +3690,10 @@ Type: string - Default: 'On %d, %n wrote:' - The Mutt-ng E-Mail Client 70 + Default: 'On %d, %n wrote:' + This is the string that will precede a message which has been included in a reply. For a full listing of defined printf(3)-like sequences see the section on ``_$_i_n_d_e_x___f_o_r_m_a_t (section 6.3.109 , page 90)''. @@ -3745,11 +3746,10 @@ Default: ask-yes - Controls whether you will be asked to confirm bouncing messages. If set to _y_e_s - you don't get asked if you want to bounce a message. Setting this variable to - The Mutt-ng E-Mail Client 71 + Controls whether you will be asked to confirm bouncing messages. If set to _y_e_s + you don't get asked if you want to bounce a message. Setting this variable to _n_o is not generally useful, and thus not recommended, because you are unable to bounce messages. @@ -3801,12 +3801,12 @@ Character set your terminal uses to display and enter textual data. + The Mutt-ng E-Mail Client 72 + _6_._3_._2_5 _c_h_e_c_k___n_e_w Type: boolean - The Mutt-ng E-Mail Client 72 - Default: yes NNoottee:: this option only affects _m_a_i_l_d_i_r and _M_H style mailboxes. @@ -3858,10 +3858,10 @@ Default: '' - When defined, Mutt-ng will recode commands in rc files from this encoding. - The Mutt-ng E-Mail Client 73 + When defined, Mutt-ng will recode commands in rc files from this encoding. + _6_._3_._2_9 _c_o_n_f_i_r_m_a_p_p_e_n_d Type: boolean @@ -3914,10 +3914,10 @@ Type: boolean - Default: no - The Mutt-ng E-Mail Client 74 + Default: no + Setting this variable will cause Mutt-ng to always attempt to PGP encrypt out- going messages. This is probably only useful in connection to the _s_e_n_d_-_h_o_o_k command. It can be overridden by use of the _p_g_p_-_m_e_n_u, when encryption is not @@ -3936,7 +3936,7 @@ encryption/signing for messages. See also ``_$_c_r_y_p_t___a_u_t_o_e_n_c_r_y_p_t (section 6.3.34 , page 72)'', ``_$_c_r_y_p_t___r_e_p_l_y_e_n_c_r_y_p_t (section 6.3.38 , page 73)'', ``_$_c_r_y_p_t___a_u_t_o_s_i_g_n (section 6.3.36 , page 73)'', ``_$_c_r_y_p_t___r_e_p_l_y_s_i_g_n (section - 6.3.39 , page 73)'' and ``_$_s_m_i_m_e___i_s___d_e_f_a_u_l_t (section 6.3.276 , page 131)''. + 6.3.39 , page 74)'' and ``_$_s_m_i_m_e___i_s___d_e_f_a_u_l_t (section 6.3.276 , page 131)''. _6_._3_._3_6 _c_r_y_p_t___a_u_t_o_s_i_g_n @@ -3961,7 +3961,7 @@ encryption/signing for messages. See also ``_$_c_r_y_p_t___a_u_t_o_e_n_c_r_y_p_t (section 6.3.34 , page 72)'', ``_$_c_r_y_p_t___r_e_p_l_y_e_n_c_r_y_p_t (section 6.3.38 , page 73)'', ``_$_c_r_y_p_t___a_u_t_o_s_i_g_n (section 6.3.36 , page 73)'', ``_$_c_r_y_p_t___r_e_p_l_y_s_i_g_n (section - 6.3.39 , page 73)'' and ``_$_s_m_i_m_e___i_s___d_e_f_a_u_l_t (section 6.3.276 , page 131)''. + 6.3.39 , page 74)'' and ``_$_s_m_i_m_e___i_s___d_e_f_a_u_l_t (section 6.3.276 , page 131)''. _6_._3_._3_8 _c_r_y_p_t___r_e_p_l_y_e_n_c_r_y_p_t @@ -3970,10 +3970,11 @@ Default: yes If _s_e_t, automatically PGP or OpenSSL encrypt replies to messages which are - encrypted. (Crypto only) The Mutt-ng E-Mail Client 75 + encrypted. (Crypto only) + _6_._3_._3_9 _c_r_y_p_t___r_e_p_l_y_s_i_g_n Type: boolean @@ -3995,7 +3996,7 @@ encrypted. This makes sense in combination with ``_$_c_r_y_p_t___r_e_p_l_y_e_n_c_r_y_p_t (section 6.3.38 , page 73)'', because it allows you to sign all messages which are automatically encrypted. This works around the problem noted in - ``_$_c_r_y_p_t___r_e_p_l_y_s_i_g_n (section 6.3.39 , page 73)'', that Mutt-ng is not able to + ``_$_c_r_y_p_t___r_e_p_l_y_s_i_g_n (section 6.3.39 , page 74)'', that Mutt-ng is not able to find out whether an encrypted message is also signed. (Crypto only) _6_._3_._4_1 _c_r_y_p_t___t_i_m_e_s_t_a_m_p @@ -4026,10 +4027,10 @@ Type: quadoption - Default: yes - The Mutt-ng E-Mail Client 76 + Default: yes + If ``_y_e_s'', always attempt to verify PGP or S/MIME signatures. If ``_a_s_k'', ask whether or not to verify the signature. If ``_n_o'', never attempt to verify cryptographic signatures. (Crypto only) @@ -4082,11 +4083,10 @@ Default: yes - If this option is _s_e_t, Mutt-ng will untag messages when marking them for dele- - tion. This applies when you either explicitly delete a message, or when you - The Mutt-ng E-Mail Client 77 + If this option is _s_e_t, Mutt-ng will untag messages when marking them for dele- + tion. This applies when you either explicitly delete a message, or when you save it to another folder. _6_._3_._4_8 _d_i_g_e_s_t___c_o_l_l_a_p_s_e @@ -4140,10 +4140,10 @@ Type: string - Default: '' - The Mutt-ng E-Mail Client 78 + Default: '' + NNoottee:: you should not enable this unless you are using Sendmail 8.8.x or greater. @@ -4196,10 +4196,10 @@ _6_._3_._5_7 _e_n_v_e_l_o_p_e___f_r_o_m - Type: boolean - The Mutt-ng E-Mail Client 79 + Type: boolean + Default: no When _s_e_t, Mutt-ng will try to derive the message's _e_n_v_e_l_o_p_e sender from the @@ -4253,10 +4253,9 @@ Default: '' - This variable is a colon-separated list of character encoding schemes for text - The Mutt-ng E-Mail Client 80 + This variable is a colon-separated list of character encoding schemes for text file attatchments. If _u_n_s_e_t, _$_c_h_a_r_s_e_t (section 6.3.24 , page 70) value will be used instead. For example, the following configuration would work for Japanese text handling: @@ -4309,11 +4308,11 @@ %N N if folder has new mail, blank otherwise + The Mutt-ng E-Mail Client 81 + %s size in bytes - The Mutt-ng E-Mail Client 81 - %t * if the file is tagged, blank otherwise @@ -4366,11 +4365,10 @@ Default: no - This variable is similar to ``_$_s_a_v_e___n_a_m_e (section 6.3.240 , page 123)'', - except that Mutt-ng will store a copy of your outgoing message by the username - The Mutt-ng E-Mail Client 82 + This variable is similar to ``_$_s_a_v_e___n_a_m_e (section 6.3.240 , page 123)'', + except that Mutt-ng will store a copy of your outgoing message by the username of the address you are sending to even if that mailbox does not exist. Also see the ``_$_r_e_c_o_r_d (section 6.3.229 , page 120)'' variable. @@ -4423,12 +4421,11 @@ Default: no - When _s_e_t forwarded messages included in the main body of the message (when - ``_$_m_i_m_e___f_o_r_w_a_r_d (section 6.3.135 , page 97)'' is _u_n_s_e_t) will be quoted using - The Mutt-ng E-Mail Client 83 - ``_$_i_n_d_e_n_t___s_t_r_i_n_g (section 6.3.108 , page 89)''. + When _s_e_t forwarded messages included in the main body of the message (when + ``_$_m_i_m_e___f_o_r_w_a_r_d (section 6.3.135 , page 97)'' is _u_n_s_e_t) will be quoted using + ``_$_i_n_d_e_n_t___s_t_r_i_n_g (section 6.3.108 , page 90)''. _6_._3_._7_3 _f_r_o_m @@ -4438,7 +4435,7 @@ This variable contains a default from address. It can be overridden using my_hdr (including from send-hooks) and ``_$_r_e_v_e_r_s_e___n_a_m_e (section 6.3.235 , page - 121)''. This variable is ignored if ``_$_u_s_e___f_r_o_m (section 6.3.324 , page + 122)''. This variable is ignored if ``_$_u_s_e___f_r_o_m (section 6.3.324 , page 144)'' is unset. E.g. you can use send-hook Mutt-ng-devel@lists.berlios.de 'my_hdr From: Foo Bar @@ -4480,10 +4477,10 @@ Type: boolean - Default: no - The Mutt-ng E-Mail Client 84 + Default: no + When _s_e_t, this variable causes Mutt-ng to include the header of the message you are replying to into the edit buffer. The ``_$_w_e_e_d (section 6.3.330 , page 145)'' setting applies. @@ -4496,12 +4493,12 @@ Availability: Header Cache - The _$_h_e_a_d_e_r___c_a_c_h_e (section 6.3.77 , page 82) variable points to the header + The _$_h_e_a_d_e_r___c_a_c_h_e (section 6.3.77 , page 83) variable points to the header cache database. - If _$_h_e_a_d_e_r___c_a_c_h_e (section 6.3.77 , page 82) points to a directory it will con- + If _$_h_e_a_d_e_r___c_a_c_h_e (section 6.3.77 , page 83) points to a directory it will con- tain a header cache database per folder. If _$_h_e_a_d_e_r___c_a_c_h_e (section 6.3.77 , - page 82) points to a file that file will be a single global header cache. By + page 83) points to a file that file will be a single global header cache. By default it is _u_n_s_e_t so no header caching will be used. _6_._3_._7_8 _h_e_a_d_e_r___c_a_c_h_e___c_o_m_p_r_e_s_s @@ -4536,11 +4533,11 @@ Default: no When _s_e_t, Mutt-ng will skip the host name part of ``_$_h_o_s_t_n_a_m_e (section - 6.3.88 , page 85)'' variable when adding the domain part to addresses. This - variable does not affect the generation of Message-ID: header fields, and it The Mutt-ng E-Mail Client 85 + 6.3.88 , page 85)'' variable when adding the domain part to addresses. This + variable does not affect the generation of Message-ID: header fields, and it will not lead to the cut-off of first-level domains. _6_._3_._8_1 _h_i_d_e___l_i_m_i_t_e_d @@ -4588,16 +4585,16 @@ When _s_e_t, Mutt-ng will not show the presence of missing messages at the top of threads in the thread tree. Note that when _$_h_i_d_e___l_i_m_i_t_e_d (section 6.3.81 , - page 83) is _s_e_t, this option will have no effect. + page 84) is _s_e_t, this option will have no effect. _6_._3_._8_6 _h_i_s_t_o_r_y Type: number - Default: 10 - The Mutt-ng E-Mail Client 86 + Default: 10 + This variable controls the size (in number of strings remembered) of the string history buffer. The buffer is cleared each time the variable is changed. @@ -4650,11 +4647,11 @@ capability string, e.g. ``digest-md5'', ``gssapi'' or ``cram-md5''. This param- eter is case-insensitive. + The Mutt-ng E-Mail Client 87 + If this parameter is _u_n_s_e_t (the default) Mutt-ng will try all available meth- ods, in order from most-secure to least-secure. - The Mutt-ng E-Mail Client 87 - Example: set imap_authenticators='gssapi:cram-md5:login' NNoottee:: Mutt-ng will only fall back to other authentication methods if the previ- @@ -4707,11 +4704,10 @@ Availability: IMAP - You normally want to see your personal folders alongside your INBOX in the IMAP - browser. If you see something else, you may set this variable to the IMAP path - The Mutt-ng E-Mail Client 88 + You normally want to see your personal folders alongside your INBOX in the IMAP + browser. If you see something else, you may set this variable to the IMAP path to your folders. _6_._3_._9_5 _i_m_a_p___k_e_e_p_a_l_i_v_e @@ -4764,11 +4760,10 @@ Default: 300 - This variable configures how often (in seconds) Mutt-ng should look for new - mail in IMAP folders. This is split from the ``_m_a_i_l___c_h_e_c_k (section 6.3.114 , - The Mutt-ng E-Mail Client 89 + This variable configures how often (in seconds) Mutt-ng should look for new + mail in IMAP folders. This is split from the ``_m_a_i_l___c_h_e_c_k (section 6.3.114 , page 93)'' variable to generate less traffic and get more accurate information for local folders. @@ -4821,11 +4816,11 @@ Availability: IMAP + The Mutt-ng E-Mail Client 90 + Controls whether or not Mutt-ng will try to reconnect to IMAP server when the connection is lost. - The Mutt-ng E-Mail Client 90 - _6_._3_._1_0_3 _i_m_a_p___s_e_r_v_e_r_n_o_i_s_e Type: boolean @@ -4877,11 +4872,11 @@ Default: no + The Mutt-ng E-Mail Client 91 + Controls whether or not Mutt-ng includes only the first attachment of the mes- sage you are replying. - The Mutt-ng E-Mail Client 91 - _6_._3_._1_0_8 _i_n_d_e_n_t___s_t_r_i_n_g Type: string @@ -4932,11 +4927,11 @@ date and time of the message in the format specified by ``date_for- mat'' converted to the local time zone + The Mutt-ng E-Mail Client 92 + %e current message number in thread - The Mutt-ng E-Mail Client 92 - %E number of messages in current thread @@ -4989,11 +4984,10 @@ %t `to:' field (recipients) - %T - the appropriate character from the _$_t_o___c_h_a_r_s (section 6.3.317 , - The Mutt-ng E-Mail Client 93 + %T + the appropriate character from the _$_t_o___c_h_a_r_s (section 6.3.317 , page 142) string %u @@ -5046,10 +5040,10 @@ _6_._3_._1_1_0 _i_s_p_e_l_l - Type: path - The Mutt-ng E-Mail Client 94 + Type: path + Default: 'ispell' How to invoke ispell (GNU's spell-checking software). @@ -5102,10 +5096,11 @@ Default: '' This variable specifies which files to consult when attempting to display MIME - bodies not directly supported by Mutt-ng. The Mutt-ng E-Mail Client 95 + bodies not directly supported by Mutt-ng. + _6_._3_._1_1_6 _m_a_i_l_c_a_p___s_a_n_i_t_i_z_e Type: boolean @@ -5157,12 +5152,12 @@ up with an 'O' next to them in the ``index'' menu, indicating that they are old. + The Mutt-ng E-Mail Client 96 + _6_._3_._1_2_0 _m_a_r_k_e_r_s Type: boolean - The Mutt-ng E-Mail Client 96 - Default: yes Controls the display of wrapped lines in the internal pager. If set, a ``+'' @@ -5188,7 +5183,7 @@ When _s_e_t, the maximum line length for displaying ``format = flowed'' messages is limited to this length. A value of 0 (which is also the default) means that the maximum line length is determined by the terminal width and _$_w_r_a_p_m_a_r_g_i_n - (section 6.3.332 , page 145). + (section 6.3.332 , page 146). _6_._3_._1_2_3 _m_b_o_x @@ -5197,7 +5192,7 @@ Default: '~/mbox' This specifies the folder into which read mail in your ``_$_s_p_o_o_l_f_i_l_e (section - 6.3.294 , page 135)'' folder will be appended. + 6.3.294 , page 136)'' folder will be appended. _6_._3_._1_2_4 _m_b_o_x___t_y_p_e @@ -5214,12 +5209,12 @@ Default: 0 + The Mutt-ng E-Mail Client 97 + This variable controls the number of lines of context that are given when scrolling through menus. (Similar to ``_$_p_a_g_e_r___c_o_n_t_e_x_t (section 6.3.166 , page 106)''.) - The Mutt-ng E-Mail Client 97 - _6_._3_._1_2_6 _m_e_n_u___m_o_v_e___o_f_f Type: boolean @@ -5270,11 +5265,11 @@ Default: no + The Mutt-ng E-Mail Client 98 + If _u_n_s_e_t, Mutt-ng will remove your address (see the ``alternates'' command) from the list of recipients when replying to a message. - The Mutt-ng E-Mail Client 98 - _6_._3_._1_3_1 _m_h___p_u_r_g_e Type: boolean @@ -5325,12 +5320,12 @@ Also see ``_$_f_o_r_w_a_r_d___d_e_c_o_d_e (section 6.3.68 , page 81)'' and ``_$_m_i_m_e___f_o_r_- _w_a_r_d___d_e_c_o_d_e (section 6.3.136 , page 97)''. + The Mutt-ng E-Mail Client 99 + _6_._3_._1_3_6 _m_i_m_e___f_o_r_w_a_r_d___d_e_c_o_d_e Type: boolean - The Mutt-ng E-Mail Client 99 - Default: no Controls the decoding of complex MIME messages into text/plain when forwarding @@ -5382,12 +5377,12 @@ used with various sets of parameters to gather the list of known remailers, and to finally send a message through the mixmaster chain. + The Mutt-ng E-Mail Client 100 + _6_._3_._1_4_0 _m_o_v_e Type: quadoption - The Mutt-ng E-Mail Client 100 - Default: ask-no Controls whether or not Mutt-ng will move read messages from your spool mailbox @@ -5439,11 +5434,11 @@ %T the current UNIX timestamp (decimal) + The Mutt-ng E-Mail Client 101 + %X the current UNIX timestamp (hexadecimal) - The Mutt-ng E-Mail Client 101 - %Y the current year (Y2K compliant) @@ -5496,11 +5491,11 @@ ers. If _u_n_s_e_t, headers will not be saved at all and will be reloaded each time when you enter a newsgroup. + The Mutt-ng E-Mail Client 102 + As for the header caching in connection with IMAP and/or Maildir, this drasti- cally increases speed and lowers traffic. - The Mutt-ng E-Mail Client 102 - _6_._3_._1_4_6 _n_n_t_p___c_a_t_c_h_u_p Type: quadoption @@ -6251,7 +6246,7 @@ of tagged messages Mutt-ng will concatenate the messages and will pipe them as a single folder. When _s_e_t, Mutt-ng will pipe the messages one by one. In both cases the messages are piped in the current sorted order, and the ``_$_p_i_p_e___s_e_p - (section 6.3.200 , page 113)'' separator is added after each message. + (section 6.3.200 , page 114)'' separator is added after each message. _6_._3_._2_0_2 _p_o_p___a_u_t_h___t_r_y___a_l_l @@ -6395,7 +6390,7 @@ The Mutt-ng E-Mail Client 118 Controls whether or not messages are saved in the ``_$_p_o_s_t_p_o_n_e_d (section - 6.3.213 , page 116)'' mailbox when you elect not to send immediately. + 6.3.213 , page 117)'' mailbox when you elect not to send immediately. _6_._3_._2_1_3 _p_o_s_t_p_o_n_e_d @@ -6518,7 +6513,7 @@ Default: yes Controls whether or not empty lines will be quoted using ``_i_n_d_e_n_t___s_t_r_i_n_g (sec- - tion 6.3.108 , page 89)''. + tion 6.3.108 , page 90)''. _6_._3_._2_2_3 _q_u_o_t_e___q_u_o_t_e_d @@ -6528,7 +6523,7 @@ Controls how quoted lines will be quoted. If _s_e_t, one quote character will be added to the end of existing prefix. Otherwise, quoted lines will be prepended - by ``_i_n_d_e_n_t___s_t_r_i_n_g (section 6.3.108 , page 89)''. + by ``_i_n_d_e_n_t___s_t_r_i_n_g (section 6.3.108 , page 90)''. _6_._3_._2_2_4 _q_u_o_t_e___r_e_g_e_x_p @@ -6581,7 +6576,7 @@ By default, this is the GECOS field from /etc/passwd. _N_o_t_e_: This variable will _n_o_t be used when the user has set a real name in the - _$_f_r_o_m (section 6.3.73 , page 81) variable. + _$_f_r_o_m (section 6.3.73 , page 82) variable. _6_._3_._2_2_8 _r_e_c_a_l_l @@ -6590,7 +6585,7 @@ Default: ask-yes Controls whether or not Mutt-ng recalls postponed messages when composing a new - message. Also see ``_$_p_o_s_t_p_o_n_e_d (section 6.3.213 , page 116)''. + message. Also see ``_$_p_o_s_t_p_o_n_e_d (section 6.3.213 , page 117)''. Setting this variable to _y_e_s is not generally useful, and thus not recommended. @@ -6701,10 +6696,10 @@ Default: yes This variable fine-tunes the behaviour of the _r_e_v_e_r_s_e___n_a_m_e (section 6.3.235 , - page 121) feature. When it is _s_e_t, Mutt-ng will use the address from incoming + page 122) feature. When it is _s_e_t, Mutt-ng will use the address from incoming messages as-is, possibly including eventual real names. When it is _u_n_s_e_t, Mutt-ng will override any such real names with the setting of the _r_e_a_l_n_a_m_e - (section 6.3.227 , page 119) variable. + (section 6.3.227 , page 120) variable. _6_._3_._2_3_7 _r_f_c_2_0_4_7___p_a_r_a_m_e_t_e_r_s @@ -6748,7 +6743,7 @@ Default: yes When _u_n_s_e_t, mailboxes which contain no saved messages will be removed when - closed (the exception is ``_$_s_p_o_o_l_f_i_l_e (section 6.3.294 , page 135)'' which is + closed (the exception is ``_$_s_p_o_o_l_f_i_l_e (section 6.3.294 , page 136)'' which is never removed). If _s_e_t, mailboxes are never removed. NNoottee:: This only applies to mbox and MMDF folders, Mutt-ng does not delete MH @@ -7124,9 +7119,9 @@ %C CA location: Depending on whether _$_s_m_i_m_e___c_a___l_o_c_a_t_i_o_n (section - 6.3.265 , page 128) points to a directory or file, this expands to - '-CApath _$_s_m_i_m_e___c_a___l_o_c_a_t_i_o_n (section 6.3.265 , page 128)' or - '-CAfile _$_s_m_i_m_e___c_a___l_o_c_a_t_i_o_n (section 6.3.265 , page 128)'. + 6.3.265 , page 129) points to a directory or file, this expands to + '-CApath _$_s_m_i_m_e___c_a___l_o_c_a_t_i_o_n (section 6.3.265 , page 129)' or + '-CAfile _$_s_m_i_m_e___c_a___l_o_c_a_t_i_o_n (section 6.3.265 , page 129)'. The Mutt-ng E-Mail Client 131 @@ -7396,7 +7391,7 @@ When sorting by threads, this variable controls how threads are sorted in rela- tion to other threads, and how the branches of the thread trees are sorted. - This can be set to any value that ``_$_s_o_r_t (section 6.3.288 , page 133)'' can, + This can be set to any value that ``_$_s_o_r_t (section 6.3.288 , page 134)'' can, except threads (in that case, Mutt-ng will just use date-sent). You can also specify the ``last-'' prefix in addition to ``reverse-'' prefix, but last- must come after reverse-. The last- prefix causes messages to be sorted against its @@ -7410,7 +7405,7 @@ first, if you have set sort=reverse-threads.) - NNoottee:: For reversed ``_$_s_o_r_t (section 6.3.288 , page 133)'' order _$_s_o_r_t___a_u_x + NNoottee:: For reversed ``_$_s_o_r_t (section 6.3.288 , page 134)'' order _$_s_o_r_t___a_u_x (section 6.3.290 , page 134) is reversed again (which is not the right thing to do, but kept to not break any existing configuration setting). @@ -7622,7 +7617,7 @@ to _$_s_t_a_t_u_s___c_h_a_r_s (section 6.3.301 , page 137) %s - current sorting mode (_$_s_o_r_t (section 6.3.288 , page 133)) + current sorting mode (_$_s_o_r_t (section 6.3.288 , page 134)) %S current aux sorting method (_$_s_o_r_t___a_u_x (section 6.3.290 , page @@ -7732,7 +7727,7 @@ Default: no If _s_e_t, threading will only make use of the ``In-Reply-To:'' and ``Refer- - ences:'' header fields when you ``_$_s_o_r_t (section 6.3.288 , page 133)'' by mes- + ences:'' header fields when you ``_$_s_o_r_t (section 6.3.288 , page 134)'' by mes- sage threads. By default, messages with the same subject are grouped together in ``pseudo threads.'' This may not always be desirable, such as in a personal mailbox where you might have several unrelated messages with the subject ``hi'' @@ -7757,7 +7752,7 @@ Default: '\([Ww][Aa][RrSs]: .*\)[ ]*$' - When non-empty and _$_s_t_r_i_p___w_a_s (section 6.3.307 , page 140) is _s_e_t, mutt-ng + When non-empty and _$_s_t_r_i_p___w_a_s (section 6.3.307 , page 141) is _s_e_t, mutt-ng will remove this trailing part of the ``Subject'' line when replying if it won't be empty afterwards. @@ -7791,7 +7786,7 @@ like ordinary text. To actually make use of this format's features, you'll need support in your editor. - Note that _$_i_n_d_e_n_t___s_t_r_i_n_g (section 6.3.108 , page 89) is ignored when this + Note that _$_i_n_d_e_n_t___s_t_r_i_n_g (section 6.3.108 , page 90) is ignored when this option is set. _6_._3_._3_1_2 _t_h_o_r_o_u_g_h___s_e_a_r_c_h @@ -8064,7 +8059,7 @@ Default: 'M%?n?AIL&ail?' Controls the format of the X11 icon title, as long as _$_x_t_e_r_m___s_e_t___t_i_t_l_e_s (sec- - tion 6.3.337 , page 146) is _s_e_t. This string is identical in formatting to the + tion 6.3.337 , page 147) is _s_e_t. This string is identical in formatting to the one used by ``_$_s_t_a_t_u_s___f_o_r_m_a_t (section 6.3.302 , page 137)''. _6_._3_._3_3_6 _x_t_e_r_m___l_e_a_v_e @@ -8073,7 +8068,7 @@ Default: '' - If _$_x_t_e_r_m___s_e_t___t_i_t_l_e_s (section 6.3.337 , page 146) is _s_e_t, this string will be + If _$_x_t_e_r_m___s_e_t___t_i_t_l_e_s (section 6.3.337 , page 147) is _s_e_t, this string will be used to set the title when leaving mutt-ng. For terminal-based programs, there's no easy and portable way to read the current title so mutt-ng cannot read it upon startup and restore it when exiting. @@ -8102,7 +8097,7 @@ Default: 'Mutt-ng with %?m?%m messages&no messages?%?n? [%n New]?' Controls the format of the title bar of the xterm provided that - _$_x_t_e_r_m___s_e_t___t_i_t_l_e_s (section 6.3.337 , page 146) has been _s_e_t. This string is + _$_x_t_e_r_m___s_e_t___t_i_t_l_e_s (section 6.3.337 , page 147) has been _s_e_t. This string is identical in formatting to the one used by ``_$_s_t_a_t_u_s___f_o_r_m_a_t (section 6.3.302 , page 137)''. @@ -8550,12 +8545,18 @@ Andreas Kneib + Carsten Schoelzki + + Elimar Riesebieter + _7_._2 _A_b_o_u_t _t_h_i_s _d_o_c_u_m_e_n_t + The Mutt-ng E-Mail Client 159 + This document was written in SGML, and then rendered using the sgml-tools pack- age. - The Mutt-ng E-Mail Client 159 + The Mutt-ng E-Mail Client 160 CONTENTS diff --git a/hash.c b/hash.c index 77fc7e8..f042589 100644 --- a/hash.c +++ b/hash.c @@ -126,24 +126,23 @@ void *hash_find_hash (const HASH * table, int hash, const char *key) return NULL; } -void hash_delete_hash (HASH * table, int hash, const char *key, - const void *data, void (*destroy) (void *)) +void hash_delete_hash (HASH * table, int hash, const char *key, const void *data, + void (*destroy) (void *)) { struct hash_elem *ptr = table->table[hash]; struct hash_elem **last = &table->table[hash]; - for (; ptr; last = &ptr->next, ptr = ptr->next) { - /* if `data' is given, look for a matching ->data member. this is - * required for the case where we have multiple entries with the same - * key - */ - if ((data == ptr->data) || (!data && mutt_strcmp (ptr->key, key) == 0)) { + while (ptr) { + if ((data == ptr->data || !data) && mutt_strcmp (ptr->key, key) == 0) { *last = ptr->next; if (destroy) destroy (ptr->data); FREE (&ptr); - table->curnelem--; - return; + + ptr = *last; + } else { + last = &ptr->next; + ptr = ptr->next; } } } diff --git a/imap/message.c b/imap/message.c index 0f2e13a..4291713 100644 --- a/imap/message.c +++ b/imap/message.c @@ -78,10 +78,6 @@ int imap_read_headers (IMAP_DATA * idata, int msgbegin, int msgend) ctx = idata->ctx; -#if USE_HCACHE - hc = mutt_hcache_open (HeaderCache, ctx->path); -#endif /* USE_HCACHE */ - if (mutt_bit_isset (idata->capabilities, IMAP4REV1)) { snprintf (hdrreq, sizeof (hdrreq), "BODY.PEEK[HEADER.FIELDS (%s%s%s)]", want_headers, ImapHeaders ? " " : "", @@ -96,9 +92,6 @@ int imap_read_headers (IMAP_DATA * idata, int msgbegin, int msgend) mutt_error _("Unable to fetch headers from this IMAP server version."); mutt_sleep (2); /* pause a moment to let the user see the error */ -#if USE_HCACHE - mutt_hcache_close (hc); -#endif /* USE_HCACHE */ return -1; } @@ -108,9 +101,6 @@ int imap_read_headers (IMAP_DATA * idata, int msgbegin, int msgend) if (!(fp = safe_fopen (tempfile, "w+"))) { mutt_error (_("Could not create temporary file %s"), tempfile); mutt_sleep (2); -#if USE_HCACHE - mutt_hcache_close (hc); -#endif /* USE_HCACHE */ return -1; } unlink (tempfile); @@ -124,6 +114,8 @@ int imap_read_headers (IMAP_DATA * idata, int msgbegin, int msgend) idata->newMailCount = 0; #if USE_HCACHE + hc = mutt_hcache_open (HeaderCache, ctx->path); + snprintf (buf, sizeof (buf), "FETCH %d:%d (UID FLAGS)", msgbegin + 1, msgend + 1); fetchlast = msgend + 1; @@ -158,11 +150,10 @@ int imap_read_headers (IMAP_DATA * idata, int msgbegin, int msgend) (unsigned long *) mutt_hcache_fetch (hc, uid_buf, &imap_hcache_keylen); if (uid_validity != NULL && *uid_validity == idata->uid_validity) { - ctx->hdrs[msgno] = - mutt_hcache_restore ((unsigned char *) uid_validity, 0); + ctx->hdrs[msgno] = mutt_hcache_restore((unsigned char *) uid_validity, 0); ctx->hdrs[msgno]->index = h.sid - 1; if (h.sid != ctx->msgcount + 1) - debug_print (1, ("msgcount and sequence ID are inconsistent!\n")); + debug_print (1, ("imap_read_headers: msgcount and sequence ID are inconsistent!")); /* messages which have not been expunged are ACTIVE (borrowed from mh * folders) */ ctx->hdrs[msgno]->active = 1; @@ -177,6 +168,7 @@ int imap_read_headers (IMAP_DATA * idata, int msgbegin, int msgend) ctx->msgcount++; } + rewind (fp); FREE (&uid_validity); @@ -320,6 +312,7 @@ int imap_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno) { IMAP_DATA *idata; HEADER *h; + ENVELOPE* newenv; char buf[LONG_STRING]; char path[_POSIX_PATH_MAX]; char *pc; @@ -446,21 +439,8 @@ int imap_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno) * picked up in mutt_read_rfc822_header, we mark the message (and context * changed). Another possiblity: ignore Status on IMAP?*/ read = h->read; - /* I hate do this here, since it's so low-level, but I'm not sure where - * I can abstract it. Problem: the id and subj hashes lose their keys when - * mutt_free_envelope gets called, but keep their spots in the hash. This - * confuses threading. Alternatively we could try to merge the new - * envelope into the old one. Also messy and lowlevel. */ - if (ctx->id_hash && h->env->message_id) - hash_delete (ctx->id_hash, h->env->message_id, h, NULL); - if (ctx->subj_hash && h->env->real_subj) - hash_delete (ctx->subj_hash, h->env->real_subj, h, NULL); - mutt_free_envelope (&h->env); - h->env = mutt_read_rfc822_header (msg->fp, h, 0, 0); - if (ctx->id_hash && h->env->message_id) - hash_insert (ctx->id_hash, h->env->message_id, h, 0); - if (ctx->subj_hash && h->env->real_subj) - hash_insert (ctx->subj_hash, h->env->real_subj, h, 1); + newenv = mutt_read_rfc822_header (msg->fp, h, 0, 0); + mutt_merge_envelopes(h->env, &newenv); /* see above. We want the new status in h->read, so we unset it manually * and let mutt_set_flag set it correctly, updating context. */ diff --git a/init.c b/init.c index 7ffb37c..079ecc7 100644 --- a/init.c +++ b/init.c @@ -32,6 +32,7 @@ #include "lib/intl.h" #include "lib/str.h" #include "lib/rx.h" +#include "lib/list.h" #include "lib/debug.h" #include @@ -2325,3 +2326,50 @@ int mutt_get_hook_type (const char *name) return c->data; return 0; } + +static int opt_cmp (const void* a, const void* b) { + return (mutt_strcmp ((*(struct option_t**) a)->option, + (*(struct option_t**) b)->option)); +} + +/* dump out the value of all the variables we have */ +int mutt_dump_variables (void) { + int i; + + char errbuff[STRING]; + char command[STRING]; + list2_t* tmp = NULL; + + BUFFER err, token; + + memset (&err, 0, sizeof (err)); + memset (&token, 0, sizeof (token)); + + err.data = errbuff; + err.dsize = sizeof (errbuff); + + /* get all non-synonyms into list... */ + for (i = 0; MuttVars[i].option; i++) { + if (MuttVars[i].type == DT_SYN) + continue; + list_push_back (&tmp, &MuttVars[i]); + } + if (!list_empty(tmp)) { + /* ...and dump list sorted */ + qsort (tmp->data, tmp->length, sizeof (void*), opt_cmp); + for (i = 0; i < tmp->length; i++) { + snprintf (command, sizeof (command), "set ?%s\n", + ((struct option_t*) tmp->data[i])->option); + if (mutt_parse_rc_line (command, &token, &err) == -1) { + fprintf (stderr, "%s\n", err.data); + FREE (&token.data); + list_del (&tmp, NULL); + return 1; + } + printf("%s\n", err.data); + } + } + FREE (&token.data); + list_del (&tmp, NULL); + return 0; +} diff --git a/init.h b/init.h index 5886c78..b839d0b 100644 --- a/init.h +++ b/init.h @@ -1668,7 +1668,7 @@ struct option_t MuttVars[] = { ** ** .pp ** This variable controls how many news articles to cache per newsgroup - ** (if caching is enabled, see $$news_cache_dir) and how many news articles + ** (if caching is enabled, see $$nntp_cache_dir) and how many news articles ** to show in the ``index'' menu. ** .pp ** If there're more articles than defined with $$nntp_context, all older ones diff --git a/main.c b/main.c index 2c4a49d..cee557d 100644 --- a/main.c +++ b/main.c @@ -110,6 +110,7 @@ static void mutt_usage (void) ("usage: muttng [ -nRyzZ ] [ -e ] [ -F ] [ -m ] [ -f ]\n\ muttng [ -nR ] [ -e ] [ -F ] -Q [ -Q ] [...]\n\ muttng [ -nR ] [ -e ] [ -F ] -A [ -A ] [...]\n\ + muttng [ -nR ] [ -e ] [ -F ] -D\n\ muttng [ -nx ] [ -e ] [ -a ] [ -F ] [ -H ] [ -i ] [ -s ] [ -b ] [ -c ] [ ... ]\n\ muttng [ -n ] [ -e ] [ -F ] -p\n\ muttng -v[v]\n\ @@ -119,6 +120,7 @@ options:\n\ -a \tattach a file to the message\n\ -b

\tspecify a blind carbon-copy (BCC) address\n\ -c
\tspecify a carbon-copy (CC) address\n\ + -D\t\tprint the value of all variables to stdout\n\ -e \tspecify a command to be executed after initialization\n\ -f \tspecify which mailbox to read\n\ -F \tspecify an alternate muttrc file\n\ @@ -502,6 +504,7 @@ int main (int argc, char **argv) int version = 0; int i; int explicit_folder = 0; + int dump_variables = 0; extern char *optarg; extern int optind; @@ -535,10 +538,10 @@ int main (int argc, char **argv) #ifdef USE_NNTP while ((i = getopt (argc, argv, - "A:a:b:F:f:c:d:e:g:GH:s:i:hm:npQ:RvxyzZ")) != EOF) + "A:a:b:F:f:c:Dd:e:g:GH:s:i:hm:npQ:RvxyzZ")) != EOF) #else while ((i = - getopt (argc, argv, "A:a:b:F:f:c:d:e:H:s:i:hm:npQ:RvxyzZ")) != EOF) + getopt (argc, argv, "A:a:b:F:f:c:Dd:e:H:s:i:hm:npQ:RvxyzZ")) != EOF) #endif switch (i) { case 'A': @@ -583,6 +586,10 @@ int main (int argc, char **argv) #endif break; + case 'D': + dump_variables = 1; + break; + case 'e': commands = mutt_add_list (commands, optarg); break; @@ -672,7 +679,7 @@ int main (int argc, char **argv) } /* Check for a batch send. */ - if (!isatty (0) || queries || alias_queries) { + if (!isatty (0) || queries || alias_queries || dump_variables) { set_option (OPTNOCURSES); sendflags = SENDBATCH; } @@ -692,6 +699,8 @@ int main (int argc, char **argv) if (queries) return mutt_query_variables (queries); + if (dump_variables) + return (mutt_dump_variables ()); if (alias_queries) { int rv = 0; diff --git a/muttlib.c b/muttlib.c index 234efd2..9a781dd 100644 --- a/muttlib.c +++ b/muttlib.c @@ -637,6 +637,46 @@ void mutt_free_envelope (ENVELOPE ** p) FREE (p); } +/* move all the headers from extra not present in base into base */ +void mutt_merge_envelopes(ENVELOPE* base, ENVELOPE** extra) +{ + /* copies each existing element if necessary, and sets the element + * to NULL in the source so that mutt_free_envelope doesn't leave us + * with dangling pointers. */ +#define MOVE_ELEM(h) if (!base->h) { base->h = (*extra)->h; (*extra)->h = NULL; } + MOVE_ELEM(return_path); + MOVE_ELEM(from); + MOVE_ELEM(to); + MOVE_ELEM(cc); + MOVE_ELEM(bcc); + MOVE_ELEM(sender); + MOVE_ELEM(reply_to); + MOVE_ELEM(mail_followup_to); + MOVE_ELEM(list_post); + MOVE_ELEM(message_id); + MOVE_ELEM(supersedes); + MOVE_ELEM(date); + MOVE_ELEM(x_label); + MOVE_ELEM(references); + MOVE_ELEM(in_reply_to); + /* real_subj is subordinate to subject */ + if (!base->subject) { + base->subject = (*extra)->subject; + base->real_subj = (*extra)->real_subj; + (*extra)->subject = NULL; + (*extra)->real_subj = NULL; + } + /* spam and user headers should never be hashed, and the new envelope may + * have better values. Use new versions regardless. */ + mutt_buffer_free (&base->spam); + mutt_free_list (&base->userhdrs); + MOVE_ELEM(spam); + MOVE_ELEM(userhdrs); +#undef MOVE_ELEM + + mutt_free_envelope(extra); +} + void _mutt_mktemp (char *s, const char *src, int line) { diff --git a/protos.h b/protos.h index f1d38b2..e06e44f 100644 --- a/protos.h +++ b/protos.h @@ -204,6 +204,7 @@ void mutt_make_help (char *, size_t, char *, int, int); void mutt_make_misc_reply_headers (ENVELOPE * env, CONTEXT * ctx, HEADER * cur, ENVELOPE * curenv); void mutt_make_post_indent (CONTEXT * ctx, HEADER * cur, FILE * out); +void mutt_merge_envelopes (ENVELOPE* base, ENVELOPE** extra); void mutt_message_to_7bit (BODY *, FILE *); #define mutt_mktemp(a) _mutt_mktemp (a, __FILE__, __LINE__) @@ -276,6 +277,7 @@ int mutt_compose_attachment (BODY * a); int mutt_copy_body (FILE *, BODY **, BODY *); int mutt_decode_save_attachment (FILE *, BODY *, char *, int, int); int mutt_display_message (HEADER * h); +int mutt_dump_variables (void); int mutt_edit_attachment (BODY *); int mutt_edit_message (CONTEXT *, HEADER *); int mutt_fetch_recips (ENVELOPE * out, ENVELOPE * in, int flags); diff --git a/thread.c b/thread.c index e019533..0b20076 100644 --- a/thread.c +++ b/thread.c @@ -843,7 +843,7 @@ void mutt_sort_threads (CONTEXT * ctx, int init) if (new->duplicate_thread) new = new->parent; if (is_descendant (new, thread)) /* no loops! */ - break; + continue; } if (thread->parent)