unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* highlighting one buffer according to another
@ 2022-09-15  3:09 Samuel Wales
  2022-09-15  3:18 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Wales @ 2022-09-15  3:09 UTC (permalink / raw)
  To: help-gnu-emacs

this is probably much too much for me but i thought i'd bring it up anyway.

i have a derivative of diff-mode that has special gutter characters.

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.

what i want to do is mark every - or + line in orig, if the
corresponding line in mydiff contains a special gutter character.  for
marking, i haven't decided fully,  but it can maybe change the face
for the - or + line to inverse video.

so part of the problem is finding the corresponding line in orig for
each line in mydiff, and part of it is changing the face of lines in
orig.  [or in principle using fringe or something, but starting with
inverse video seems reasonable.]

a test for plain equality of lines after eliminating gutter etc. would
be sufficient, but some kind of @@ line number syncing or wiggling
might or might not be in principle possible for more accuracy of which
line mydiff refers to.

ideas welcome.  or any code.  i don't have more specific qs than this
beause this is where i got in this.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-15  4:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-15  3:09 highlighting one buffer according to another Samuel Wales
2022-09-15  3:18 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-09-15  4:36   ` Samuel Wales

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).