[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: highlighting one buffer according to another
From: |
Stefan Monnier |
Subject: |
Re: highlighting one buffer according to another |
Date: |
Wed, 14 Sep 2022 23:18:49 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> it captures the diff, its contents, from any other buffer. suppose
> the buffer it captures from is called orig. it could be magit or
> anything else. and suppose the name of the buffer with special gutter
> characters is mydiff.
I'm afraid your description is a bit too vague for me to be able to give
you much advice.
How do the original (say diff-mode) buffer and your mydiff buffer differ
(or how are they related)?
Is `mydiff` generated from `diff`?
What do you mean by "gutter"?
> so part of the problem is finding the corresponding line in orig for
> each line in mydiff,
If `mydiff` is generated from `diff`, presumably you can get this info
by remembering this original mapping (e.g. adding text-properties in
`mydiff` that point to the origin, so that as you modify `mydiff`, the
origin info is preserved).
Stefan