Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
55 views

Ediff: compare two files Word-by-word

I use Emacs 26.1 and would like to compare two files word-by-word. Clicking "Tools -> Compare (Ediff) -> Windows Word-by-word..." allows only to compare the visible parts of two buffers, not the whole ...
2
votes
1answer
85 views

Ediff: compare two (long) buffers Word-by-word

I use Emacs 26.1 and try to compare two (long) buffers (opened side by side) by clicking Tools -> Compare (Ediff) -> Windows Word-by-word... Then I choose both Windows (A and B) by clicking on each ...
0
votes
0answers
19 views

ediff - changing highlight colors when running without graphics

I'm used to running emacs -nw, how can I change highlight colors when using ediff? Default is white and renders code unreadable. EDIT: It seems I was wrong: only inactive rows have white background, ...
0
votes
1answer
28 views

How to get p4merge like view with the ediff?

In the p4merge tool the layout for merging 2 files look like the following. +---------------+--------------+ | | | | | | | ...
0
votes
1answer
44 views

Unable to use ediff with emacs and evil due to window configuration

Running emacs 25.2.2 with evil installed and updated from Melpa. When I run ediff, it asks for usual buffer A and buffer B and then ONLY the ediff buffer in its own frame is visible with 'Type ? for ...
0
votes
0answers
23 views

How to prevent ediff from resizing frame out of visible region of the screen?

How can I prevent ediff from resizing the Emacs frame, or how can I limit the size of the frame when I start an ediff session? I have an IMac connected to a wide screen monitor. When I start an ...
3
votes
1answer
67 views

Find the first difference between two buffers

Given two buffers, how do I find the first character position where their contents differ? E.g. for contents abcdef and abcDeF, the first difference would be at point=4. For abc and ab, it would be at ...
0
votes
1answer
150 views

Is there a way for ediff to compare SVN changes in the head to my local copy?

My company uses SVN, and one of the things I often want to do is compare the differences that someone else checked in without doing an update. For example, if I see someone has committed a new ...
4
votes
1answer
122 views

Does magit when using ediff have a means for moving on the next file when there are multiple files to be diffed?

I am using ediff to get side by side diffs with magit and there seems to be no way to move to the next pair of files, after diffing the current file. For instance if I use vimdiff for git diff, after ...
0
votes
1answer
72 views

script to Ediff two files in running gui Emacs?

I'm putting together a presentation that involves some live demos in the terminal. In one of the demos, I run a shell script that takes an input file, runs it through an Awk script, and generates a ...
3
votes
1answer
370 views

How to get back to ediff mode from edit mode

Bear with me as I am a neophyte to Emacs. I followed http://pragmaticemacs.com/emacs/visualise-and-copy-differences-between-files/ to fire up Ediff in Emacs. It opened two buffers in two windows ...
3
votes
1answer
141 views

make ediff jump to closest difference

I use ediff-revision or vc-ediff to compare the current state of a file respect its working revision. I normally do not want to check the whole file but just the difference at or closest to the ...
1
vote
1answer
148 views

Magit diff working file to commit in log?

How does one ediff a current file--ie working tree--against an arbitrary version in some previous commit? In this case, I'm interested in pulling in some, but not all, changes from a commit in ...
1
vote
1answer
41 views

How to view ediff (and other) manuals within emacs?

I want to learn how to use a built in package (e.g. ediff). This built-in package has an online manual in html, but presumably this content is also available from within emacs. How do I view it ...
2
votes
0answers
87 views

Ediff: How to fill missing lines (gap) to achieve vertical alignment? [closed]

Oftentimes there are gaps in a side-by-side differential. That is some lines were added, some were removed. As I currently see it, ediff does not fill this gap by default. Thus, vertical alignment ...
0
votes
1answer
59 views

How to keep cursor position after calling ediff-current-file?

I would like to use ediff-current-file to jump to some of my previous changes/edits. However, when I type 'q' to quit ediff after calling ediff-current-file and navigation (using 'p'/'n'), the cursor ...
0
votes
1answer
83 views

vdiff-refine-all-hunks/ediff-update-diffs in startup eval

I'm having a problem with putting vdiff-refine-all-hunks or ediff-update-diffs into --eval for startup. Take vdiff as example, I'm calling it using: emacs --eval "(progn (vdiff-files file1 file2) (...
3
votes
0answers
30 views

several ediff sessions in one emacs

f.e. I want to compare 2 pair of files file1 vs file11 file2 vs file22 For now I run the bash for, loop over 2 file pairs and run emacs 2 times. But it is not so convenient because I can not go back. ...
2
votes
2answers
1k views

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 ...
1
vote
0answers
85 views

Ignore certain changes in Ediff

I have two versions of a file (or buffer) and I'm running ediff to compare them. Some of the changes are irrelevant and I want to ignore them. Specifically, foo has been renamed to bar in places and I ...
5
votes
4answers
471 views

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 ...
11
votes
2answers
315 views

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 ...
1
vote
1answer
128 views

How to make ediff-patch-file strip leading path components?

