Bug 3600 - make next_on_delete work for Move To Trash
Summary: make next_on_delete work for Move To Trash
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: UI/Message List (show other bugs)
Version: 3.13.1
Hardware: PC Linux
: P3 enhancement
Assignee: users
Depends on:
Reported: 2016-01-22 21:36 CET by Barry Warsaw
Modified: 2016-07-05 20:50 CEST (History)
1 user (show)

See Also:

Proposed patch for this bug (617 bytes, patch)
2016-01-22 22:30 CET, Barry Warsaw
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Barry Warsaw 2016-01-22 21:36:36 CET
I just updated Ubuntu's claws-mail to 3.13.1 and have noticed the change in behavior controlled by next_on_delete.  I know there is a hidden variable that controls this, but unfortunately it appears not to work correctly when (I think) sort is descending.

Specifics: I sort on the message # column, and the little arrow points up, which I believe is sort descending.  IOW, the newest message (i.e. the one with the highest message #) is at the top of the message list.  Now I hit 'd' to delete the message.  The selected message does not change - it stays with the selected and newly deleted message.  Note that I also do *not* have "Execute immediately when moving or deleting messages" selected, so the newly deleted message just gets a blue < icon next to it.

This happens regardless of whether I set next_on_delete to 0 or 1.

Note though, that if I swap the sort order to ascending (i.e. the little arrow points down), then things appear to work as intended.
Comment 1 Barry Warsaw 2016-01-22 22:14:56 CET
An update:

Basically, ctrl-d (I mistyped that as 'd' in the OP) invokes "Move to Trash" as shown in the Message menu, but because that doesn't happen immediately and in descending sort, the selected message doesn't change.

If I select Message->Delete... then I see the correct behavior.

So I'm guessing that next_on_delete should be applied to "Move to Trash" too.
Comment 2 Barry Warsaw 2016-01-22 22:30:13 CET
Created attachment 1625 [details]
Proposed patch for this bug

Here's a proposed patch that appears to fix the problem for me.  Please note that I haven't tested it in all the conditions that may apply, just in the specific set of configurations that I personally use, as described in the bug.
Comment 3 Barry Warsaw 2016-04-05 00:55:09 CEST
Just wondering what you think about this patch.  I've been using it since I posted it here and it fixes the problem for me perfectly.
Comment 4 Paul 2016-04-05 08:58:50 CEST
This selection after move/delete will be addressed before the next release. Your patch just ignores the option and that is not wanted.
Comment 5 users 2016-07-04 12:04:02 CEST
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:

++ ChangeLog	2016-07-04 12:04:02.408325960 +0200
Merge: 9842b86 92c1a19
Author: Colin Leroy <colin@colino.net>
Date:   Mon Jul 4 12:04:01 2016 +0200

    Merge branch 'master' of file:///home/git/claws

Author: Paul <paul@claws-mail.org>
Date:   Mon Jul 4 11:02:58 2016 +0100

    make 'next_on_delete' hidden pref apply after trashing or moving a msg in addition to deleting a msg
    fixes bug #3600.
    document this hidden pref also
Comment 6 Barry Warsaw 2016-07-05 20:50:41 CEST
I did a quick build from source and test.  Looks good!  Thanks.