mutt/2225: wish: Use $pop_delete while viewing a POP box
>Number: 2225
>Notify-List:
>Category: mutt
>Synopsis: wish: Use $pop_delete while viewing a POP box
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: mutt-dev
>State: open
>Keywords:
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed May 10 11:05:04 +0200 2006
>Originator: TAKAHASHI Tamotsu
>Release: 1.5.11 and current
>Organization:
http://www.momonga-linux.org/
>Environment:
OpenBSD 3.9
POP server: InterMail (of plala.or.jp)
>Description:
Mutt deletes POP messages without asking me when it timeouts.
If mutt's POP feature has a bug (and it really does - but it's
another PR), I lose messages without realizing that!
Mutt already has $pop_delete. Please use it!
>How-To-Repeat:
0. Press 'c'.
1. Input some POP mailbox name.
2. (A bug occurs)
3. (POP connection timeouts)
4. The mailbox loses messages.
>Fix:
Unknown
But I guess something like this will do:
Index: pop.c
===================================================================
RCS file: /home/roessler/cvs/mutt/pop.c,v
retrieving revision 3.9
diff -p -u -b -r3.9 pop.c
--- pop.c 21 Oct 2005 04:35:37 -0000 3.9
+++ pop.c 10 May 2006 08:35:47 -0000
@@ -465,6 +465,11 @@ int pop_sync_mailbox (CONTEXT *ctx, int
if (pop_reconnect (ctx) < 0)
return -1;
+ /* Ask me even if POPDELETE == M_NO */
+ if ((quadoption (OPT_POPDELETE) == M_YES) ||
+ (mutt_yesorno (_("Delete messages from server?"),
+ (quadoption (OPT_POPDELETE) == M_ASKYES)) == M_YES))
+ {
mutt_message (_("Marking %d messages deleted..."), ctx->deleted);
for (i = 0, ret = 0; ret == 0 && i < ctx->msgcount; i++)
@@ -475,6 +480,9 @@ int pop_sync_mailbox (CONTEXT *ctx, int
ret = pop_query (pop_data, buf, sizeof (buf));
}
}
+ }
+ else
+ ret = 0;
if (ret == 0)
{
>Add-To-Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="patch-1.5.11cvs.tamo.popdelete.1"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="pat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