JabRef 3.8.1 on Windows 10
Steps to reproduce:
The way to do in previous versions 2.x was to go to (Options >> Preferences >> File Sorting >> Save Sort Order >> Save in current table sort order)
You can customize the sort order of the entries in File -> Database properties -> Save sort order.
It is no longer possible to save them according to the table order (correct me if I'm wrong here, @JabRef/developers).
yes, correct.
Also, check the proper working of this feature.
Options -> preferences -> Export Sorting -> Export in current table sort order
Okay... I had a look at the code and this seems to be totally broken:
1) Saving a bib file will never be made with the correct sorting setting but always using the internal IDs (as saveOrder is always null - see SavePreferences line 68 and BibDatabaseWriter line 82)
2) Exporting should generally work, but all exporters are intialized at startup - thus, "Export in current table sort order" can't be working...
Regarding 1.: I think, the save order specified in the metadata should work (https://github.com/JabRef/jabref/blob/master/src/main/java/net/sf/jabref/logic/exporter/BibDatabaseWriter.java#L138) and there should be tests for it.
Yes. But if there is no file specific sorting defined the sorting won't work.
So, there are two different cases:
1) "Save database": here only the sort order specified in the metadata is taken into account
2) "Export database": here first the sort order of the metadata is used and then the one specified in the export settings (or table order)
What would be the desired behavior?
Seems to be removed on purpose (see #711 and #520)... I'll check this again tomorrow when I'm not as tired as I'm now :wink:
As I checked it now again this is no bug, but we decided to remove the possibility to save files in the current table sort order (the main reason was that this is not desirable in settings where a file is managed using a version control system).
@tobiasdiez already explained how to define a sort order for a file - @faheemkhuhawar is this sufficient for you? If not, what is your use case to save the file in different sortings?
To me saving and exporting the database in the current table sort order is an important feature present in previous 2.x versions of jabref. I have found the workaround to get things done, but wish to see jabref incorporate features that make jabref easy to use rather than remove it and make the jabref interface complex to use.
Sorry, but I still do not understand WHY this is important for you. In our opinion the typical use case for JabRef is a) using it primary as visual tool to manage bibliographic data or b) use it as graphical interface for creating BibTeX files.
In both use cases the ordering of the file is generally totally irrelevant as a) the table is used to sort the entries (and this visual sorting is kept) and b) the resulting bibliography used in a TeX document is produced in the order specified by the bibliography style.
If you still want a specific order in your file (e.g., to simplify version control), you can set this in the database entries dialog - but why would change this frequently using the table sort order?
If you want to export to another format, say HTML, it is still possible to choose the option "export in current table sort order"...
Thus, for nearly all use cases the situation is NOW better and simpler than before...
Since there seems to be no compelling reasons for the feature, or at least no motivation for it, we decided in the devcall to close this issue.
In my tests of exporting, choosing Options/Preferences/Export sorting and then "export in current table sort order" has unpredictable effects on the order of the output. The entries certainly are not in "current table order."
Best,
Dominik
JabRef 4.0-dev--snapshot--2017-07-19--master--2f12fecfb
Linux 4.8.0-58-generic amd64
Java 1.8.0_131
Most helpful comment
Sorry, but I still do not understand WHY this is important for you. In our opinion the typical use case for JabRef is a) using it primary as visual tool to manage bibliographic data or b) use it as graphical interface for creating BibTeX files.
In both use cases the ordering of the file is generally totally irrelevant as a) the table is used to sort the entries (and this visual sorting is kept) and b) the resulting bibliography used in a TeX document is produced in the order specified by the bibliography style.
If you still want a specific order in your file (e.g., to simplify version control), you can set this in the database entries dialog - but why would change this frequently using the table sort order?
If you want to export to another format, say HTML, it is still possible to choose the option "export in current table sort order"...
Thus, for nearly all use cases the situation is NOW better and simpler than before...