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.

Filter by
Sorted by
Tagged with
5
votes
1answer
1k 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
328 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
48 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
474 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
445 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. ...
13
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
599 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 ...
6
votes
2answers
790 views

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-...
21
votes
2answers
13k views

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

How can I only show different lines in ediff?

This seems like such a basic feature to have in a diff mode, but I can't find anything in the documentation. If I have two 1000 line files, and only one line is different, I want to be able to hide ...
16
votes
3answers
2k views

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

Could ediff-buffers re-use the current window configuration?

For instance, say that I have a two-window vertical split. If I call ediff-buffers from the right window, it will swap the right and the left window for the diff, and even leave it like that ...
51
votes
1answer
2k views

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

How to make vc-* and magit treat a symbolic link to a real file in git repo just like the original file?

Say, I got ~/.emacs which is a soft link to ~/.emacs.d/init.el(using ln -s ~/.emacs.d/init.el ~/.emacs) which is in a git repo, because this will make it easier to reach init.el, outside or inside ...
8
votes
2answers
2k views

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 ...
8
votes
2answers
3k views

How do I ediff a buffer against a revision?

I want to run ediff to compare my current version of a file (in git) with a version of the file on a different branch. I run M-x ediff-revision from within an open buffer for the file in question. I ...

1 2