* Which "on change" hooks `smerge-mode` hooks up to?
@ 2023-05-31 13:26 Konstantin Kharlamov
2023-06-01 11:35 ` Daniel Martín
0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Kharlamov @ 2023-05-31 13:26 UTC (permalink / raw)
To: emacs-devel
I spent some hours trying to debug a problem with highlight getting stuck and I
figured, might just ask at this point more acknowledgeable people.
Problem I debug is basically, that in certain conditions a conflict marker
highlight gets stuck even after the marker was removed.
I figured that I probably need smerge-mode to rescan the buffer if the buffer
was reverted (that only happens when autorevert is enabled). I presume smerge-
mode already does it because it usually removes highlight upon manually removing
conflict markers. And that logic probably has some bug in it.
So, my question is, what "on change" hooks smerge-mode uses to detect that a
change to the buffer has been made to check whether conflict markers are still
in place? I tried searching for the word "hook" over the smerge-mode.el but
didn't find anything relevant.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Which "on change" hooks `smerge-mode` hooks up to?
2023-05-31 13:26 Which "on change" hooks `smerge-mode` hooks up to? Konstantin Kharlamov
@ 2023-06-01 11:35 ` Daniel Martín
2023-06-14 11:49 ` Konstantin Kharlamov
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Martín @ 2023-06-01 11:35 UTC (permalink / raw)
To: Konstantin Kharlamov; +Cc: emacs-devel
Konstantin Kharlamov <hi-angel@yandex.ru> writes:
> I spent some hours trying to debug a problem with highlight getting stuck and I
> figured, might just ask at this point more acknowledgeable people.
>
> Problem I debug is basically, that in certain conditions a conflict marker
> highlight gets stuck even after the marker was removed.
>
> I figured that I probably need smerge-mode to rescan the buffer if the buffer
> was reverted (that only happens when autorevert is enabled). I presume smerge-
> mode already does it because it usually removes highlight upon manually removing
> conflict markers. And that logic probably has some bug in it.
>
> So, my question is, what "on change" hooks smerge-mode uses to detect that a
> change to the buffer has been made to check whether conflict markers are still
> in place? I tried searching for the word "hook" over the smerge-mode.el but
> didn't find anything relevant.
If font-lock is enabled, smerge-mode uses it to fontify the conflicting
regions. See smerge-font-lock-keywords. So perhaps the regular
font-lock debugging techniques might help you investigate this issue in
more detail.
Also, if you have some steps to reproduce it, you could also create a
bug report by using M-x report-emacs-bug. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Which "on change" hooks `smerge-mode` hooks up to?
2023-06-01 11:35 ` Daniel Martín
@ 2023-06-14 11:49 ` Konstantin Kharlamov
0 siblings, 0 replies; 3+ messages in thread
From: Konstantin Kharlamov @ 2023-06-14 11:49 UTC (permalink / raw)
To: Daniel Martín; +Cc: emacs-devel
On Thu, 2023-06-01 at 13:35 +0200, Daniel Martín wrote:
> Konstantin Kharlamov <hi-angel@yandex.ru> writes:
>
> > I spent some hours trying to debug a problem with highlight getting stuck
> > and I
> > figured, might just ask at this point more acknowledgeable people.
> >
> > Problem I debug is basically, that in certain conditions a conflict marker
> > highlight gets stuck even after the marker was removed.
> >
> > I figured that I probably need smerge-mode to rescan the buffer if the
> > buffer
> > was reverted (that only happens when autorevert is enabled). I presume
> > smerge-
> > mode already does it because it usually removes highlight upon manually
> > removing
> > conflict markers. And that logic probably has some bug in it.
> >
> > So, my question is, what "on change" hooks smerge-mode uses to detect that a
> > change to the buffer has been made to check whether conflict markers are
> > still
> > in place? I tried searching for the word "hook" over the smerge-mode.el but
> > didn't find anything relevant.
>
> If font-lock is enabled, smerge-mode uses it to fontify the conflicting
> regions. See smerge-font-lock-keywords. So perhaps the regular
> font-lock debugging techniques might help you investigate this issue in
> more detail.
I see, thanks
> Also, if you have some steps to reproduce it, you could also create a
> bug report by using M-x report-emacs-bug. Thanks.
Sorry it took so long, got stuck in some personal stuff. I reported a bug here https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64063
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-14 11:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-31 13:26 Which "on change" hooks `smerge-mode` hooks up to? Konstantin Kharlamov
2023-06-01 11:35 ` Daniel Martín
2023-06-14 11:49 ` Konstantin Kharlamov
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).