Bug? Pressing $ when new mail arrives
Scenario: When I press $ to purge the deleted messages in my mailbox, and it asks me: Purge 8 deleted messages? ([yes]/no): and I answer yes, if new mail has arrived that mutt didn't see yet, it will show the new mail and *abort* the purge operation. Is this a bug/is there a workaround for this?
Re: Bug? Pressing $ when new mail arrives
* Philip Mak ([EMAIL PROTECTED]) [Dec 27. 2001 11:10]: Scenario: When I press $ to purge the deleted messages in my mailbox, and it asks me: Purge 8 deleted messages? ([yes]/no): and I answer yes, if new mail has arrived that mutt didn't see yet, it will show the new mail and *abort* the purge operation. Is this a bug/is there a workaround for this? If you don't want to be asked, I think you want this: ### delete ### Type: quadoption ### Default: ask-yes ### Controls whether or not messages are really deleted when closing or ### synchronizing a mailbox. If set to yes, messages marked for deleting ### will automatically be purged without prompting. If set to no, messages ### marked for deletion will be kept in the mailbox. set delete=yes That what I set and I don't get the prompt. I'm no veteran though, -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 We are all fugitives of our own fate.
Re: Bug? Pressing $ when new mail arrives
On Thu, 27 Dec 2001, Brian Clark wrote: if new mail has arrived that mutt didn't see yet, it will show the new mail and *abort* the purge operation. Is this a bug/is there a workaround for this? If you don't want to be asked, I think you want this: ### delete ### Type: quadoption ### Default: ask-yes ### Controls whether or not messages are really deleted when closing or ### synchronizing a mailbox. That's not what I was talking about, actually. I was saying that when it asks me Purge 8 deleted messages? ([yes]/no): and I answer yes, it DOES NOT purge the messages if new mail has just arrived.
Re: Bug? Pressing $ when new mail arrives
On Thu, Dec 27, 2001 at 11:20:07AM -0500, Philip Mak wrote: On Thu, 27 Dec 2001, Brian Clark wrote: if new mail has arrived that mutt didn't see yet, it will show the new mail and *abort* the purge operation. Is this a bug/is there a workaround for this? If you don't want to be asked, I think you want this: ### delete ### Type: quadoption ### Default: ask-yes ### Controls whether or not messages are really deleted when closing or ### synchronizing a mailbox. That's not what I was talking about, actually. I was saying that when it asks me Purge 8 deleted messages? ([yes]/no): and I answer yes, it DOES NOT purge the messages if new mail has just arrived. I've found this irritating too, but since it does no actual harm I don't really worry about it, especially since I don't delete mail often. I think I may happen because if the mailbox has been modified (mbox format) mutt may not be able to identify the relevant messages to remove easily? -- Benjamin Smith [EMAIL PROTECTED], [EMAIL PROTECTED] msg21945/pgp0.pgp Description: PGP signature
Re: Bug? Pressing $ when new mail arrives
* Benjamin Smith [EMAIL PROTECTED] [27-12-2001 17:47]: | That's not what I was talking about, actually. I was saying that when it | asks me Purge 8 deleted messages? ([yes]/no): and I answer yes, it DOES | NOT purge the messages if new mail has just arrived. | | | I've found this irritating too, but since it does no actual harm I don't | really worry about it, especially since I don't delete mail often. I | think I may happen because if the mailbox has been modified (mbox | format) mutt may not be able to identify the relevant messages to remove | easily? I was thinking of that too, but since mutt still knows how to mark the messages to be deleted after the purge, why not delete them after the check... ? -- René Clerc - ([EMAIL PROTECTED]) To get what you want, STOP doing what isn't working. -Dennis Weaver msg21947/pgp0.pgp Description: PGP signature
Re: Bug? Pressing $ when new mail arrives
On Thu, Dec 27, 2001 at 05:53:40PM +0100, René Clerc wrote: * Benjamin Smith [EMAIL PROTECTED] [27-12-2001 17:47]: | That's not what I was talking about, actually. I was saying that when it | asks me Purge 8 deleted messages? ([yes]/no): and I answer yes, it DOES | NOT purge the messages if new mail has just arrived. | | | I've found this irritating too, but since it does no actual harm I don't | really worry about it, especially since I don't delete mail often. I | think I may happen because if the mailbox has been modified (mbox | format) mutt may not be able to identify the relevant messages to remove | easily? I was thinking of that too, but since mutt still knows how to mark the messages to be deleted after the purge, why not delete them after the check... ? Good question... Currently the code just does this (in mbox_sync_mailbox): /* Check to make sure that the file hasn't changed on disk */ if ((i = mbox_check_mailbox (ctx, index_hint)) == M_NEW_MAIL || i == M_REOPEN { /* new mail arrived, or mailbox reopened */ need_sort = i; rc = i; goto bail; } -- René Clerc - ([EMAIL PROTECTED]) To get what you want, STOP doing what isn't working. -Dennis Weaver We could, but where's the fun of fixing it? -- Benjamin Smith [EMAIL PROTECTED], [EMAIL PROTECTED] msg21950/pgp0.pgp Description: PGP signature
Re: Bug? Pressing $ when new mail arrives
On Thu, 27 Dec 2001, Benjamin Smith wrote: I was thinking of that too, but since mutt still knows how to mark the messages to be deleted after the purge, why not delete them after the check... ? Good question... Currently the code just does this (in mbox_sync_mailbox): /* Check to make sure that the file hasn't changed on disk */ if ((i = mbox_check_mailbox (ctx, index_hint)) == M_NEW_MAIL || i == M_REOPEN { /* new mail arrived, or mailbox reopened */ need_sort = i; rc = i; goto bail; } Hmm... mutt's paradigm is to work gracefully even when there are different processes accessing the same mailbox at the same time. Let's imagine what would happen if person 1 and person 2 are both accessing the same mailbox, and we made mutt continue to expunge the messages even after it detects a change in the mailbox: 1. Person #1 presses $ and is asked whether to expunge messages. 2. Person #2 deletes a message. 3. Person #2 notices that he deleted the wrong message and wants to undelete it. 4. Person #1 presses y, causing all deleted messages to be expunged, including the one that Person #2 wanted to undelete. I'm guessing that's why the mutt authors coded $ to abort in case of a mailbox modification; if they just made it blindly not abort, then mutt would lose some transaction safety. I think a better way of handling this would be for mutt to remember what messages were marked as deleted when $ was pressed. If the user then confirms the deletion but mutt detects a changed mailbox, it should go read the mailbox again, then delete any messages that were originally marked as deleted and are still marked as deleted. I may not be fully aware of any problems in implementing this, though (maybe my reasoning is flawed somewhere, maybe there's a technical reason that makes it difficult to implement this, etc.).
Re: Bug? Pressing $ when new mail arrives
* Benjamin Smith [EMAIL PROTECTED] [27-12-2001 18:32]: | I was thinking of that too, but since mutt still knows how to mark the | messages to be deleted after the purge, why not delete them after the | check... ? | | Good question... Currently the code just does this (in | mbox_sync_mailbox): | | /* Check to make sure that the file hasn't changed on disk */ | if ((i = mbox_check_mailbox (ctx, index_hint)) == M_NEW_MAIL || i == M_REOPEN | { | /* new mail arrived, or mailbox reopened */ | need_sort = i; | rc = i; | goto bail; | } I know too little of mutt development to implement the improvement. I can imagine setting some flag that will result in a recursive call of mbox_sync_mailbox if there are any mails marked for deletion. But, again, I have no clue what the side effects may be ;) | To get what you want, STOP doing what isn't working. | -Dennis Weaver | | We could, but where's the fun of fixing it? That's the addition to the quote, STOP doing what isn't working, START fixing it!!! Anybody more ideas on this subject? -- René Clerc - ([EMAIL PROTECTED]) There's a difference between beauty and charm. A beautiful woman is one I notice. A charming woman is one who notices me. -John Erskine msg21952/pgp0.pgp Description: PGP signature
Re: Bug? Pressing $ when new mail arrives
Philip, et al -- ...and then Philip Mak said... % % Scenario: When I press $ to purge the deleted messages in my mailbox, % and it asks me: % % Purge 8 deleted messages? ([yes]/no): % % and I answer yes, if new mail has arrived that mutt didn't see yet, it % will show the new mail and *abort* the purge operation. Is this a bug/is % there a workaround for this? I don't think it's a bug; I think it's a design decision. The later discussions of multiple people accessing the same mailbox make sense, but I personally think it's just because one might change one's mind about whether or not to delete a message if new mail comes in. HTH HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg21958/pgp0.pgp Description: PGP signature
Re: Bug? Pressing $ when new mail arrives
Philip, et al -- ...and then Philip Mak said... % ... % I think a better way of handling this would be for mutt to remember what % messages were marked as deleted when $ was pressed. If the user then % confirms the deletion but mutt detects a changed mailbox, it should go % read the mailbox again, then delete any messages that were originally % marked as deleted and are still marked as deleted. This can't be done, AFAIK, under mbox; when a message is flagged for deletion, you will either purge it with a sync (or a write) or keep it and toss the flag if you exit without changes. As a result, mutt won't ever write a deletion flag back to an mbox file -- and the example of reading a changed mailbox to look for still marked as deleted will fail. [Note that one can be there when the file is opened; I procmail in a flag to mark some junk for as it arrives but not throw it away because I want to know that it has come in and sometimes want to read it.] % % I may not be fully aware of any problems in implementing this, though % (maybe my reasoning is flawed somewhere, maybe there's a technical reason % that makes it difficult to implement this, etc.). Other than the mbox example above, I dunno nothin' :-) HTH HAND Happy Holidays to all :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg21960/pgp0.pgp Description: PGP signature