2

Issue description

When launching Ediff color scheme is very poor and i do not have word wise diff highlight. It seems that diff color faces are not activated at ediff startup.

I use emacs -Q to avoid installed themes interference.

But as you can see, down the pic, Auto-refining is ON and hitting * has no change.

enter image description here

Workaround

Fólkvangr provided a working solution : the j key magically highlight the buffer with great colors and show word wise diff.

enter image description here

What i'm expecting

I would like diff to open like on the second picture by default AND show all differences of the buffer - not only by chunks ( where you have to type j, then n / p to sequentially move to chunks).

Broadly, I'd like it to display vertical side by side files with all diff highlighted at character level the way vimdiff and vscode do.

Here is my ediff config made of things i read and the gnu doc :

;; turn off whitespace checking:
(setq ediff-diff-options "-w")
;; side by side diff
(setq ediff-split-window-function 'split-window-horizontally)
;; ne pas ouvrir de fenêtre séparée pour les contrôles :
(setq ediff-window-setup-function 'ediff-setup-windows-plain)
;; refinement:
(setq-default ediff-forward-word-function 'forward-char)
11
  • 1
    You've posted two separate questions in one post. Can you split it up?
    – user12563
    Commented Jun 6, 2019 at 20:35
  • Well, i am sure those are really connected and are very probably one problem. Describing those two issues should help to grasp what's wrong. But I will do that if no one pick it up that way.
    – stockersky
    Commented Jun 6, 2019 at 22:25
  • There are at least 2 questions here. Please separate them.
    – Drew
    Commented Jun 6, 2019 at 23:41
  • Ok, done. Sibling issue is emacs.stackexchange.com/questions/50889/…
    – stockersky
    Commented Jun 7, 2019 at 11:52
  • 1
    Woww! The j key makes it work right away :-) !!! In Magit too!!! How can it be activated by default for the whole ediff ? The link up my post brings you to another related issue where i wrote my ediff emacs file config. Thanksss!
    – stockersky
    Commented Jun 7, 2019 at 14:30

1 Answer 1

2

It seems that ediff displays line-based difference regions like diff. However, refinements are displayed using the moving commands like j, n and p.

Ediff manual

The functions ediff-files, ediff-buffers, ediff-files3, ediff-buffers3 first display the coarse, line-based difference regions, as reported by the diff program.

[...] the differences are highlighted as you step through them.

Edit: differences are probably highlighted consecutively because Ediff is an interactive application: "the user browses through the differences".

1
  • 1
    Yes, sounds like this is a default behavior. Even magit have the config magit-diff-refine-hunk all but it does only apply to magit-diff and not to magit-Ediff. Today, computers should really be able to handle this overload! At least, it could be great to to able to specify a treshold (ex: number of lines in the buffer) to activate the whole buffer word-wise refinement. Or maybe code some EmacsLisp to implement it. But I'm not comfortable with it yet. Anyway, I'm getting used to it and rarely use another app to review my changes before committing.
    – stockersky
    Commented Jun 18, 2019 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.