GNU bug report logs -
#78184
30.0.93; ansi-osc-apply-on-region should use end marker
Previous Next
Full log
View this message in rfc822 format
> From: Troy Brown <brownts <at> troybrown.dev>
> Date: Mon, 12 May 2025 18:32:13 -0400
> Cc: Matthias Meulien <orontee <at> gmail.com>, 78184 <at> debbugs.gnu.org
>
> On Sat, May 10, 2025 at 6:52 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > > From: Matthias Meulien <orontee <at> gmail.com>
> > > Date: Thu, 8 May 2025 17:12:50 +0200
> > > Cc: Troy Brown <brownts <at> troybrown.dev>, 78184 <at> debbugs.gnu.org
> > >
> > > Troy analysis is right. I was able to reproduce. Please have a look to the attached patch.
> >
> > Thanks. Troy, could you please try the patch and report?
>
> Yes, I can confirm that this patch addresses the issue I'm seeing. It
> appears the patch was for the master branch, so that is where I
> applied and tested it. I assume this change would also be merged into
> the Emacs 30 branch.
>
> I did have a couple notes. I believe an end marker should also be
> used in `ansi-osc-filter-region` to honor the original bounds passed
> into the function, since it also calls `delete-region`. I'm not aware
> of it raising an error due to its absence, but I believe it would be
> correct to use it, and would also match `ansi-color-filter-region`.
> Also, it seems `ansi-osc-filter-region` doesn't handle "fragments"
> (where only the beginning of the escape sequence appears in the
> supplied range), by saving and reusing context, whereas the
> corresponding `ansi-color-filter-region` does. Therefore if an OSC
> control sequence overlapped the supplied bounds, I don't think it
> would be filtered out on the next call to `ansi-osc-filter-region`.
Thanks. Matthias, any further comments or changes to the patch?
This bug report was last modified 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.