-
-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apply foldersort after folderfilter #27
Comments
I also noticed that. |
8b6f10e in the "next" branch should fix that. Please, test. |
I was able to achieve what I wanted, |
Sorting and excluding should be commutative: filtering before sorting will give you the same results as sorting after filtering if filtering has no side effects on the folders. I agree that sorting after filtering will be faster because one has to sort less, but may be I don't understand some implications of your situation? Why do you need to check filtered folders inside sort comparator? |
I construct mapping dictionary for
This is used by both
In config, that's used like this:
If sorting would be done after filtering, I could use sort comparator based simply on
and of course in config:
Instead I use this horrible thing:
|
Well, it turns out that it is not that simple to achieve what you want, but I am working on that. Might take a couple weeks, though: EBUSY most of the time. |
Bring the description in the template offlineimap.conf in sync to the actual implementation: pass folder names to the sorting function, not the offlineimap.folder.IMAP.IMAPFolder objects themselves. GitHub issue: OfflineIMAP#27 Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
Looked at this and as previously said, it's far from trivial patch. Don't expect changes any time soon. |
Both compare features are:
I guess there's a way to use the same key sorting for both. I'm using none of those features. Could anyone try to make both identical in behaviour? Also, I think we might stop supporting the "cmp" way of sorting folder names for Python2. |
Instead of
I think the following code would provide the expected behaviour:
Anyway, since this was not implemented for years, I'm closing. I guess that the benefit don't worth the trouble. |
Your solution does not consider the case when only one of the arguments is not in the list, in which case the result should be either 1 or -1. Hence it is not a correct comparator. |
Yes. |
Hi,
the 'foldersort' option doesn't work, it's completely ignored. Also there's no mention of it in man page.
The text was updated successfully, but these errors were encountered: