On Tue, Jun 01, 1999 at 04:16:37PM -0400, David Shaw wrote:
> On Tue, Jun 01, 1999 at 04:07:44PM -0400, Chris L. Mason wrote:
> > This may seem like a stupid question, but is it possible to "move" messages
> > from one folder to another? I know I can copy messages, or a group of
> > tagged messages, but then I have to delete them in the current folder, and
> > they show up as new (with the 'N' flag) in the folder I moved them to.
> >
> > (Note that I'm using IMAP with multiple remote folders, but this shouldn't
> > be specific to IMAP.)
> >
> > If this is not currently implemented, perhaps this would be a good function
> > to assign to 'M' by default to be consistent with the 'C' for copy? (I
> > don't imagine middle-page would be used very often, but I could be wrong!)
>
> Use save-message (bound to 's' by default).
>
> The messages showing up as new sounds like an IMAPism - mutt doesn't do
> that unless the message is marked as new in the folder you are moving
> from.
>
Well, I finally got bugged enough by this to look through the source. The
problem seems to be that the IMAP \Seen flag is not being specified in the
APPEND command used to upload messages to the server. I made the following
simple change to avoid having "saved" messages show up with an 'N' flag:
*** mutt-0.95.6/imap.c Tue May 18 15:22:42 1999
--- mutt-0.95.6.new/imap.c Wed Jun 23 14:05:55 1999
***************
*** 1763,1769 ****
imap_quote_string (mbox, sizeof (mbox), mailbox);
imap_make_sequence (seq, sizeof (seq));
! snprintf (buf, sizeof (buf), "%s APPEND %s {%d}\r\n", seq, mbox, len);
mutt_socket_write (CTX_DATA->conn, buf);
--- 1763,1770 ----
imap_quote_string (mbox, sizeof (mbox), mailbox);
imap_make_sequence (seq, sizeof (seq));
! snprintf (buf, sizeof (buf),
! "%s APPEND %s (\\Seen) {%d}\r\n", seq, mbox, len);
mutt_socket_write (CTX_DATA->conn, buf);
I am assuming here someone is doing a 's' after reading the message. If
someone does an 's' from the index while a message is still marked as new,
this is probably the wrong behaviour. I guess the "right thing" would be
to check the header of the message and only add the \Seen flag if the
message is marked as read.
Also, this fixes messages being marked as new, but mutt still pops up with
"new messages in xxx". I'm not sure how to fix this.
Chris