From: Samuel Wales <samologist@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: highlighting one buffer according to another
Date: Wed, 14 Sep 2022 20:09:29 -0700 [thread overview]
Message-ID: <CAJcAo8vtv8yvbJDgZM6bU3vYmpMQL12ptZ7uV_ed3YPCRqtDqg@mail.gmail.com> (raw)
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.
next reply other threads:[~2022-09-15 3:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 3:09 Samuel Wales [this message]
2022-09-15 3:18 ` highlighting one buffer according to another Stefan Monnier via Users list for the GNU Emacs text editor
2022-09-15 4:36 ` Samuel Wales
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJcAo8vtv8yvbJDgZM6bU3vYmpMQL12ptZ7uV_ed3YPCRqtDqg@mail.gmail.com \
--to=samologist@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).