Freedesktop.org mime-actions-spec (http://freedesktop.org/wiki/Specifications/mime-actions-spec) states that default application for a MIME type is the one that is listed first for a given MIME type in section [Added Associations] of mimeapps.list, e.g.:
------
[Added Associations]
mimetype1=foo1.desktop;foo2.desktop;foo3.desktop;
------
foo1 will will be default for mimetype1
But if you choose an default application (which was not on the list) for some file in PCManFM, it will be written to the end of the list.
I am not touching [Default Applications] section in this report. As far as I understand, it is needed to maintain compatibility between mime-actions-spec and xdg-open behavior. I am only covering [Added Associations] section misbehavior in PCManFM.
Anonymous
We hope this issue is completely fixed in the Git repository recently.
Check it out when it's possible for you and if the bug still exists then reopen the report, please.
Thank you very much.