In emerge pretend output, on a color terminal, bolded lines are used to show packages that in the world file. If the output is redirected to a file, no colors or bold are rendered. The colors aren't significant, however there is no way in the non-colored output which packages are in world or not. Please introduce something so that it can be easily seen in the non-color output which packages are in the worldfile.
I guess this is something we could include in the --columns display, or possibly we could add an option to render the merge list as JSON. The information that you're after could also be gleaned from a representation of the dependency graph, where @selected, @system, and @profile would be the root nodes. We could have an option to output the dependency graph in DOT format, which people could nicely render with graphviz: https://en.wikipedia.org/wiki/DOT_(graph_description_language)
Rendering in JSON, and then processing via DOT is fine by me. I've used Graphviz extensively in the past. JSON would make processing of the output a LOT easier, since it provides a structured output of what's going to be done. I'd make it print a dictionary of all items to be installed, with one of the keys being all dependencies of a given item that are going to be processed. { "dev-cpp/glibmm": { .. "RESOLVED_DEPENDS": [] } "dev-cpp/glibmm-2.50.1:2::gentoo": { ... "RESOLVED_DEPENDS": [ "dev-libs/glib-2.50.3-r1:2::gentoo" ] }, "net-libs/glib-networking-2.50.0::gentoo": { ... "RESOLVED_DEPENDS": [ "dev-libs/glib-2.50.3-r1:2::gentoo" ] } }