if (flags & CH_UPDATE)
{
if ((flags & CH_NOSTATUS) == 0)
-#ifdef IMAP_EDIT_THREADS
-#define NEW_ENV new_env
-#else
-#define NEW_ENV env
-#endif
{
- if (h->irt_changed && h->NEW_ENV->in_reply_to)
+ if (h->irt_changed && h->new_env->in_reply_to)
{
- LIST *listp = h->NEW_ENV->in_reply_to;
+ LIST *listp = h->new_env->in_reply_to;
if (fputs ("In-Reply-To: ", out) == EOF)
return (-1);
return (-1);
}
- if (h->refs_changed && h->NEW_ENV->references)
+ if (h->refs_changed && h->new_env->references)
{
- LIST *listp = h->NEW_ENV->references, *refs = NULL, *t;
+ LIST *listp = h->new_env->references, *refs = NULL, *t;
if (fputs ("References: ", out) == EOF)
return (-1);
if (fputc ('\n', out) == EOF)
return (-1);
}
-#undef NEW_ENV
if (h->old || h->read)
{
if ((Sort & SORT_MASK) != SORT_THREADS)
mutt_error _("Threading is not enabled.");
-
-#if defined (USE_IMAP) && ! defined (IMAP_EDIT_THREADS)
- else if (Context->magic == M_IMAP)
- mutt_error _("Compile Mutt with --enable-imap-edit-threads for break-thread support");
-#endif
else
{
{
if ((Sort & SORT_MASK) != SORT_THREADS)
mutt_error _("Threading is not enabled.");
-
-#if defined (USE_IMAP) && ! defined (IMAP_EDIT_THREADS)
- else if (Context->magic == M_IMAP)
- mutt_error _("Compile Mutt with --enable-imap-edit-threads for link-threads support");
-#endif
-
else if (!CURHDR->env->message_id)
mutt_error _("No Message-ID: header available to link thread");
else if (!tag && (!Context->last_tag || !Context->last_tag->tagged))
correspondents. This allows to clean your mailboxes formats) from these
annoyances which make it hard to follow a discussion.
-If you want to use these functions with IMAP, you need to compile Mutt
-with the <em/--enable-imap-edit-threads/ configure flag.
-
<sect2>Linking threads
<p>
char *tree; /* character string to print thread tree */
struct thread *thread;
-#ifdef IMAP_EDIT_THREADS
ENVELOPE *new_env; /* envelope information for rethreading */
-#endif
#ifdef MIXMASTER
LIST *chain;
/* clearing the References: header from obsolete Message-Id(s) */
mutt_free_list (&ref->next);
-#ifdef IMAP_EDIT_THREADS
if (h->new_env)
mutt_free_list (&h->new_env->references);
else
h->new_env = mutt_new_envelope ();
h->new_env->references = mutt_copy_list (h->env->references);
-#endif
h->refs_changed = h->changed = 1;
}
mutt_free_list (&hdr->env->references);
hdr->irt_changed = hdr->refs_changed = hdr->changed = 1;
-#ifdef IMAP_EDIT_THREADS
if (hdr->new_env)
{
mutt_free_list (&hdr->new_env->in_reply_to);
}
else
hdr->new_env = mutt_new_envelope ();
-#endif
clean_references (hdr->thread, hdr->thread->child);
}
child->env->in_reply_to = mutt_new_list ();
child->env->in_reply_to->data = safe_strdup (parent->env->message_id);
-#ifdef IMAP_EDIT_THREADS
child->new_env->in_reply_to = mutt_new_list ();
child->new_env->in_reply_to->data = safe_strdup (parent->env->message_id);
-#endif
mutt_set_flag (ctx, child, M_TAG, 0);