Bug 49741 - Jumping to Unread messages when selecting a folder
Summary: Jumping to Unread messages when selecting a folder
Status: RESOLVED DUPLICATE of bug 49575
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.4.3
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-26 19:19 UTC by Patrick Huber
Modified: 2009-12-15 00:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Not Mark Read at Folder Change patch for 3.2.3 (4.05 KB, patch)
2004-08-04 10:59 UTC, Gilhad
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Huber 2002-10-26 19:19:13 UTC
Version:           1.4.3 (using KDE KDE 3.0.4)
Installed from:    SuSE RPMs

I sort my folders so the newest messages are on top.
When I select a folder containing unread messages, I'd love to have kmail jumping to the oldest unread message (somewhere in the middle) instead of to the topmost message (newest unread in that folder).
Comment 1 Daniel Naber 2002-11-10 02:35:04 UTC
there's a "jump to first unread message" option in kde 3.1, i guess this is what you 
want. 
Comment 2 Ingo Kl 2002-11-10 18:14:46 UTC
Subject: Re:  Jumping to Unread messages when selecting a folder

On Sunday 10 November 2002 02:35, Daniel Naber wrote:
> there's a "jump to first unread message" option in kde
> 3.1, i guess this is what you want.

No. This one jumps to the wrong message. The submitter of the wish wants 
the oldest new message to be selected when entering a folder and not 
the topmost one. This is only relevant for people like him and me who 
sort by Date ^ (i.e. newest message first).

Comment 3 Anders E. Andersen 2003-02-01 15:07:56 UTC
Yes, I want this too. 
Comment 4 Gilhad 2004-01-15 17:24:49 UTC
I want 'Jump to first READ message' selection.
I sort messages by 'Date ^', use many folders and got MANY messages of different importance. So after check I go throught folders, look at headers (Subject/from) and choost the most urgent to read first, leaving not_so_important/personal/hobby/etc for later reading. Automatic marking as READ forces me to always set message as unread on folder change. This really sucks. 

I did made hack (Bug 22085: Don't mark as 'read' message opened when entering a folder), but configurating option is much better. It does not matter, if I got mail unchanged on enter or if I got highlited the newest already READ mail, both are good for me. (Also many friends of me uses my hack, because their reading style is similar)
Comment 5 Gilhad 2004-08-04 10:59:49 UTC
Created attachment 6991 [details]
Not Mark Read at Folder Change patch for 3.2.3 

Here is my patch to version 3.2.3, it works without problem for me
Comment 6 Anders E. Andersen 2004-08-04 17:10:36 UTC
Could you explain a bit further? From your patch title I am not convinced your patch would solve the problem. We are not interested in not marking stuff as read. The problem is that on folder change, depending on how the mail folder is sorted, the cursor jumps to the wrong message.

We want it to jump to the right message AND mark it as read, as it should in fact now be showing in the message viewer.

To reiterate, the problem crucially depends on how the folder is sorted. Some sorting methods will work correctly but others won't.
Comment 7 Gilhad 2004-08-10 14:44:11 UTC
You are right. My patch has nothing to do with sorting.
My patch only disable "Mark as read" action in moment of changing folder.

I was thinking, it is related also to this topic (rather than bug itself), because of users habit. Maybe I was wrong.

(More about it is in closed Bug 22085:)

Comment 8 Anders E. Andersen 2004-10-10 18:58:02 UTC
Why isn't this a bug instead of a wishlist item?

It is a misbehaviour in current functionality. The current code is not smart enough to handle all cases of folder sorting properly, so it jumps to the wrong mail when entering the folder. When a feature doesn't behave as expected, you have a bug.
Comment 9 Carsten Burghardt 2004-10-10 20:18:18 UTC
> It is a misbehaviour in current functionality. The current code is not
> smart enough to handle all cases of folder sorting properly, so it jumps to
> the wrong mail when entering the folder. When a feature doesn't behave as
> expected, you have a bug. _______________________________________________

It obviously behaves like most of the people expect it to. You want another 
option as this shouldn't change the current way and this is a wish.

Comment 10 Anders E. Andersen 2004-10-10 21:17:09 UTC
I don't think so. The implication of what you are saying is, that as long as most people are not affected by a particular problem, then effectively it is not a problem at all.

The jump to message function behaves differently depending on which way the message list is sorted. That's wrong. It should behave the same no matter which way you sort the list.

The relevant setup option can be found here:

Setup->Configure KMail->Misc

Here you can find the tickoff box which reads "Jump to first unread message when entering a folder".

Weither you sort your mail folders in ascending or descending order, the message that is selected by this algorithm must be the same actual message.

You know, this would be simple to fix actually.

Just check which way the folder is sorted. If it is sorted ascendingly, use the current method. If it is sorted descendingly, reverse the search and start from the bottom of the list instead. It is that simple.

And the proper title of this bug should read:

"Reverse selection of unread mail when folder sorting is also reversed."
Comment 11 Anders E. Andersen 2006-05-06 18:12:08 UTC
If one was to try to fix this, which files and routines would be relevant to look at?

It's a big application you know..
Comment 12 Magnus Holmgren 2006-05-06 18:48:19 UTC
kmheaders.cpp, more precisely KMHeaders::readSortOrder(), I think.

See also bug #117543 (esp. my second patch), which is touching the same code a bit.

But one thing I wonder is: Should the last unread message be selected just when the sort order is "by date, newest first", or whenever messages are sorted in descending order, even by sender?
Comment 13 Anders E. Andersen 2006-05-06 18:52:25 UTC
I believe so. It should work the exactly opposide of the way ascending order works.
Comment 14 Björn Ruberg 2009-12-15 00:48:58 UTC

*** This bug has been marked as a duplicate of bug 49575 ***