Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
2 votes

How to efficiently merge 2 buffers which are partially overlapping?

You don't need to do anything fancy with ediff or keyboard macros. Just concatenate the two files together, then remove any duplicates. You can do that at the command line: cat a b | sort | uniq > ...
db48x's user avatar
  • 18.2k
2 votes

Is there a way to ask Emerge to "pick both"?

There are commands i a and i b which insert a or b; or x c to combine using a template. For your bonus case you should use a followed by i b. You can find more about that here.
theldoria's user avatar
  • 1,845
1 vote

Automatically merge files

EDIT in response to your comment Seems like indeed configuring the smerge-begin-re, smerge-lower-re, and smerge-end-re as follows before you activate smerge-mode (setq-local smerge-begin-re "^#...
dalanicolai's user avatar
  • 7,845
1 vote

How do you hook up git to emerge through emacsclient?

I got a somewhat working solution going. In my .gitconfig I have: [mergetool "emerge"] prompt = false cmd = emerge "$LOCAL" "$REMOTE" "$BASE" "$MERGED" trustExitCode = true And in .local/bin/...
Rovanion's user avatar
  • 987

Only top scored, non community-wiki answers of a minimum length are eligible