I would like to have all the geometry of a scene merged in one mesh. It should include curves, fonts, group instances, particles, with applied modifiers, etc...
obj.to_mesh doesn't work for group instances for example.
First make all duplis real, then convert all to mesh and join.
Shorthand: Ctrl+Shift+A -> Alt+C, M -> Shift+RMB -> Ctrl+J.
Note, You might want to first un-hide all objects, view all layers and make any linked data local too, thats if you want to apply to the entire scene and not just what you see.