Questions tagged [ediff]

Ediff is a feature of Emacs which allows comparing two or more files or buffers, as well as merging two files or buffers into one.

Ediff user manual: http://www.delorie.com/gnu/docs/emacs/ediff_1.html

Ediff page on Emacs wiki: http://emacswiki.org/emacs/EdiffMode

89 questions
58
votes
1 answer

How to view diff when emacs suggests to recover this file?

Sometimes it happens: emacs prompts you about recovering unsaved changes to a file, but you cannot remember if you want those changes or not. Starting at the recover-this-file buffer, is there a way to view a diff or otherwise directly see the…
Sparx
  • 1,111
  • 9
  • 20
27
votes
2 answers

How to show a diff between two buffers with "character-level" diffs

When two buffers are compared for differences, M-x ediff-buffers does not indicate the specific characters that have changed within a word (ie "character-level" diffs). Most modern diff tools will show the diffs within a word. Emacs seems to be…
modulitos
  • 2,432
  • 1
  • 18
  • 36
25
votes
2 answers

How to use both variants in Ediff?

Ediff interface has + button, but it doesn't seem to do anything (the minibuffer invariably shows "nil" when I press it), I thought this button was meant for using both variants in the result buffer. Anyhow, the original question is: how do I make…
wvxvw
  • 11,222
  • 2
  • 30
  • 55
18
votes
3 answers

How to start ediff-ing a file that has git conflict markers in it?

Following an attempted git merge on the commandline, my file now has standard conflict markers in it which emacs has helpfully reloaded (reverted?) in the buffer. How do I start some kind of merging mode to resolve the conflict? Can I get seperate…
daiboo
  • 181
  • 3
17
votes
1 answer

Never create frame in ediff

In general, I dislike frames. Right now, I'm using (setq ediff-window-setup-function #'ediff-setup-windows-plain) To ensure that ediff does not create a frame when it starts. However, certain commands, like ediff-show-registry still open up new…
PythonNut
  • 10,243
  • 2
  • 29
  • 75
15
votes
3 answers

How do I compare regions in the same file?

ediff allows comparing files, buffers, and regions in different buffers. However, it does not let one compare sections in the same buffer. Until now I used isearch for that: C-s at the beginning of the 1st identical section, the beginning of the…
sds
  • 5,928
  • 20
  • 39
14
votes
3 answers

How can I quit ediff immediately without having to type 'y'

When I quit ediff with q I get asked if I really want to quit. I'd rather it quit immediately. There is nothing obvious under customization. There is a solution here which seems to work by redefining the q key, but I'm not sure of the details of how…
TooTone
  • 401
  • 4
  • 11
14
votes
2 answers

Ediff: view whitespace differences

Is there a way to make Ediff highlight whitespace using a different color, the way it does for non-whitespace differences? For example, here are two regions with only whitespace differences: And here are two regions with non-whitespace…
Tianxiang Xiong
  • 3,848
  • 16
  • 27
14
votes
1 answer

On "really edit the buffer", have emacs run ediff-current-file automatically?

Context When emacs detects that a file was changed outside of an editing buffer. Observed emacs will ask: somefilename changed in disk; really edit the buffer? (y, n, r or C-h) (Incidentally, sometimes it happens even when there is no actual…
13
votes
5 answers

Comparing two text files on a Windows system

Since ediff-files and ediff-buffers result in apply: Searching for program: no such file or directory, diff error on windows machines. How to compare two files using Emacs on a windows system?
Empty_Mind
  • 1,341
  • 12
  • 27
12
votes
3 answers

Launch emacs with ediff-files (of ediff-directories) from command line

I would like to launch emacs to ediff either files or directories. For example, I'd like something like: emacs -f ediff-files file1 file2 But when I do this, it doesn't take file1 and file2 as the two files to diff. Rather, emacs prompts me for…
10
votes
4 answers

Diff of two buffers without creating temporary files

I need the diff of two buffers. One way would be to create temporary files containing the contents of these buffers and to use the diff function. However, the buffers contain sensitive information and I'd prefer not to have that information in…
tmalsburg
  • 2,540
  • 1
  • 14
  • 29
10
votes
5 answers

How to kill ediff's buffers on quit?

How to kill (C-x k) ediff's (A,B,C) buffers automatically on each ediff-quit?
denys
  • 315
  • 1
  • 11
9
votes
2 answers

Restoring windows and layout after an Ediff session

Looking for a solution on how to restore my window layout after an Ediff session, I found a blog post, where the author suggests: (winner-mode) (add-hook 'ediff-after-quit-hook-internal 'winner-undo) This seems to almost work well for me. I say…
Amelio Vazquez-Reina
  • 5,157
  • 4
  • 32
  • 47
9
votes
2 answers

How can I compare two commit diffs in magit?

I want to directly compare the diffs of two commits in emacs (rather than seeing the diff of two trees at given commit points). A bonus would be being able to use ediff mode to compare the two buffers. However there seems to be no way to have two…
stsquad
  • 4,626
  • 28
  • 45
1
2 3 4 5 6