Using emerge in Emacs, I have a session like this:
<<<<<<< variant A
522ADC9C14B2FD9D00F56BAD /* close_test_button.png
Just use C-hm within the emerge buffer to see the help for the current modes. As is typical for most modes, the Emerge minor mode displays its key bindings in this help text.
That help shows that you can insert the content of variant A or B with: ia and ib, so you can use that feature to insert whichever variant isn't currently selected.
You can also switch from the default 'fast' mode to emerge 'edit' mode to directly edit the merged text. Use C-cC-cf in edit mode to get back to fast mode (because in edit mode, all emerge commands need to be prefixed by C-cC-c).
The Emerge manual has more details:
M-: (info "(emacs) Emerge")
RET
In particular, it explains the behaviour of the xc binding, which combines the two variants in a single step using a pre-defined template string:
M-: (info "(emacs) Combining in Emerge")
RET
The default template uses C preprocessor conditional syntax, however, so you would almost certainly want to override that. You can set the template via the Emerge Options menu or with emerge-set-combine-template
. For the template syntax see:
C-hv emerge-combine-versions-template
RET