I have a multi-file patch and ediff-patch-file doesn't find the files unless I manually remove all of the "a/" and "b/" prefixes from the patch first. In other words, it acts like "patch -p0" when I ...
5
votes
1answer
98 views

How to manual set the specified paragraph to compare in ediff

For example, the following case. It seems the system mistakenly compare wrong paragraph. What I want to compare, for example, is the public static... with public static.... How can I do that? Thank ...
1
vote
1answer
318 views

How can I resize certain windows evenly when using the golden-ratio library?

I'm using golden-ratio and ediff. I want golden-ratio-mode turned off when using ediff and turned on after I finish merging with magit. I cannot figure out a way to evenly balance Ediff's windows (A,...
2
votes
0answers
73 views

emacs-show-diff-output produces empty buffer

EDIT: I figured it out. It seems to be an emacs bug. My walk-through of the bug is below. I just now found out about emacs-show-diff-output, which is bound to D by default in an ediff session. When ...
6
votes
0answers
74 views

Ediff location pane

Is there a way to create something similar to the location pane from win merge in ediff? Not having this is about the only reason I use win merged instead of ediff.
7
votes
2answers
341 views

Prevent folding org files opened by ediff

Folding gets in the way when merging two org files using ediff, so I'm trying to disable all folding in org-mode buffers created by ediff. Non-ediff folding behavior should remain unaffected. ...
1
vote
1answer
148 views

Ediff directories with remote path (and Prelude?)

I need to compare from time to time the contents (source code) of a remote directory with a local one. And I would like to mark for hiding those files/subdirs that are identical (that is, use the =h ...
5
votes
1answer
54 views

How to quickly reopen ediff with the same files

I ran ediff on file A and B, and then quit it to do a git commit. Then I want to reopen ediff (let's call it rediff) with the same pair of files. How do I do this? There is the eregistry thing that I ...
1
vote
0answers
8 views

How to exit from ediff-buffers? [duplicate]

I've run ediff-buffers to compare two versions of the same file, how can I now exit from this diff? How can I restore the view of the buffer?
1
vote
2answers
1k views

ediff - change colors and how to merge code

first question: is how to adjust colors of ediff-revision output, tried various versions - no luck: ;; Customizing colors used in diff mode (load-library "ediff") (setq ediff-window-setup-function '...
13
votes
2answers
1k views

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. ...
11
votes
1answer
415 views

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, ...
5
votes
3answers
879 views

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 ...
9
votes
5answers
654 views

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?
8
votes
0answers
140 views

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 ...
2
votes
1answer
634 views

Display diff output side-by-side

I use the version control system fossil. I'd like to view fossil diff's output side-by-side in Emacs. The output looks like this: $ fossil diff Index: test1.txt =======================================...
2
votes
1answer
955 views

Execute an ediff command while in one of the buffers

I want to mimic the behaviour of vim's do and dp in ediff mode. These two commands stand for "obtain diff" and "put diff". That is, if I'm on one difference in one buffer, pressing do would copy the ...
3
votes
0answers
190 views

ediff show empty lines

I'm not sure how to describe this. In vimdiff I remember that if one of the buffers had added a line, the other buffer showed lines at that same vertical location to show where they were added. I ...
0
votes
1answer
37 views

auto-unwiden ediff frame on quit

So in ediff I can press m to widen the frame but if I quit before pressing it again to restore to the original size, then the frame stays that size. I'd like to automate this so that if I forgot to ...
3
votes
3answers
654 views

How to undo on ediff A-B changes

Is there a keybind or a way of undoing each of ediff A-B change? I often want to revert the previous modification.
9
votes
3answers
4k views

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?
4
votes
1answer
856 views

Stage diff hunk into git from ediff?

How do you stage a hunk into git from ediff? I'd like to be able to view a side-by-side diff and stage hunks into the "HEAD" side of the diff, but that buffer (i.e., spacemacs.~master~) is read-only. ...
2
votes
0answers
272 views

How do I use split-window-sensibly with ediff-setup-windows-plain together?

I want ediff to use split-window-sensibly so it will stack the diffs on top/bottom when the window is narrow, but side-by-side when the window is wide. I'd like to use a single frame instead of the ...
1
vote
1answer
45 views

How do I run two simultaneous ediffs involving the same file? i.e., ediffs A, B and A, C

I would like to ediff files (or buffers) A and B, and also A and C. The need arises from the fact that A and B were both forked from C, and I need to merge B into A while checking I'm not destroying ...
7
votes
1answer
422 views

Using ediff to view a Github pull request

I would like to be able to review Github pull requests as a single ediff "session" (if that's the right word). However, whenever I use magit-ediff from Magit, I can only ediff a single file at once, ...
1
vote
1answer
413 views

Tramp ediff problem MS-DOS style path detected

I'm using tramp to edit files remotely. Now I would like to ediff two files which are at the remote location. The problem is, I get the following warning, which prevents using ediff completely. ...
12
votes
3answers
2k views

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 ...
2
votes
2answers
487 views

How to use ediff with (hg) changesets?

I have not found a good way to use ediff with Mercurial changsets. What I want is basically the functionality of vc-dir, but for committed changesets. The input should be a changeset identifier, and I ...