Subject: bug#17166: 24.3; ediff-swap-buffers doesn't swap per-difference colors

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 11 May 2022 15:24:32 +0200

Anthony Foiani <[email-masked]> writes:

> What I wanted to happen:
>
>   When using "~" to swap buffers A and B in a simple "ediff-buffers"
>   invocation, I would like the per-diff region backgrounds to also be
>   swapped (e.g, red should stay on the top or left, while green should
>   be on the bottom or right).
>
> How I tried to make it happen:
>
>   0. Start emacs with "emacs -q"
>   1. Create buffer "*before*", add some content
>   2. Create buffer "*after*", add similar but slightly different
>      content.
>   3. M-x ediff-buffers RET *before* RET *after* RET
>   4. "~" to swap A/B buffers
>   5. "n" to go to change 1
>
> What actually happened:
>
>   At step (5) above, instead of seeing dim red + bright red on the top,
>   and dim green + bright green on the bottom, the overall regions had
>   the wrong color (dim green on top, dim red on bottom), while the
>   refinements had the correct colors (bright red on top, bright greeen
>   on bottom).
>
> Screenshots:
>
>   1. Correct colors, before swapping with "~":
>      http://foiani.home.dyndns.org/~tony/emacs/correct-before-swap.png
>
>   2. Incorrect colors, after swap:
>      http://foiani.home.dyndns.org/~tony/emacs/wrong-after-swap.png

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

Eight years later, those links don't work, of course, so I'm not quite
sure I'm reproducing this problem correctly.  But following that recipe,
everything seems to work fine for me in Emacs 29, but my buffer contents
may be different in a way that doesn't show the problem.

Are you still seeing this problem in recent Emacs versions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no