From unknown Tue Jun 17 22:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#78184: 30.0.93; ansi-osc-apply-on-region should use end marker Resent-From: Troy Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 May 2025 11:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 78184 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 78184@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174610010312388 (code B ref -1); Thu, 01 May 2025 11:49:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 May 2025 11:48:23 +0000 Received: from localhost ([127.0.0.1]:49226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uASOs-0003Dj-9j for submit@debbugs.gnu.org; Thu, 01 May 2025 07:48:22 -0400 Received: from lists.gnu.org ([2001:470:142::17]:53918) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uASOp-0003DH-Dd for submit@debbugs.gnu.org; Thu, 01 May 2025 07:48:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uASOi-0002Xu-FY for bug-gnu-emacs@gnu.org; Thu, 01 May 2025 07:48:13 -0400 Received: from mail-ej1-f53.google.com ([209.85.218.53]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uASOg-0007tF-Hy for bug-gnu-emacs@gnu.org; Thu, 01 May 2025 07:48:12 -0400 Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-ac345bd8e13so131082666b.0 for ; Thu, 01 May 2025 04:48:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746100088; x=1746704888; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Juu6z0EFFdzELsEOjERFgls13EYAjo26vxVbRRelfgQ=; b=Ixd4gpRo9nAgDxxd3a84FLo3IloVhGZZ+H1WXFgxu8kWsVCutqzBtVULjF1YRBLIVo Q52RDoV8hvT6TERLLOur4pk856ugQvB9+Ckc3WQ4SYMXaUTGyDivZuU49/AtPHqb6OIX ShgHm5IrF9i+Tpsn8U3hD8xLkmsZdv/WAm4eKfFOZfvVc1rmJnI1o9HNXJhJeDI3Esqp 5fjksXbOsbjIYsI/fkndXE6fryUCS1z0BIVaYKktILSJdmPWeWnh9ljyDbtApaL/lq6L 8QStIIKHck60jMF9TBsJBHqpqH9w46/dHeNpfUzbjo3aV/gjceeOfoRcVWFI55YHRmyJ i7yw== X-Gm-Message-State: AOJu0YwC8unpm8opnAgwmO/Z61XPgXcd3egolG5e7ZG2SGulhWhU/dAe fBHABgkBvCVFeuk0Ut31eZdQsCmNvx1NEGuEx9AgtJ8Nru1HSUsUdPWRrEuW X-Gm-Gg: ASbGncukgrNHitfe5HQJshahttvY/UgX/kUsE6V5oAXe9osBrntpYAUbnHcFiTaly0b zaHmwnD+/+7Q1ra02eRGzKTmerluK0+wFMIpfm5dLJKOB+r5RjMZhscXrFBZwWFwYZAAA1iTPbC cgLl11up06knZ1AXM7PpB4iUfOdp187W5On8DPX2p81qFZ15KTJr47Y2WZCWRcVCQmhBwtcmxpj zfu1ccVQQWKNO2p8w8gcP9spV7j+t6e0iC+8clOXepIpaB3azcvIfDJkF/oKfOQCuQ4oPiKCGsr fwiZYHNj6VkIlJMBazpq+rXDTuuOz5gxoC14B106iXs/fpoSJX7YoN5VU6b+sXd7xYyvbtd7biH CMx3d X-Google-Smtp-Source: AGHT+IFWn2ENck501y05dQtAK2sNO/VuWi5GrVwUFsBqoG42xUgLFvhu+qPJGtzxWjUXn74PILgg4w== X-Received: by 2002:a17:906:7154:b0:acf:5b21:1df4 with SMTP id a640c23a62f3a-acf5b212039mr90851066b.30.1746100087660; Thu, 01 May 2025 04:48:07 -0700 (PDT) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com. [209.85.218.45]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad0da517332sm28886366b.118.2025.05.01.04.48.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 May 2025 04:48:07 -0700 (PDT) Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-ace3b03c043so114272766b.2 for ; Thu, 01 May 2025 04:48:07 -0700 (PDT) X-Received: by 2002:a17:906:f58f:b0:ac4:5f1:a129 with SMTP id a640c23a62f3a-acedc5d0772mr726683166b.15.1746100087075; Thu, 01 May 2025 04:48:07 -0700 (PDT) MIME-Version: 1.0 From: Troy Brown Date: Thu, 1 May 2025 07:47:56 -0400 X-Gmail-Original-Message-ID: X-Gm-Features: ATxdqUEae4d61yjDwy55MklIP8a7jp2HTMc4jJPnmRib5PFBeHUtATmcZufkpHk Message-ID: Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=209.85.218.53; envelope-from=troy.s.brown@gmail.com; helo=mail-ej1-f53.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) I've been running into an issue when using the ANSI OSC compilation filters, where part way through parsing input, I'll get an "args out of range" error on the call to `put-text-property`. I believe this is because `ansi-osc-apply-on-region` uses `delete-region` and therefore the buffer can shrink from its original size. Due to this shrinking, the use of "end", in the call to `put-text-property` can reside outside the current bounds of the buffer, causing the error. Looking at similar functionality in `ansi-color-apply-on-region`, I noticed that it creates a marker for "end" at the beginning of the function, avoiding this problem. I believe the ANSI OSC package should use a similar approach and create a marker for "end". It's also likely that a marker should be used in other functions within the package, such as `ansi-osc-filter-region`, although `re-search-forward` doesn't seem to be susceptible to the range issue that `put-text-property` is. Currently, I use the following advice to workaround the problem by ensuring that "end" is a marker before calling the original function: ```emacs (defun init.el/advice/ansi-osc-apply-on-region (oldfun &rest r) (let ((start (car r)) (end (cadr r))) (funcall oldfun start (copy-marker end)))) (advice-add 'ansi-osc-apply-on-region :around #'init.el/advice/ansi-osc-apply-on-region) ``` From unknown Tue Jun 17 22:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#78184: 30.0.93; ansi-osc-apply-on-region should use end marker Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 May 2025 09:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78184 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Troy Brown , Matthias Meulien Cc: 78184@debbugs.gnu.org Received: via spool by 78184-submit@debbugs.gnu.org id=B78184.17462656242950 (code B ref 78184); Sat, 03 May 2025 09:48:02 +0000 Received: (at 78184) by debbugs.gnu.org; 3 May 2025 09:47:04 +0000 Received: from localhost ([127.0.0.1]:38351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uB9SZ-0000lW-UF for submit@debbugs.gnu.org; Sat, 03 May 2025 05:47:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51426) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uB9SX-0000l0-3O for 78184@debbugs.gnu.org; Sat, 03 May 2025 05:47:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uB9SR-000073-9Z; Sat, 03 May 2025 05:46:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=jFhZoSV6j1M8so/2fS4MAEsk56hIsheQLc8JRuj2IoI=; b=PlWNZcPddSxC RtNN5jt9QJ+Irstt7AM48onDuRyYKn2ERwniaCQ0U4hTzWTeZyCtLTpOZwdNpN4ok3bqWT4fR9+lM BJJibe43bnC0PJhiNcZIiIb0T31TNvUfQlryj5Ovx47cIizD29mOwhQmr8v1YO0Tx7G0TUXecEnb+ trA/uso/NBJq23tqK9aI0YA4ESTTnjRuq0ZjCQT0yOwewC+f22hj3D/bnocmNr0ZKsyAwN3DHHpEn AusR0Pp5/tueQxnGm8Z7LuAAwLS7lx67/1QRUPxJZKPCHKYQULpGfKoVPRWQeTII+m+01Ae+fyHoP cTZ+zeZwxHJXk55HAOfWEw==; Date: Sat, 03 May 2025 12:46:53 +0300 Message-Id: <86h622jab6.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (bug-gnu-emacs@gnu.org) References: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Thu, 1 May 2025 07:47:56 -0400 > From: Troy Brown via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > I've been running into an issue when using the ANSI OSC compilation > filters, where part way through parsing input, I'll get an "args out > of range" error on the call to `put-text-property`. I believe this is > because `ansi-osc-apply-on-region` uses `delete-region` and therefore > the buffer can shrink from its original size. Due to this shrinking, > the use of "end", in the call to `put-text-property` can reside > outside the current bounds of the buffer, causing the error. > > Looking at similar functionality in `ansi-color-apply-on-region`, I > noticed that it creates a marker for "end" at the beginning of the > function, avoiding this problem. I believe the ANSI OSC package > should use a similar approach and create a marker for "end". It's > also likely that a marker should be used in other functions within the > package, such as `ansi-osc-filter-region`, although > `re-search-forward` doesn't seem to be susceptible to the range issue > that `put-text-property` is. > > Currently, I use the following advice to workaround the problem by > ensuring that "end" is a marker before calling the original function: > > ```emacs > (defun init.el/advice/ansi-osc-apply-on-region (oldfun &rest r) > (let ((start (car r)) > (end (cadr r))) > (funcall oldfun start (copy-marker end)))) > (advice-add 'ansi-osc-apply-on-region :around > #'init.el/advice/ansi-osc-apply-on-region) > ``` Matthias, any comments on this? From unknown Tue Jun 17 22:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#78184: 30.0.93; ansi-osc-apply-on-region should use end marker Resent-From: Matthias Meulien Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 May 2025 19:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78184 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Troy Brown , 78184@debbugs.gnu.org Received: via spool by 78184-submit@debbugs.gnu.org id=B78184.174647408720941 (code B ref 78184); Mon, 05 May 2025 19:42:01 +0000 Received: (at 78184) by debbugs.gnu.org; 5 May 2025 19:41:27 +0000 Received: from localhost ([127.0.0.1]:43269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uC1gs-0005Rf-Fi for submit@debbugs.gnu.org; Mon, 05 May 2025 15:41:26 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:57731) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uC1gp-0005RA-Ic for 78184@debbugs.gnu.org; Mon, 05 May 2025 15:41:24 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-ac25520a289so821669566b.3 for <78184@debbugs.gnu.org>; Mon, 05 May 2025 12:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746474077; x=1747078877; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=mj/QhLtAANLKC+a4QH2XyiXTJKsngRYJx22hrBP0ZTU=; b=i8dJlafr2UYcVV815hyak9Srkcmk1lfgK+OiPWWuJTHGF2IROA+zyeLM1+Cd6YQK/4 bUeg2kpJzVPpWhfM17u1zfBUuFkA7E4C10K6aBSHZ4GgXdvdIWo4yD+BLB9+n5LwrQnw oi5gGqI++2rjvrOlqaDYybam9Izt+/BNhE5YYewPplzO6HEZhK1uWl+z4OK40ym95CH/ 2gnMmUtKP0DH+SVMH0JqwrtFJLzOKbTPSRqJqHO1H1Zyr+cGEGnYdqmz8hIAfjziSLKw zh7b8Fxk7QQmk+xQO3HojObXjXeunjNWfODmz5SP+aN3+45cLOkT97ly0+AH5H6H8Qoh X9UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746474077; x=1747078877; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mj/QhLtAANLKC+a4QH2XyiXTJKsngRYJx22hrBP0ZTU=; b=ak3otfNCGcCzUFzLnRf9vMRs9te69FgskeeNWF0AOmGzedZI/fBmJF2dTINImHds6h xJxyE1Vp3US1qJ+xsbraQYH5XtxlOZvhSpa3+crC9eO9SjVbGDu3L84+uyxsr121G/so /6cETjiDtnXNHOADSGRVu8LuJJr91UdITKqi4IsExSzftc49ZxJZewU3JvfUr84U4vPf hNeWwFzfdclNiJlUB4cchDQIqoI1TLX9hGMg7b2SIxbuo4oFtSHXXwjKy1qOEk1khmbm IuMQcaTvpBFiVYEGXY9UJLmlDU3kDirqmbW46FPW0nEm8k96nsLGAB/W3d4exJM59uxA W3CA== X-Forwarded-Encrypted: i=1; AJvYcCXn+vp0xnsB/YD0ft1ZtYRSqg7Poo+Lo6u4dhRd+j65/kxUc/I1rHpIlFdaqaS2Dldr3O3Vxw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxrkH7xg2Sm049vE4aOYpVHWEDBTeI+APyJtjFVJGjyTaQXRLEs It9ADiQrj/vDxY5o55VNnwaHR2/vHbWBGM1QkzHreQSnifTrG3j9iyslri+h4hkVEqzRrDAYIzd XifFSJONa5Lj9FhylZjcAW8ePNU4= X-Gm-Gg: ASbGnctqqZ/3iaeJrGvK6LpJeHXcV91FMxjrxI50KJ5P99wLAWxtBCaTlEV/XArUNzC fFQOuUKnzZq0HgDJwVR43So/QXFdxsGYd3J6Mz/tPZiHJjmKEVyHGkssql4yl8ulf93K8c+yN7g QEt4P44ICfHtNH2TW0pZSOmg== X-Google-Smtp-Source: AGHT+IH4eUQWRGr5vXuFQ8y0VIMh6Y7Le3PbD+Y9No01FSlok41lwePNHAmhxwdEw9kGBdecUu2OrH9PYY6y41ZYfKs= X-Received: by 2002:a17:906:c144:b0:ace:8003:6a6 with SMTP id a640c23a62f3a-ad1a4896725mr778151966b.6.1746474076934; Mon, 05 May 2025 12:41:16 -0700 (PDT) MIME-Version: 1.0 References: <86h622jab6.fsf@gnu.org> In-Reply-To: <86h622jab6.fsf@gnu.org> From: Matthias Meulien Date: Mon, 5 May 2025 21:41:06 +0200 X-Gm-Features: ATxdqUFJZ2Gk37tM6ZR4XPy5TpLsr1UToV4AFgg8sTGLsniIEA0re2O5WE2Cf7o Message-ID: Content-Type: multipart/alternative; boundary="000000000000f7168e063468aef6" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000f7168e063468aef6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'll have a look at the end of the week. Le sam. 3 mai 2025 =C3=A0 11:46, Eli Zaretskii a =C3=A9crit = : > > Date: Thu, 1 May 2025 07:47:56 -0400 > > From: Troy Brown via "Bug reports for GNU Emacs, > > the Swiss army knife of text editors" > > > > I've been running into an issue when using the ANSI OSC compilation > > filters, where part way through parsing input, I'll get an "args out > > of range" error on the call to `put-text-property`. I believe this is > > because `ansi-osc-apply-on-region` uses `delete-region` and therefore > > the buffer can shrink from its original size. Due to this shrinking, > > the use of "end", in the call to `put-text-property` can reside > > outside the current bounds of the buffer, causing the error. > > > > Looking at similar functionality in `ansi-color-apply-on-region`, I > > noticed that it creates a marker for "end" at the beginning of the > > function, avoiding this problem. I believe the ANSI OSC package > > should use a similar approach and create a marker for "end". It's > > also likely that a marker should be used in other functions within the > > package, such as `ansi-osc-filter-region`, although > > `re-search-forward` doesn't seem to be susceptible to the range issue > > that `put-text-property` is. > > > > Currently, I use the following advice to workaround the problem by > > ensuring that "end" is a marker before calling the original function: > > > > ```emacs > > (defun init.el/advice/ansi-osc-apply-on-region (oldfun &rest r) > > (let ((start (car r)) > > (end (cadr r))) > > (funcall oldfun start (copy-marker end)))) > > (advice-add 'ansi-osc-apply-on-region :around > > #'init.el/advice/ansi-osc-apply-on-region) > > ``` > > Matthias, any comments on this? > --=20 Matthias --000000000000f7168e063468aef6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'll have a look at the end of the week.

=
Le=C2=A0sam. 3 mai 2025 =C3=A0=C2=A011:46, Eli Zaretskii <eliz@gnu.org> a =C3=A9crit=C2=A0:
<= /div>
> Date: Thu, 1 Ma= y 2025 07:47:56 -0400
> From:=C2=A0 Troy Brown via "Bug reports for GNU Emacs,
>=C2=A0 the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> I've been running into an issue when using the ANSI OSC compilatio= n
> filters, where part way through parsing input, I'll get an "a= rgs out
> of range" error on the call to `put-text-property`.=C2=A0 I belie= ve this is
> because `ansi-osc-apply-on-region` uses `delete-region` and therefore<= br> > the buffer can shrink from its original size.=C2=A0 Due to this shrink= ing,
> the use of "end", in the call to `put-text-property` can res= ide
> outside the current bounds of the buffer, causing the error.
>
> Looking at similar functionality in `ansi-color-apply-on-region`, I > noticed that it creates a marker for "end" at the beginning = of the
> function, avoiding this problem.=C2=A0 I believe the ANSI OSC package<= br> > should use a similar approach and create a marker for "end".= =C2=A0 It's
> also likely that a marker should be used in other functions within the=
> package, such as `ansi-osc-filter-region`, although
> `re-search-forward` doesn't seem to be susceptible to the range is= sue
> that `put-text-property` is.
>
> Currently, I use the following advice to workaround the problem by
> ensuring that "end" is a marker before calling the original = function:
>
> ```emacs
> (defun init.el/advice/ansi-osc-apply-on-region (oldfun &rest r) >=C2=A0 =C2=A0(let ((start (car r))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(end (cadr r)))
>=C2=A0 =C2=A0 =C2=A0(funcall oldfun start (copy-marker end))))
> (advice-add 'ansi-osc-apply-on-region :around
> #'init.el/advice/ansi-osc-apply-on-region)
> ```

Matthias, any comments on this?


--
Ma= tthias
--000000000000f7168e063468aef6-- From unknown Tue Jun 17 22:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#78184: 30.0.93; ansi-osc-apply-on-region should use end marker Resent-From: Matthias Meulien Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 May 2025 15:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78184 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Troy Brown , 78184@debbugs.gnu.org Received: via spool by 78184-submit@debbugs.gnu.org id=B78184.174671720925023 (code B ref 78184); Thu, 08 May 2025 15:14:01 +0000 Received: (at 78184) by debbugs.gnu.org; 8 May 2025 15:13:29 +0000 Received: from localhost ([127.0.0.1]:58812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uD2wB-0006VW-Mw for submit@debbugs.gnu.org; Thu, 08 May 2025 11:13:28 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:60858) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uD2vt-0006Uo-8c for 78184@debbugs.gnu.org; Thu, 08 May 2025 11:13:11 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5f6222c6c4cso1716978a12.1 for <78184@debbugs.gnu.org>; Thu, 08 May 2025 08:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746717182; x=1747321982; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=5GYaNYMMcsI9vFoNpNz8mfGDoUXLRY+4RDRXH+Oa02E=; b=Kh+nLG+yKPYNSBGVJVTNvj4s5IksvpCWduwdnEyLjjJquM9atOErnCytP4axI9GcIb Jt6HuOsBw4FMDlvSStzAzBe+Vu4snl+//NhEXZtTAGeR0RFBtKrruIgT64Re6EG5WRA4 QazwifNj0qv1EKaSCwg22FxlL2p7dk9XcF7TwSQE95A9q984VJeWB0HZWU0n9DtSqPY4 Fr1xzlZB9CRJ7VoDvcH+4SH0KRw3zp9Bf4WCqCYlVVp6z+mr0u2c7QWba2A7xS8hju39 Od3VwkOYJi6dxElKINqi27sqPZofs1llID23sB+zLroAHQCUU8cIkkW61OlJ/F0v4FjK Ugmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746717182; x=1747321982; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5GYaNYMMcsI9vFoNpNz8mfGDoUXLRY+4RDRXH+Oa02E=; b=tJMEyGJovGt+R6N24I1JJpGu9AHt2bL1UJqQzf5/2CMIjQ3FVQVE314Cet7YvPBOJ2 JAAgF2WvrqvIOwK1DPpu/U2pts9cs0Mn+ry2OMJZt4L54e4yduDQ+fBaiV2X+Jz2qoFv m19HfxjYLkRw56TXrIlJZbXlkiKFYgb16KUiAPE+njWnRIn+5N4XUQLtHtNGK9CzZYJS T5znECEGWUudCXy5qSe+HlX4tq6CnOjHfeTexITNIZcNXyxgfdEQIt3mFUSUbzanCMTq RozTTXPcixcBn+B8WUDVSIPQwN2weGrCAMsuOAyXNdD/Qu4ahw+WyK82UddPag6a2/O7 4Axw== X-Forwarded-Encrypted: i=1; AJvYcCXuJSbsKndV6Amx/st4+K+88TuPLfvLOPYBl3na/Di2BjI3KpaV4zVRcV4usUU7Lp42IyZnHA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yzmq68xnY9bFGoVE9oGWt4s/Os+5JzscWMbU6tUgeqDDwpfPrb8 3V5TAh5PMHDm+zHlcJgTLZoisshsE5TYpyxLBC8ShDQKFym2T6aHsMpnuFx54OETrGIKjgK2ZKD LNsiD8gULwYhDFz1FtQgKGFpplUU= X-Gm-Gg: ASbGncthDIGSFZzr8bj/Q3pZYgHH8v0VDvedroXlKgCbXoJAKjHRWncHrcoHmJt/PuL UoxHmn7OsyJWzcvA4MDe0N0fTmgMpmguLp0xhBdcGcd2FRlwtz/p5DiU9eYTaCWHzZ1buH2y5ZG gOSZWOBdakPSIZdjy3iRzH9A== X-Google-Smtp-Source: AGHT+IGe5dVBLLHsOiWb2wOOpjM/JsmL5XA01FIC6Zs+vC6r3erbr511J44JwA4yRgAvAWouXTcs/kaVcQp6Va29JRQ= X-Received: by 2002:a05:6402:2787:b0:5ec:da2e:6f4d with SMTP id 4fb4d7f45d1cf-5fc34e9de9fmr3370896a12.18.1746717182001; Thu, 08 May 2025 08:13:02 -0700 (PDT) MIME-Version: 1.0 References: <86h622jab6.fsf@gnu.org> In-Reply-To: From: Matthias Meulien Date: Thu, 8 May 2025 17:12:50 +0200 X-Gm-Features: ATxdqUGl6HgvYIrC0ifESj6RAEHasYQL__n5UIJDKWtH2PuvkQUUUBmA3gDDTSg Message-ID: Content-Type: multipart/mixed; boundary="0000000000002838c90634a149b1" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000002838c90634a149b1 Content-Type: multipart/alternative; boundary="0000000000002838c70634a149af" --0000000000002838c70634a149af Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Troy analysis is right. I was able to reproduce. Please have a look to the attached patch. Le lun. 5 mai 2025 =C3=A0 21:41, Matthias Meulien a =C3= =A9crit : > I'll have a look at the end of the week. > > Le sam. 3 mai 2025 =C3=A0 11:46, Eli Zaretskii a =C3=A9cri= t : > >> > Date: Thu, 1 May 2025 07:47:56 -0400 >> > From: Troy Brown via "Bug reports for GNU Emacs, >> > the Swiss army knife of text editors" >> > >> > I've been running into an issue when using the ANSI OSC compilation >> > filters, where part way through parsing input, I'll get an "args out >> > of range" error on the call to `put-text-property`. I believe this is >> > because `ansi-osc-apply-on-region` uses `delete-region` and therefore >> > the buffer can shrink from its original size. Due to this shrinking, >> > the use of "end", in the call to `put-text-property` can reside >> > outside the current bounds of the buffer, causing the error. >> > >> > Looking at similar functionality in `ansi-color-apply-on-region`, I >> > noticed that it creates a marker for "end" at the beginning of the >> > function, avoiding this problem. I believe the ANSI OSC package >> > should use a similar approach and create a marker for "end". It's >> > also likely that a marker should be used in other functions within the >> > package, such as `ansi-osc-filter-region`, although >> > `re-search-forward` doesn't seem to be susceptible to the range issue >> > that `put-text-property` is. >> > >> > Currently, I use the following advice to workaround the problem by >> > ensuring that "end" is a marker before calling the original function: >> > >> > ```emacs >> > (defun init.el/advice/ansi-osc-apply-on-region (oldfun &rest r) >> > (let ((start (car r)) >> > (end (cadr r))) >> > (funcall oldfun start (copy-marker end)))) >> > (advice-add 'ansi-osc-apply-on-region :around >> > #'init.el/advice/ansi-osc-apply-on-region) >> > ``` >> >> Matthias, any comments on this? >> > > > -- > Matthias > --=20 Matthias --0000000000002838c70634a149af Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Troy analysis is right.=C2=A0 I was able to reproduce= .=C2=A0 Please have a look to the attached patch.
Le=C2=A0lun. 5 mai 2025 =C3=A0=C2=A021:41, Matthias Meulien &l= t;orontee@gmail.com> a =C3=A9cr= it=C2=A0:
I'll have a look at the end of the week.

Le=C2=A0sam. 3 m= ai 2025 =C3=A0=C2=A011:46, Eli Zaretskii <eliz@gnu.org> a =C3=A9crit=C2=A0:
> Date: Thu, 1 May 2025 07:= 47:56 -0400
> From:=C2=A0 Troy Brown via "Bug reports for GNU Emacs,
>=C2=A0 the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> I've been running into an issue when using the ANSI OSC compilatio= n
> filters, where part way through parsing input, I'll get an "a= rgs out
> of range" error on the call to `put-text-property`.=C2=A0 I belie= ve this is
> because `ansi-osc-apply-on-region` uses `delete-region` and therefore<= br> > the buffer can shrink from its original size.=C2=A0 Due to this shrink= ing,
> the use of "end", in the call to `put-text-property` can res= ide
> outside the current bounds of the buffer, causing the error.
>
> Looking at similar functionality in `ansi-color-apply-on-region`, I > noticed that it creates a marker for "end" at the beginning = of the
> function, avoiding this problem.=C2=A0 I believe the ANSI OSC package<= br> > should use a similar approach and create a marker for "end".= =C2=A0 It's
> also likely that a marker should be used in other functions within the=
> package, such as `ansi-osc-filter-region`, although
> `re-search-forward` doesn't seem to be susceptible to the range is= sue
> that `put-text-property` is.
>
> Currently, I use the following advice to workaround the problem by
> ensuring that "end" is a marker before calling the original = function:
>
> ```emacs
> (defun init.el/advice/ansi-osc-apply-on-region (oldfun &rest r) >=C2=A0 =C2=A0(let ((start (car r))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(end (cadr r)))
>=C2=A0 =C2=A0 =C2=A0(funcall oldfun start (copy-marker end))))
> (advice-add 'ansi-osc-apply-on-region :around
> #'init.el/advice/ansi-osc-apply-on-region)
> ```

Matthias, any comments on this?


--
Ma= tthias


--
Ma= tthias
--0000000000002838c70634a149af-- --0000000000002838c90634a149b1 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-ansi-osc.el-Use-marker-bug-78184.patch" Content-Disposition: attachment; filename="0001-ansi-osc.el-Use-marker-bug-78184.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_mafi9no50 RnJvbSA3ODM4ZWFmMDg0NDU2Mzg4ZDEyOTEzOWM4NGM1NTZjMTRmZTJiZTVhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXR0aGlhcyBNZXVsaWVuIDxvcm9udGVlQGdtYWlsLmNvbT4K RGF0ZTogVGh1LCA4IE1heSAyMDI1IDE2OjUxOjQ2ICswMjAwClN1YmplY3Q6IFtQQVRDSF0gYW5z aS1vc2MuZWw6IFVzZSBtYXJrZXIgKGJ1ZyM3ODE4NCkKCiogbGlzcC9hbnNpLW9zYy5l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mUgdGhlIGVzY2FwZSBzZXF1 ZW5jZSB3YXMKLWxvY2F0ZWQuIgotICAoc2F2ZS1leGN1cnNpb24KLSAgICAoZ290by1jaGFyIChv ciBhbnNpLW9zYy0tbWFya2VyIGJlZ2luKSkKLSAgICAod2hlbiAoZXEgKGNoYXItYmVmb3JlKSA/ XGUpIChiYWNrd2FyZC1jaGFyKSkKLSAgICAod2hpbGUgKHJlLXNlYXJjaC1mb3J3YXJkICJcZV0i IGVuZCB0KQotICAgICAgKGxldCAoKHBvczAgKG1hdGNoLWJlZ2lubmluZyAwKSkKLSAgICAgICAg ICAgIChjb2RlIChhbmQgKHJlLXNlYXJjaC1mb3J3YXJkICJcXD1cXChbMC05QS1aYS16XSpcXCk7 IiBlbmQgdCkKLSAgICAgICAgICAgICAgICAgICAgICAgKG1hdGNoLXN0cmluZyAxKSkpCi0gICAg ICAgICAgICAocG9zMSAocG9pbnQpKSkKLSAgICAgICAgKGlmIChyZS1zZWFyY2gtZm9yd2FyZCAi XGFcXHxcZVxcXFwiIGVuZCB0KQotICAgICAgICAgICAgKGxldCAoKHRleHQgKGJ1ZmZlci1zdWJz dHJpbmctbm8tcHJvcGVydGllcwotICAgICAgICAgICAgICAgICAgICAgICAgIHBvczEgKG1hdGNo LWJlZ2lubmluZyAwKSkpKQotICAgICAgICAgICAgICAoc2V0cSBhbnNpLW9zYy0tbWFya2VyIG5p bCkKLSAgICAgICAgICAgICAgKGRlbGV0ZS1yZWdpb24gcG9zMCAocG9pbnQpKQotICAgICAgICAg ICAgICAod2hlbi1sZXQqICgoZnVuIChjZHIgKGFzc29jLXN0cmluZyBjb2RlIGFuc2ktb3NjLWhh bmRsZXJzKSkpKQotICAgICAgICAgICAgICAgIChmdW5jYWxsIGZ1biBjb2RlIHRleHQpKSkKLSAg ICAgICAgICAocHV0LXRleHQtcHJvcGVydHkgcG9zMCBlbmQgJ2ludmlzaWJsZSB0KQotICAgICAg ICAgIChzZXRxIGFuc2ktb3NjLS1tYXJrZXIgKGNvcHktbWFya2VyIHBvczApKSkpKSkpCitsb2Nh dGVkLiAgVW5maW5pc2hlZCBlc2NhcGUgc2VxdWVuY2VzIGFyZSBoaWRkZW4uIgorICAobGV0ICgo ZW5kLW1hcmtlciAoY29weS1tYXJrZXIgZW5kKSkpCisgICAgKHNhdmUtZXhjdXJzaW9uCisgICAg ICAoZ290by1jaGFyIChvciBhbnNpLW9zYy0tbWFya2VyIGJlZ2luKSkKKyAgICAgICh3aGVuIChl cSAoY2hhci1iZWZvcmUpID9cZSkgKGJhY2t3YXJkLWNoYXIpKQorICAgICAgKHdoaWxlIChyZS1z ZWFyY2gtZm9yd2FyZCAiXGVdIiBlbmQtbWFya2VyIHQpCisgICAgICAgIChsZXQgKChwb3MwICht YXRjaC1iZWdpbm5pbmcgMCkpCisgICAgICAgICAgICAgIChjb2RlIChhbmQKKyAgICAgICAgICAg ICAgICAgICAgIChyZS1zZWFyY2gtZm9yd2FyZCAiXFw9XFwoWzAtOUEtWmEtel0qXFwpOyIgZW5k LW1hcmtlciB0KQorICAgICAgICAgICAgICAgICAgICAgKG1hdGNoLXN0cmluZyAxKSkpCisgICAg ICAgICAgICAgIChwb3MxIChwb2ludCkpKQorICAgICAgICAgIChpZiAocmUtc2VhcmNoLWZvcndh cmQgIlxhXFx8XGVcXFxcIiBlbmQtbWFya2VyIHQpCisgICAgICAgICAgICAgIChsZXQgKCh0ZXh0 IChidWZmZXItc3Vic3RyaW5nLW5vLXByb3BlcnRpZXMKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgIHBvczEgKG1hdGNoLWJlZ2lubmluZyAwKSkpKQorICAgICAgICAgICAgICAgIChzZXRxIGFu c2ktb3NjLS1tYXJrZXIgbmlsKQorICAgICAgICAgICAgICAgIChkZWxldGUtcmVnaW9uIHBvczAg KHBvaW50KSkKKyAgICAgICAgICAgICAgICAod2hlbi1sZXQqICgoZnVuIChjZHIgKGFzc29jLXN0 cmluZyBjb2RlIGFuc2ktb3NjLWhhbmRsZXJzK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BAIC01NCw0ICs1OCwxNSBA QCBhbnNpLW9zYy10ZXN0cy1hcHBseS1yZWdpb24tbm8taGFuZGxlcnMKICAgICAgICh3aXRoLXRl bXAtYnVmZmVyCiAgICAgICAgIChpbnNlcnQgaW5wdXQpCiAgICAgICAgIChhbnNpLW9zYy1hcHBs eS1vbi1yZWdpb24gKHBvaW50LW1pbikgKHBvaW50LW1heCkpCisgICAgICAgIChzaG91bGQgKGVx dWFsCisgICAgICAgICAgICAgICAgIChidWZmZXItc3Vic3RyaW5nLW5vLXByb3BlcnRpZXMKKyAg ICAgICAgICAgICAgICAgIChwb2ludC1taW4pIChwb2ludC1tYXgpKQorICAgICAgICAgICAgICAg ICB0ZXh0KSkpKSkpCisKKyhlcnQtZGVmdGVzdCBhbnNpLW9zYy10ZXN0cy1maWx0ZXItcmVnaW9u ICgpCisgIChsZXQgKChhbnNpLW9zYy1oYW5kbGVycyBuaWwpKQorICAgIChwY2FzZS1kb2xpc3Qg KGAoLGlucHV0ICx0ZXh0KSBhbnNpLW9zYy10ZXN0cy0tc3RyaW5ncykKKyAgICAgICh3aXRoLXRl bXAtYnVmZmVyCisgICAgICAgIChpbnNlcnQgaW5wdXQpCisgICAgICAgIChhbnNpLW9zYy1maWx0 ZXItcmVnaW9uIChwb2ludC1taW4pIChwb2ludC1tYXgpKQogICAgICAgICAoc2hvdWxkIChlcXVh bCAoYnVmZmVyLXN0cmluZykgdGV4dCkpKSkpKQotLSAKMi4zOS41Cgo= --0000000000002838c90634a149b1-- From unknown Tue Jun 17 22:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#78184: 30.0.93; ansi-osc-apply-on-region should use end marker Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 May 2025 10:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78184 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: brownts@troybrown.dev, Matthias Meulien Cc: 78184@debbugs.gnu.org Received: via spool by 78184-submit@debbugs.gnu.org id=B78184.174687434318253 (code B ref 78184); Sat, 10 May 2025 10:53:01 +0000 Received: (at 78184) by debbugs.gnu.org; 10 May 2025 10:52:23 +0000 Received: from localhost ([127.0.0.1]:44434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uDhoc-0004kI-G8 for submit@debbugs.gnu.org; Sat, 10 May 2025 06:52:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54540) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uDhoa-0004k5-LM for 78184@debbugs.gnu.org; Sat, 10 May 2025 06:52:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uDhoU-0001St-NG; Sat, 10 May 2025 06:52:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ePQFPqgvoNFh5W9GR9Nw/slYr4+AlmrZf8GrUVkSvyk=; b=pItZJODEcTD4j/4fD7lw y3LETjdqfeREC/YipoMXrPxVCWymX8B/nggl3s1bHySVFikutaYTu472sEpvvn1XcjMS3km0yjWay HDJsnk7KW48LoRMZ5Gdq21FRGyRhSFeW4eISlGy4uPUaqgxAUoCGjLy9ionT/5EzMgubn5+xpd72Q eCVgxAgBz8/9w+0PxsHh/yYOpbXUevxiSlBOCRJ8ChwZV6NFMkXMyBf3IAEhsQdD6Dk+DBVwUqk4t 6CuHrz6JeKQ/Ipqwd/ASiSspucWwFQxcsmEfVHaqAKA64itlj6OFvDGQusf6CcXjr+s8n9vM2kxw9 Z26ihJWsmE+4Ew==; Date: Sat, 10 May 2025 13:52:12 +0300 Message-Id: <865xi8agbn.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Matthias Meulien on Thu, 8 May 2025 17:12:50 +0200) References: <86h622jab6.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Matthias Meulien > Date: Thu, 8 May 2025 17:12:50 +0200 > Cc: Troy Brown , 78184@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? > Le lun. 5 mai 2025 à 21:41, Matthias Meulien a écrit : > > I'll have a look at the end of the week. > > Le sam. 3 mai 2025 à 11:46, Eli Zaretskii a écrit : > > > Date: Thu, 1 May 2025 07:47:56 -0400 > > From: Troy Brown via "Bug reports for GNU Emacs, > > the Swiss army knife of text editors" > > > > I've been running into an issue when using the ANSI OSC compilation > > filters, where part way through parsing input, I'll get an "args out > > of range" error on the call to `put-text-property`. I believe this is > > because `ansi-osc-apply-on-region` uses `delete-region` and therefore > > the buffer can shrink from its original size. Due to this shrinking, > > the use of "end", in the call to `put-text-property` can reside > > outside the current bounds of the buffer, causing the error. > > > > Looking at similar functionality in `ansi-color-apply-on-region`, I > > noticed that it creates a marker for "end" at the beginning of the > > function, avoiding this problem. I believe the ANSI OSC package > > should use a similar approach and create a marker for "end". It's > > also likely that a marker should be used in other functions within the > > package, such as `ansi-osc-filter-region`, although > > `re-search-forward` doesn't seem to be susceptible to the range issue > > that `put-text-property` is. > > > > Currently, I use the following advice to workaround the problem by > > ensuring that "end" is a marker before calling the original function: > > > > ```emacs > > (defun init.el/advice/ansi-osc-apply-on-region (oldfun &rest r) > > (let ((start (car r)) > > (end (cadr r))) > > (funcall oldfun start (copy-marker end)))) > > (advice-add 'ansi-osc-apply-on-region :around > > #'init.el/advice/ansi-osc-apply-on-region) > > ``` > > Matthias, any comments on this? > > -- > Matthias > > -- > Matthias > > > From 7838eaf084456388d129139c84c556c14fe2be5a Mon Sep 17 00:00:00 2001 > From: Matthias Meulien > Date: Thu, 8 May 2025 16:51:46 +0200 > Subject: [PATCH] ansi-osc.el: Use marker (bug#78184) > > * lisp/ansi-osc.el (ansi-osc-apply-on-region): Use marker to fix > possible out of range argument when hiding unfinished escape > sequence. > > * test/lisp/ansi-osc-tests.el (ansi-osc-tests--strings) > (ansi-osc-tests-apply-region-no-handlers) > (ansi-osc-tests-filter-region): Cover bug#78184. > --- > lisp/ansi-osc.el | 38 +++++++++++++++++++------------------ > test/lisp/ansi-osc-tests.el | 15 +++++++++++++++ > 2 files changed, 35 insertions(+), 18 deletions(-) > > diff --git a/lisp/ansi-osc.el b/lisp/ansi-osc.el > index 97d6f6c8754..b002b89c924 100644 > --- a/lisp/ansi-osc.el > +++ b/lisp/ansi-osc.el > @@ -70,24 +70,26 @@ ansi-osc-apply-on-region > value of the local variable `ansi-osc-handlers', that key's > value, which should be a function, is called with `command' and > `text' as arguments, with point where the escape sequence was > -located." > - (save-excursion > - (goto-char (or ansi-osc--marker begin)) > - (when (eq (char-before) ?\e) (backward-char)) > - (while (re-search-forward "\e]" end t) > - (let ((pos0 (match-beginning 0)) > - (code (and (re-search-forward "\\=\\([0-9A-Za-z]*\\);" end t) > - (match-string 1))) > - (pos1 (point))) > - (if (re-search-forward "\a\\|\e\\\\" end t) > - (let ((text (buffer-substring-no-properties > - pos1 (match-beginning 0)))) > - (setq ansi-osc--marker nil) > - (delete-region pos0 (point)) > - (when-let* ((fun (cdr (assoc-string code ansi-osc-handlers)))) > - (funcall fun code text))) > - (put-text-property pos0 end 'invisible t) > - (setq ansi-osc--marker (copy-marker pos0))))))) > +located. Unfinished escape sequences are hidden." > + (let ((end-marker (copy-marker end))) > + (save-excursion > + (goto-char (or ansi-osc--marker begin)) > + (when (eq (char-before) ?\e) (backward-char)) > + (while (re-search-forward "\e]" end-marker t) > + (let ((pos0 (match-beginning 0)) > + (code (and > + (re-search-forward "\\=\\([0-9A-Za-z]*\\);" end-marker t) > + (match-string 1))) > + (pos1 (point))) > + (if (re-search-forward "\a\\|\e\\\\" end-marker t) > + (let ((text (buffer-substring-no-properties > + pos1 (match-beginning 0)))) > + (setq ansi-osc--marker nil) > + (delete-region pos0 (point)) > + (when-let* ((fun (cdr (assoc-string code ansi-osc-handlers)))) > + (funcall fun code text))) > + (put-text-property pos0 end-marker 'invisible t) > + (setq ansi-osc--marker (copy-marker pos0)))))))) > > ;; Window title handling (OSC 2) > > diff --git a/test/lisp/ansi-osc-tests.el b/test/lisp/ansi-osc-tests.el > index d2fb130e518..28cf8f41d59 100644 > --- a/test/lisp/ansi-osc-tests.el > +++ b/test/lisp/ansi-osc-tests.el > @@ -44,6 +44,10 @@ ansi-osc-tests--strings > > ;; hyperlink > ("\e]8;;http://example.com\e\\This is a link\e]8;;\e\\" "This is a link") > + > + ;; multiple sequences > + ("Escape \e]2;A window title\e\\sequence followed by \e]2;unfinished sequence" > + "Escape sequence followed by \e]2;unfinished sequence") > )) > ;; Don't output those strings to stdout since they may have > ;; side-effects on the environment > @@ -54,4 +58,15 @@ ansi-osc-tests-apply-region-no-handlers > (with-temp-buffer > (insert input) > (ansi-osc-apply-on-region (point-min) (point-max)) > + (should (equal > + (buffer-substring-no-properties > + (point-min) (point-max)) > + text)))))) > + > +(ert-deftest ansi-osc-tests-filter-region () > + (let ((ansi-osc-handlers nil)) > + (pcase-dolist (`(,input ,text) ansi-osc-tests--strings) > + (with-temp-buffer > + (insert input) > + (ansi-osc-filter-region (point-min) (point-max)) > (should (equal (buffer-string) text)))))) > -- > 2.39.5 > From unknown Tue Jun 17 22:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#78184: 30.0.93; ansi-osc-apply-on-region should use end marker Resent-From: Troy Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 May 2025 22:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78184 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Matthias Meulien , 78184@debbugs.gnu.org Received: via spool by 78184-submit@debbugs.gnu.org id=B78184.174708916124092 (code B ref 78184); Mon, 12 May 2025 22:33:01 +0000 Received: (at 78184) by debbugs.gnu.org; 12 May 2025 22:32:41 +0000 Received: from localhost ([127.0.0.1]:55676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uEbhR-0006GW-6z for submit@debbugs.gnu.org; Mon, 12 May 2025 18:32:41 -0400 Received: from mail-ej1-f41.google.com ([209.85.218.41]:58523) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uEbhH-0006G0-NA for 78184@debbugs.gnu.org; Mon, 12 May 2025 18:32:33 -0400 Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-ad24ee085a8so276528266b.0 for <78184@debbugs.gnu.org>; Mon, 12 May 2025 15:32:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747089145; x=1747693945; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZxunWAtmE1HaGgwmcn9pI0VDnDK2tb+JGZGbdJEq3rw=; b=Mw5KdGGQSccQGJWNnWKCDp5frRIFRLOWkPXaIyQSN5RP4rmgoFz07m0NRTQ3ESZkIK PtUbAwnyMw0ZDq5ozMKv+EYjV9Ivhst3sfxNSrKiHkfAhhBqhxMG0TYEKUNrGCgUZTcN uaQYU314aQG39edL+fUosFhqD7aA8Xa5w0bxYy8cSv3kgogdC/cnG9Aa5chNsZ2Sn/3C l4K3ILLfpHwgslBmu92LGFS4CiSfPVxVZGoh6jBI+jV/2ljxfymyqr7rzP7C7F0tyS+s LUh/8sXVeksCwreSb3zNnR/FdDF7ujAlsGcBhDK8cq7ehysL1EB8eODF7tDWykT9QhXb +rRw== X-Forwarded-Encrypted: i=1; AJvYcCWcOPG2DNdYtwCmR0jQ8a2LuXPdy+Ua57dSeREYF2frQ//bgeoLcmocwNo/RgtI8YCENlieDQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyCxznFQTI7uaR+PGMR2ra1kFJaJM1f/S8Usnd6WwklOYUGU/s1 ClYP/zV8dQGSRLCKdNHxzxKlFcc5c7os4g7KzRRcDWRZGtXFaIKHvYPpRQ637VQ= X-Gm-Gg: ASbGncsuwhJNakYXXcRyT4HC2hDX14yuL4LjRe9BJ2RD7AA+NczJHK9ysMIIwNUN32M yqams+w6JqNeNNMlBFx8oLzXoKp7fOd1lgXugWMGs0WZuLNTGk3N/ZH4FSxCfRWHbx9WF4gnmbs htNML9NmVv1HWXoBJRjnjMerT177SnrD2YAb/E31aGvSDUv5fvfTI4qm/QSRw2XtZ1Y0CQiAqMh GLxaPuZJ9q9f0zypZRYD16euNZJplGjCxuNUn8zh8x4QY7GQwV8DrWDHyTxx7sAcSVdshT4klmy Re5gy5Lm6NPpK02LxqczxcQo9QnAkSHRFQzV2ZaMlmvJxV1TF7UMhrOixOBAsWZ9C9cLKghHbTx 3PsXRRi46cpltq38= X-Google-Smtp-Source: AGHT+IGUuckGG9/+3oL65stm+Sfdq676OAaaOhGfvTCZTsaEfV58DG6cQ5BrUSFfQ/IbXagbw/dGIg== X-Received: by 2002:a17:907:cb83:b0:ad2:321d:2726 with SMTP id a640c23a62f3a-ad2321d2b5amr1145686366b.38.1747089144934; Mon, 12 May 2025 15:32:24 -0700 (PDT) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com. [209.85.208.49]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad21933bec1sm672892066b.45.2025.05.12.15.32.24 for <78184@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 May 2025 15:32:24 -0700 (PDT) Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-5fbf0324faaso10314256a12.1 for <78184@debbugs.gnu.org>; Mon, 12 May 2025 15:32:24 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUmVhqQxpqmL5+ZHECzCbrQGPdEwdK5dZKpAUqyH2RCnLdyo5OByIL3SFuxT7IO2zOi42r3Fw==@debbugs.gnu.org X-Received: by 2002:a17:907:a28c:b0:ad2:2fe0:6310 with SMTP id a640c23a62f3a-ad22fe06b54mr974778466b.57.1747089144168; Mon, 12 May 2025 15:32:24 -0700 (PDT) MIME-Version: 1.0 References: <86h622jab6.fsf@gnu.org> <865xi8agbn.fsf@gnu.org> In-Reply-To: <865xi8agbn.fsf@gnu.org> From: Troy Brown Date: Mon, 12 May 2025 18:32:13 -0400 X-Gmail-Original-Message-ID: X-Gm-Features: AX0GCFt5VYfEzdUEHZbbfJU9V9yO3ReTXLLqQxRIxrJWao83uWCqxRQlg_o-1PM Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, May 10, 2025 at 6:52=E2=80=AFAM Eli Zaretskii wrote: > > > From: Matthias Meulien > > Date: Thu, 8 May 2025 17:12:50 +0200 > > Cc: Troy Brown , 78184@debbugs.gnu.org > > > > Troy analysis is right. I was able to reproduce. Please have a look t= o 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`. From unknown Tue Jun 17 22:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#78184: 30.0.93; ansi-osc-apply-on-region should use end marker Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 May 2025 09:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78184 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: orontee@gmail.com, Troy Brown Cc: 78184@debbugs.gnu.org Received: via spool by 78184-submit@debbugs.gnu.org id=B78184.174807741828216 (code B ref 78184); Sat, 24 May 2025 09:04:02 +0000 Received: (at 78184) by debbugs.gnu.org; 24 May 2025 09:03:38 +0000 Received: from localhost ([127.0.0.1]:56929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uIkn3-0007Kx-G3 for submit@debbugs.gnu.org; Sat, 24 May 2025 05:03:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36992) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uIkn0-0007KP-Lp for 78184@debbugs.gnu.org; Sat, 24 May 2025 05:03:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uIkmu-0000AZ-RA; Sat, 24 May 2025 05:03:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=YMxy53oWWGuwjePGZhwpz4TCaZND4sx7zqXY/dOIYeQ=; b=NPBsOVR5dMvj7vS/yBU9 RAzAnoklJzjbwmojWOJFoy0TdiXRh4E7UMIYTg34gc9+EFhUlBWaibLMc41zJAM8XRkqKiEGRyTYf 8t9YfR2FWJNllbrHDfTegEDQftvbki2McD7vXPkysOHBV9Use0R8QK+19CPnZOTBR/Q3SzjqNsTvO LH6VBupO6RSypHiKNsOaJFKMq1O4JODueQB77ZBbxrcfKW3tqHgAQC1czkhNKjlxoUcB0uNj/SIhg MUbLtNqa3glTw0eYND67aaReprctUMgRakoehOhW4rabwO65PZdp2SeFHIdHAsMXKli/BWTJy29v9 JdQFjNqsx3UBWQ==; Date: Sat, 24 May 2025 12:03:26 +0300 Message-Id: <86zff21iu9.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Troy Brown on Mon, 12 May 2025 18:32:13 -0400) References: <86h622jab6.fsf@gnu.org> <865xi8agbn.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Troy Brown > Date: Mon, 12 May 2025 18:32:13 -0400 > Cc: Matthias Meulien , 78184@debbugs.gnu.org > > On Sat, May 10, 2025 at 6:52 AM Eli Zaretskii wrote: > > > > > From: Matthias Meulien > > > Date: Thu, 8 May 2025 17:12:50 +0200 > > > Cc: Troy Brown , 78184@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? From unknown Tue Jun 17 22:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#78184: 30.0.93; ansi-osc-apply-on-region should use end marker Resent-From: Matthias Meulien Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 May 2025 09:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78184 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Troy Brown , 78184@debbugs.gnu.org Received: via spool by 78184-submit@debbugs.gnu.org id=B78184.174807828432513 (code B ref 78184); Sat, 24 May 2025 09:19:02 +0000 Received: (at 78184) by debbugs.gnu.org; 24 May 2025 09:18:04 +0000 Received: from localhost ([127.0.0.1]:57063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uIl0z-0008Rs-PJ for submit@debbugs.gnu.org; Sat, 24 May 2025 05:18:03 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]:60446) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uIl0s-0008RA-O4 for 78184@debbugs.gnu.org; Sat, 24 May 2025 05:17:55 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-ad5740dd20eso90434566b.0 for <78184@debbugs.gnu.org>; Sat, 24 May 2025 02:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748078268; x=1748683068; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Ge3nqXyR5A0AZr2XVXAkiy0z2TQi/z2Y9dc/LHTyOU8=; b=ccnK0MSw5q7XmHLTlZE3vjF/JpTgjQiriiJET0sUI3DeA2OjhHfDiGwNRkOIKdgFbp yXxrM/+kTv+ub9bVkpGaCdP37h7QFfG0DI/WT1Vzzp7kri1gt3SGT5sJhV/2ETsSJln9 tyYEeAFGcxKb550tvJmM0fK3BPSbonq2JQ3eTsyj3CYs3WPyUbnvRRoD5ELyR0u2Og6f ywqHBrfxDBfuUzAatumToGbNjbxQZ7dUtRvuCKHjwWoFNRurSbUOt0LPOYm3BNkesQSP BIOBtTJgmvjeeDX6U6seztN1nIX8+9nzDk6n1PNqObAdkm0MN8E3mS5Dc9z13KKoNEQo clWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748078268; x=1748683068; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ge3nqXyR5A0AZr2XVXAkiy0z2TQi/z2Y9dc/LHTyOU8=; b=qT2H+hMEYh9HUfNHCDWnm2z/0LV8cPKjJz3UAbc0UlU2BX+bU+0ZzjMRh0wAfog9mi WuGF3+qXLYd8pHhzimi3Wre6Rb/meepGYvzXWSQTsK5wgNw+ErPasrAFdCG7sQ3XZBt5 41Cda1zgJMWGLfGo1LilPT1j244jWEVrxGXj5YAtSvMpL9bwu9P3DnwzMPoFB1UyMrey sm/ktb9mbhxfC74nUcytzbe3G8koI00or3YAc5c0e3cdyhma5OTyN2xdjqV8ONJ6vvJh ea+eK7t6z/dF7VFjnhHd2qIgBo42M379Th2E6dQ7dIpqXj5jkN34lmxKu0Q6ye3nsn57 UXZA== X-Forwarded-Encrypted: i=1; AJvYcCWWvHebx+OyePYOTjrva+z3vnmKy1y5p2P/DR2YVNHv+36N1aKEN8800xvKSw7qBvk9GSap/Q==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwFHG8wF1oBreLZ6z7cH6S9AbGcpWKcL8NQ1/vPhAO9oc7jvFsl 8WAGYx+SKfBMGHN/SWJUChg9jxCrEMpeXVQtV5qPQH9nxzibwG4H99/c53o6ERoAzi2vvTKbobw nPb624Lh5H0bjTxnXs8pSg99f/924RZo= X-Gm-Gg: ASbGnctQUBSx0Uw77BrfE3KnY3TU7kkeLdkyYNIsO7OZMK1qCZ8ZHPPlbhg2g0j4QTK M7vdaNmCU+/H3Dq+iRfduj/3z/FHpXDzc5ZcucRk9ybzhqWVHZHux+Bi8g0bvKGzXHJePjwZY19 81Td14JOzTUsDGgy5746Br3F8D0sxG8u3MWVN6+xcVgHbK11rUoU5vhUUYcYFiu1A6PqM= X-Google-Smtp-Source: AGHT+IHH7YugTQt0+4uf0qs6VMbGnV8mBCaGsAtfgOBsOj4MDEelgL/O+oEGgizMcjx927uyel3jV3UFUAQvxG2V0Ow= X-Received: by 2002:a17:906:f595:b0:ad5:6ca3:c795 with SMTP id a640c23a62f3a-ad85b12063dmr155711266b.33.1748078268266; Sat, 24 May 2025 02:17:48 -0700 (PDT) MIME-Version: 1.0 References: <86h622jab6.fsf@gnu.org> <865xi8agbn.fsf@gnu.org> <86zff21iu9.fsf@gnu.org> In-Reply-To: <86zff21iu9.fsf@gnu.org> From: Matthias Meulien Date: Sat, 24 May 2025 11:17:30 +0200 X-Gm-Features: AX0GCFuKOgLvvhiCiXkXkbFFZD9WJ4P1lOcyJecF5_w8pF9FuHqhZBzuYBPi6X4 Message-ID: Content-Type: multipart/alternative; boundary="000000000000383de70635de3054" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000383de70635de3054 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Strange, I did not receive last Troy email. Give me a few days to see his feedbacks. Le sam. 24 mai 2025 =C3=A0 11:03, Eli Zaretskii a =C3=A9crit= : > > From: Troy Brown > > Date: Mon, 12 May 2025 18:32:13 -0400 > > Cc: Matthias Meulien , 78184@debbugs.gnu.org > > > > On Sat, May 10, 2025 at 6:52=E2=80=AFAM Eli Zaretskii wr= ote: > > > > > > > From: Matthias Meulien > > > > Date: Thu, 8 May 2025 17:12:50 +0200 > > > > Cc: Troy Brown , 78184@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? > --=20 Matthias --000000000000383de70635de3054 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Strange, I did not receive last Troy email. Give me a few = days to see his feedbacks.

Le=C2=A0sam. 24 mai 202= 5 =C3=A0=C2=A011:03, Eli Zaretskii <eliz= @gnu.org> a =C3=A9crit=C2=A0:
> From: Troy Brown <brownts@troybrown.dev>
> Date: Mon, 12 May 2025 18:32:13 -0400
> Cc: Matthias Meulien <orontee@gmail.com>, 78184@debbugs.gnu.org
>
> On Sat, May 10, 2025 at 6:52=E2=80=AFAM Eli Zaretskii <eliz@gnu.org> wrote:
> >
> > > From: Matthias Meulien <orontee@gmail.com>
> > > Date: Thu, 8 May 2025 17:12:50 +0200
> > > Cc: Troy Brown <brownts@troybrown.dev>, 78184@debbugs.gnu.org
> > >
> > > Troy analysis is right.=C2=A0 I was able to reproduce.=C2=A0= Please have a look to the attached patch.
> >
> > Thanks.=C2=A0 Troy, could you please try the patch and report? >
> Yes, I can confirm that this patch addresses the issue I'm seeing.= =C2=A0 It
> appears the patch was for the master branch, so that is where I
> applied and tested it.=C2=A0 I assume this change would also be merged= into
> the Emacs 30 branch.
>
> I did have a couple notes.=C2=A0 I believe an end marker should also b= e
> used in `ansi-osc-filter-region` to honor the original bounds passed > into the function, since it also calls `delete-region`.=C2=A0 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 "fragm= ents"
> (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.=C2=A0 Therefore if an O= SC
> control sequence overlapped the supplied bounds, I don't think it<= br> > would be filtered out on the next call to `ansi-osc-filter-region`.
Thanks.=C2=A0 Matthias, any further comments or changes to the patch?


--
Ma= tthias
--000000000000383de70635de3054-- From unknown Tue Jun 17 22:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#78184: 30.0.93; ansi-osc-apply-on-region should use end marker Resent-From: Matthias Meulien Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 May 2025 15:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78184 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Troy Brown , 78184@debbugs.gnu.org Received: via spool by 78184-submit@debbugs.gnu.org id=B78184.174810034516547 (code B ref 78184); Sat, 24 May 2025 15:26:02 +0000 Received: (at 78184) by debbugs.gnu.org; 24 May 2025 15:25:45 +0000 Received: from localhost ([127.0.0.1]:33804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uIqkp-0004Ig-O9 for submit@debbugs.gnu.org; Sat, 24 May 2025 11:25:45 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:56401) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uIqkm-0004Hs-QD for 78184@debbugs.gnu.org; Sat, 24 May 2025 11:25:42 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-ad56cbc7b07so114498666b.0 for <78184@debbugs.gnu.org>; Sat, 24 May 2025 08:25:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748100335; x=1748705135; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=OlbryA6a8x/zmkSyzVfzC+OQN8fLXGW3jS1ndOJmRis=; b=H+g9kwgwENOG1Nk2VhZWNrDpPRXwrnCIdO1QWmjUpQp5SzlC2s2KDsDHgSiNRdVKh6 63WlKGXrJALN1bxmvJTHPPDArFrZPY92GtSuOYyMbIZ/Kl+YJPvdnh/NjV+jNzIHjPhQ dBV0f5+FMnnkgYtH9oIVeE1fCbXOytqUrh8Tm+0ZJ3IQTREFHgI1sZc1xbC3HSr7yDq4 5VCG0U2bKgCTw+BzvCMnh+TCw8i/QY7ceKTT6UUAOl4j0DxUuXKzOjLWEjXc+MANT6Ya Qs9oaeYXPrVUlcJPHiiUDvNdYC/YGBwSCaPxekYEn6H6m6GMKDRPsY7wUfMT5Cas4uw7 HIOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748100335; x=1748705135; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OlbryA6a8x/zmkSyzVfzC+OQN8fLXGW3jS1ndOJmRis=; b=gXQmbTxjvJbGb8a4qLz5f/ca37TwxvvGAdC6T9QWaKOxRyEBniRjeBUIinUllB4kNz 5lTmfJiMTgol6Ax3abmRxFb0n0sns2hfMKTUqmKVz8ey7ov5PBBNDPjuaQUataM3MmSW Fa6DmMRhAKzpTe3/W4Dx/8SwNCaCDXXs5eVG04PUkeFzY5V9H1zUfJ9IP6LDsPTCnTNP bhTNUv0MxUu3IfhaP+RS02AvlkEIWCBvp9//k6FYhSY2RLZEAj41hcFccHQoBp62uLAi qlY0fowqIZWTeXUzuYdOreJoAL83QsdSpPtPJ1Tbse0QfAXVBKA0ZJo+SBG+zZAB3Cw1 75cQ== X-Forwarded-Encrypted: i=1; AJvYcCVGpvdvQksPlrnEq7jLehTESpfO/I92AOXFjG/NBYhsq9vOiJgvHvpSONtqiJC9L3V+GGTJ4w==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzHs4yblDaAtUn1ZzpW0kXDcXGRnIp6ygD7AuNVCacBZasmu95/ Y6pebHGWTf2c7vvm0XAcYiF5JrCsEHIC04Pu+TNZPTcAOlaulp4ta57feHJQhuZ/0hQYdN/4qF/ 9dzCMtq08GYbworSy47Ao0oy0T5NI7tA= X-Gm-Gg: ASbGncuR3CasSfr9/YrFjwz+f/QNGh8MEmfJh1g8xgwGlfapteLFVFMwdQUw1hNe1QH OVNN64azLMlqyYTKbUykUJIH+tfJolQce/WM/mCshrF8PaNWl/50vU2inzO+Us3aObXRYeG2IQv xqEztGfL5vF6oqdJ7++1rmynBpjHxpwYdYfebMutMUVGBasMNYwL+S9pWTD0gcYhPB6wra3r7La gccFj/Q+mP8mtuu X-Google-Smtp-Source: AGHT+IFl0ir/txxQCZD7XloQZ2PC9HQRwverU8A09S1sABTB16oilHfmRTXM40qHN5R5TXxegrLbN8Ukc7ML1w8NWLw= X-Received: by 2002:a17:907:7f8a:b0:acb:6746:8769 with SMTP id a640c23a62f3a-ad85b0a588amr264363666b.18.1748100334092; Sat, 24 May 2025 08:25:34 -0700 (PDT) MIME-Version: 1.0 References: <86h622jab6.fsf@gnu.org> <865xi8agbn.fsf@gnu.org> <86zff21iu9.fsf@gnu.org> In-Reply-To: <86zff21iu9.fsf@gnu.org> From: Matthias Meulien Date: Sat, 24 May 2025 17:25:22 +0200 X-Gm-Features: AX0GCFtFYSL82SyRTFLqEIjtkXZQGyqaY0CHscUI9ju-zp7VHbyM9acXa3unQIs Message-ID: Content-Type: multipart/mixed; boundary="0000000000007238680635e35321" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000007238680635e35321 Content-Type: multipart/alternative; boundary="0000000000007238670635e3531f" --0000000000007238670635e3531f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Here is an updated patch that extend `ansi-osc-filter-region' to properly handle unfinished escape sequences. Tests have been added to cover multiple successive calls to `ansi-osc-filter-region' and `ansi-osc-apply-region'. Le sam. 24 mai 2025 =C3=A0 11:03, Eli Zaretskii a =C3=A9crit= : > > From: Troy Brown > > Date: Mon, 12 May 2025 18:32:13 -0400 > > Cc: Matthias Meulien , 78184@debbugs.gnu.org > > > > On Sat, May 10, 2025 at 6:52=E2=80=AFAM Eli Zaretskii wr= ote: > > > > > > > From: Matthias Meulien > > > > Date: Thu, 8 May 2025 17:12:50 +0200 > > > > Cc: Troy Brown , 78184@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? > --=20 Matthias --0000000000007238670635e3531f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Here is an updated patch that extend `ansi-osc-filter= -region' to properly handle unfinished escape sequences. Tests have bee= n added to cover multiple successive calls to `ansi-osc-filter-region' = and `ansi-osc-apply-region'.

Le=C2=A0sam. 24= mai 2025 =C3=A0=C2=A011:03, Eli Zaretskii <eliz@gnu.org> a =C3=A9crit=C2=A0:
> From: Troy Brown <brownts@troybrown.dev>
> Date: Mon, 12 May 2025 18:32:13 -0400
> Cc: Matthias Meulien <orontee@gmail.com>, 78184@debbugs.gnu.org
>
> On Sat, May 10, 2025 at 6:52=E2=80=AFAM Eli Zaretskii <eliz@gnu.org> wrote:
> >
> > > From: Matthias Meulien <orontee@gmail.com>
> > > Date: Thu, 8 May 2025 17:12:50 +0200
> > > Cc: Troy Brown <brownts@troybrown.dev>, 78184@debbugs.gnu.org
> > >
> > > Troy analysis is right.=C2=A0 I was able to reproduce.=C2=A0= Please have a look to the attached patch.
> >
> > Thanks.=C2=A0 Troy, could you please try the patch and report? >
> Yes, I can confirm that this patch addresses the issue I'm seeing.= =C2=A0 It
> appears the patch was for the master branch, so that is where I
> applied and tested it.=C2=A0 I assume this change would also be merged= into
> the Emacs 30 branch.
>
> I did have a couple notes.=C2=A0 I believe an end marker should also b= e
> used in `ansi-osc-filter-region` to honor the original bounds passed > into the function, since it also calls `delete-region`.=C2=A0 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 "fragm= ents"
> (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.=C2=A0 Therefore if an O= SC
> control sequence overlapped the supplied bounds, I don't think it<= br> > would be filtered out on the next call to `ansi-osc-filter-region`.
Thanks.=C2=A0 Matthias, any further comments or changes to the patch?


--
Ma= tthias
--0000000000007238670635e3531f-- --0000000000007238680635e35321 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-ansi-osc.el-Use-marker-bug-78184.patch" Content-Disposition: attachment; filename="0001-ansi-osc.el-Use-marker-bug-78184.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_mb2d9uni0 RnJvbSBlMGY4ZTc3NDMzYjhiODM2NDZmMzFlNjU5NjE0ODdiYWNlYzcyODk3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXR0aGlhcyBNZXVsaWVuIDxvcm9udGVlQGdtYWlsLmNvbT4K RGF0ZTogVGh1LCA4IE1heSAyMDI1IDE2OjUxOjQ2ICswMjAwClN1YmplY3Q6IFtQQVRDSF0gYW5z aS1vc2MuZWw6IFVzZSBtYXJrZXIgKGJ1ZyM3ODE4NCkKCiogbGlzcC9hbnNpLW9zYy5lbCAoYW5z aS1vc2MtYXBwbH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ChsZXQgKChlbmQtbWFya2VyIChjb3B5LW1hcmtlciBlbmQpKSkKKyAgICAoc2F2ZS1leGN1cnNp b24KKyAgICAgIChnb3RvLWNoYXIgKG9yIGFuc2ktb3NjLS1tYXJrZXIgYmVnaW4pKQorICAgICAg KHdoZW4gKGVxIChjaGFyLWJlZm9yZSkgP1xlKSAoYmFja3dhcmQtY2hhcikpCisgICAgICAod2hp bGUgKHJlLXNlYXJjaC1mb3J3YXJkICJcZV0iIGVuZC1tYXJrZXIgdCkKKyAgICAgICAgKGxldCAo KHBvczAgKG1hdGNoLWJlZ2lubmluZyAwKSkKKyAgICAgICAgICAgICAgKGNvZGUgKGFuZAorICAg ICAgICAgICAgICAgICAgICAgKHJlLXNlYXJjaC1mb3J3YXJkICJcXD1cXChbMC05QS1aYS16XSpc XCk7IiBlbmQtbWFya2VyIHQpCisgICAgICAgICAgICAgICAgICAgICAobWF0Y2gtc3RyaW5nIDEp KSkKKyAgICAgICAgICAgICAgKHBvczEgKHBvaW50KSkpCisgICAgICAgICAgKGlmIChyZS1zZWFy Y2gtZm9yd2FyZCAiXGFcXHxcZVxcXFwiIGVuZC1tYXJrZXIgdCkKKyAgICAgICAgICAgICAgKGxl dCAoKHRleHQgKGJ1ZmZlci1zdWJzdHJpbmctbm8tcHJvcGVydGllcworICAgICAgICAgICAgICAg ICAgICAgICAgICAgcG9zMSAobWF0Y2gtYmVnaW5uaW5nIDApKSkpCisgICAgICAgICAgICAgICAg KHNldHEgYW5zaS1vc2MtLW1hcmtlciBuaWwpCisgICAgICAgICAgICAgICAgKGRlbGV0ZS1yZWdp b24gcG9zMCAocG9pbnQpKQorICAgICAgICAgICAgICAgICh3aGVuLWxldCogKChmdW4gKGNkciAo YXNzb2Mtc3RyaW5nIGNvZGUgYW5zaS1vc2MtaGFuZGxlcnMpKSkpCisgICAgICAgICAgICAgICAg ICAoZnVuY2FsbCBmdW4gY29kZSB0ZXh0KSkpCisgICAgICAgICAgICAocHV0LXRleHQtcHJvcGVy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KQorICAgIChsZXQgKChwb3MgKHBvaW50KSkpCisgICAgICAoaW5zZXJ0ICJ0 aXRsZVxlXFwsIGFuZCBzdG9wLiIpCisgICAgICAoYW5zaS1vc2MtZmlsdGVyLXJlZ2lvbiBwb3Mg KHBvaW50LW1heCkpKQorICAgIChzaG91bGQKKyAgICAgKGVxdWFsCisgICAgICAoYnVmZmVyLXN0 cmluZykKKyAgICAgICJGaXJzdCBzZXQgdGhlIHdpbmRvdyB0aXRsZSB0aGVuIGNoYW5nZSBpdCwg YW5kIHN0b3AuIikpKSkKLS0gCjIuMzkuNQoK --0000000000007238680635e35321-- From unknown Tue Jun 17 22:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#78184: 30.0.93; ansi-osc-apply-on-region should use end marker Resent-From: Troy Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 May 2025 21:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78184 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Matthias Meulien Cc: Eli Zaretskii , 78184@debbugs.gnu.org Received: via spool by 78184-submit@debbugs.gnu.org id=B78184.174838102920919 (code B ref 78184); Tue, 27 May 2025 21:24:02 +0000 Received: (at 78184) by debbugs.gnu.org; 27 May 2025 21:23:49 +0000 Received: from localhost ([127.0.0.1]:45332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uK1m0-0005RG-HJ for submit@debbugs.gnu.org; Tue, 27 May 2025 17:23:49 -0400 Received: from m228-14.mailgun.net ([159.135.228.14]:38676) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uK1lv-0005QA-7S for 78184@debbugs.gnu.org; Tue, 27 May 2025 17:23:46 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.troybrown.dev; q=dns/txt; s=mx; t=1748381011; x=1748388211; h=Content-Transfer-Encoding: Content-Type: Cc: To: To: Subject: Subject: Message-ID: Date: From: From: In-Reply-To: References: MIME-Version: Sender: Sender; bh=WHAD+qWnRI5o1kz4r8jkzcwOSCoEP6PbLZ1m/tbkt/I=; b=S1uWsNgqiJq09Z0FK+NjxioBUdzzH0Ydlc4Xz5QDzb84NSTUBa7wdwuIr8xLa1ANBUJPBuGSNlOmbXB3at7LrHhqIbCKYm014SA/05bjvtMDfMZddPQqJCJ+8fryiK8QSpGvnsXmf4/qsu7Fidy9tdh6qYdo7iDmYFgLc9Cx+k4= X-Mailgun-Sid: WyIzMjFiNiIsIjc4MTg0QGRlYmJ1Z3MuZ251Lm9yZyIsIjVmZDVkMiJd Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by c198abe97c98 with SMTP id 68362d53d26d9bfb477329cf (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Tue, 27 May 2025 21:23:31 GMT X-Mailgun-Sending-Ip-Pool-Name: X-Mailgun-Sending-Ip-Pool: X-Mailgun-Sending-Ip: 159.135.228.14 Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-acb39c45b4eso591385966b.1 for <78184@debbugs.gnu.org>; Tue, 27 May 2025 14:23:31 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVmaqT8XjVTIrumObqUB9hmpdHYtvc7VPYYwC+tlRx1i2+jbEQmX5zqtqCF7jNkZuidDmukXg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyV7E9pbdztXgUtZy4CYkU0Z2eQn/a4O9EQon9qLWCtbUiVjsU3 UaoU4Uql6tFiVvL2CtEYXZhvCVHsJdsJlMm+kewwo5O88NN2UjebLKn+eG4ELIVSzDqlQpdcz3G ZrGLAzQuvfcuU78RUyenQtFViweuxF6w= X-Google-Smtp-Source: AGHT+IFYBoSrZykfa4vSRTdYJuPugHyc8kuoO/6vXxGAsQG9BwWPNT/BDDd5k6gkLaa927Nz+ELdpHQLrqs38pBTf5I= X-Received: by 2002:a17:907:6d0f:b0:ad8:a04e:dbd9 with SMTP id a640c23a62f3a-ad8a04eea84mr2424066b.31.1748381010941; Tue, 27 May 2025 14:23:30 -0700 (PDT) MIME-Version: 1.0 References: <86h622jab6.fsf@gnu.org> <865xi8agbn.fsf@gnu.org> <86zff21iu9.fsf@gnu.org> In-Reply-To: From: Troy Brown Date: Tue, 27 May 2025 17:23:19 -0400 X-Gmail-Original-Message-ID: X-Gm-Features: AX0GCFsPnLJpazcGonZsLbcn63XXeWJ4oBSnXLNLrxn7ppWP4G8rokx9A7kwIDQ Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, May 24, 2025 at 11:25=E2=80=AFAM Matthias Meulien wrote: > > Here is an updated patch that extend `ansi-osc-filter-region' to properly= handle unfinished escape sequences. Tests have been added to cover multipl= e successive calls to `ansi-osc-filter-region' and `ansi-osc-apply-region'. This patch looks good to me. Thanks Matthias! From unknown Tue Jun 17 22:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#78184: 30.0.93; ansi-osc-apply-on-region should use end marker Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 May 2025 11:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78184 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Troy Brown Cc: orontee@gmail.com, 78184@debbugs.gnu.org Received: via spool by 78184-submit@debbugs.gnu.org id=B78184.174869213225651 (code B ref 78184); Sat, 31 May 2025 11:49:01 +0000 Received: (at 78184) by debbugs.gnu.org; 31 May 2025 11:48:52 +0000 Received: from localhost ([127.0.0.1]:56464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uLKho-0006fe-BK for submit@debbugs.gnu.org; Sat, 31 May 2025 07:48:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52046) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uLKhm-0006fN-9Y for 78184@debbugs.gnu.org; Sat, 31 May 2025 07:48:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uLKhg-0000tW-Tk; Sat, 31 May 2025 07:48:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=btStQhTUQ86Fd1stnlIgtH3XAjINRey4FNCUjYbjaTY=; b=nRyX1PblMbHVr38lvWyT HQIR62BlFP/N2Kw1irNs1Cdfsstf2ALop+Fz+wL4BNVzZn+OjEUQfCKOpp2seNr2RWK0pSRFtAMoK 6riOI08BSGVcVeU6ikNn1ZdwKcfWgYWh2JlsylNvJxZK+b5LVARgzyFiovhkBiBq2fw1D/eN/BXdB aZFuo62NKg+bZnUeJFC+c+agzrPYyOMjVSxr1/eFvQb2JtqvcXg9JWhD5CBFEF45q34h30P1BF0M4 NB1jhM0k6nzHWgymXIvV0fDNaVbYBI5BFYgPsjjDX/7s/TVa17bK1TpcJcMqO36cZdVzJcSI5/kHj oNiZwDQ+0M22dQ==; Date: Sat, 31 May 2025 14:48:42 +0300 Message-Id: <864ix1rof9.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Troy Brown on Tue, 27 May 2025 17:23:19 -0400) References: <86h622jab6.fsf@gnu.org> <865xi8agbn.fsf@gnu.org> <86zff21iu9.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Troy Brown > Date: Tue, 27 May 2025 17:23:19 -0400 > Cc: Eli Zaretskii , 78184@debbugs.gnu.org > > On Sat, May 24, 2025 at 11:25 AM Matthias Meulien wrote: > > > > Here is an updated patch that extend `ansi-osc-filter-region' to properly handle unfinished escape sequences. Tests have been added to cover multiple successive calls to `ansi-osc-filter-region' and `ansi-osc-apply-region'. > > This patch looks good to me. Thanks Matthias! Matthias, feel free to install on the master branch, and thanks. From unknown Tue Jun 17 22:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#78184: 30.0.93; ansi-osc-apply-on-region should use end marker Resent-From: Matthias Meulien Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 May 2025 12:03:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78184 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Troy Brown , 78184@debbugs.gnu.org Received: via spool by 78184-submit@debbugs.gnu.org id=B78184.174869296931831 (code B ref 78184); Sat, 31 May 2025 12:03:05 +0000 Received: (at 78184) by debbugs.gnu.org; 31 May 2025 12:02:49 +0000 Received: from localhost ([127.0.0.1]:56552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uLKvH-0008H4-Dz for submit@debbugs.gnu.org; Sat, 31 May 2025 08:02:48 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:42346) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uLKvC-0008FC-K8 for 78184@debbugs.gnu.org; Sat, 31 May 2025 08:02:45 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-602c4eae8d5so617437a12.1 for <78184@debbugs.gnu.org>; Sat, 31 May 2025 05:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748692956; x=1749297756; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XICCvC8YbOEnU8/4OqoQZtsqNoBvHkiDUuwt7IfuKes=; b=jMP1wa6Ljfm2SthX2xIDuzgpmU2FPT+eZZ0pyAdTB2hec997h43+zFdUsy+lCa+a+W r4KYglwrSp+QpyrYSfAjerGn3ppJy/F15W2lurLAXbf4L3yH3iAoUev6zQ7VlPhrSPX/ BosFtrs/IQ1m/xy1iidQw0uihJKq4t9hwIfLV1PqL9sCis1YTtOjempgAaW+nfoKWoFr sYxDaat6nUwADY0RZoFq5dzaxn6o+6YaO6JwYt9/MINM+sQZ+5o6kmd6avZsAUcrvHCW Eo39hgrEU/OmIWXLcPPtInNurIXV59pI+FxNulmB2ZhJdRm1qyfk9duB8/taSDn1AiJ/ 8yAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748692956; x=1749297756; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XICCvC8YbOEnU8/4OqoQZtsqNoBvHkiDUuwt7IfuKes=; b=SQQ2QLP1wGLCnZxrS1bowsGlTo6gOHtpnjYJUGU9dvAYlNMNkolSB4z0XM5+GHot8V QhelkgofY5v47jHRgJGyEQSwGOB2d2i2eS1kUBl8H+UCBrkHSdo4ZA1tfugtKFoSyMEM zU8gmViGbVvlWNTJkpgQixutZU0O5efF6SHJPcfk54L8SvMloIAWyfI1w+BCvNl+03N/ ojzQdVmiceaT9sFAt1IDMZnhqtPfpFiqdWhNG3+wvo+M9KDxgrNBdNKQzs6nMNtWTap+ cCGP9zyyqsfJPtU0Bu4JIsibUepucdQNnso3OizBQAs+Sf/S+BOPG2i7mmCQyAmOV0+F qw2A== X-Forwarded-Encrypted: i=1; AJvYcCWek45SU49xZ69ZMNzAAKLX+89T+R72oxfThYZtOTZZF3bEUQ4HYaHDUTpzTYpEA75Yqd6xqQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzFJBh4d+VourTUzDAykvnSCt2+GT4aHiWATzgNOPypvLHWbL2H XzZwoT8j/Yu0H6NgTx6MgPvq15xLKZTwahu0Pd1f3YKhlzJnPHqxIGMFg4HDS1SRQM/dLdPqagZ IH1JDi2QTxZqgzGzI2eMuFiQWDlK5crg= X-Gm-Gg: ASbGnctCswvOzZ6NLib3Cocykzu8elhxIEYTFDKNCjP7jOr8fZKzfcuJ4IqaB1JxFXO vUw7DxeRHMAhCbmrTuUGZJI4BN7I00VSVIFfDr556LyFoXXxHxPJyciot6w+RcvbXjcT7Og/n0d 8nBV9PZ8EEi4vqUbluT2ismmdDYBvAVn8Ghg== X-Google-Smtp-Source: AGHT+IGRl4TfjVHz+VHsBwlVew/+EQZHQM+5pqoFhrC35Eny9Ht+3ffqNRq0JqOv/nbhBIUaa0GFPcVr3kgCokwmNZM= X-Received: by 2002:a05:6402:845:b0:5f6:d403:fb20 with SMTP id 4fb4d7f45d1cf-6056f2ddd83mr6051776a12.8.1748692955878; Sat, 31 May 2025 05:02:35 -0700 (PDT) MIME-Version: 1.0 References: <86h622jab6.fsf@gnu.org> <865xi8agbn.fsf@gnu.org> <86zff21iu9.fsf@gnu.org> <864ix1rof9.fsf@gnu.org> In-Reply-To: <864ix1rof9.fsf@gnu.org> From: Matthias Meulien Date: Sat, 31 May 2025 14:02:24 +0200 X-Gm-Features: AX0GCFvCf2pPrSMHcjRrMAWX5WXUSfmY4MDRudnoGfTRqv5viuo0dpyxEy56AHw Message-ID: Content-Type: multipart/alternative; boundary="00000000000074da5906366d4e3f" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000074da5906366d4e3f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sorry I don't think I've write access to the source repository. Whats more I've no personnal computer at home for an undefined time period... Matthias Le sam. 31 mai 2025, 13:48, Eli Zaretskii a =C3=A9crit : > > From: Troy Brown > > Date: Tue, 27 May 2025 17:23:19 -0400 > > Cc: Eli Zaretskii , 78184@debbugs.gnu.org > > > > On Sat, May 24, 2025 at 11:25=E2=80=AFAM Matthias Meulien > wrote: > > > > > > Here is an updated patch that extend `ansi-osc-filter-region' to > properly handle unfinished escape sequences. Tests have been added to cov= er > multiple successive calls to `ansi-osc-filter-region' and > `ansi-osc-apply-region'. > > > > This patch looks good to me. Thanks Matthias! > > Matthias, feel free to install on the master branch, and thanks. > --00000000000074da5906366d4e3f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sorry I don't think I've write access to the= source repository. Whats more I've no personnal computer at home for a= n undefined time period...

Matthias

Le sam. 31 mai 2025, 13:48,= Eli Zaretskii <eliz@gnu.org> a = =C3=A9crit=C2=A0:
> From: Troy B= rown <brownts@troybrown.dev>
> Date: Tue, 27 May 2025 17:23:19 -0400
> Cc: Eli Zaretskii <eliz@gnu.org>, 78184@debbugs.gnu.org
>
> On Sat, May 24, 2025 at 11:25=E2=80=AFAM Matthias Meulien <orontee@= gmail.com> wrote:
> >
> > Here is an updated patch that extend `ansi-osc-filter-region'= to properly handle unfinished escape sequences. Tests have been added to c= over multiple successive calls to `ansi-osc-filter-region' and `ansi-os= c-apply-region'.
>
> This patch looks good to me.=C2=A0 Thanks Matthias!

Matthias, feel free to install on the master branch, and thanks.
--00000000000074da5906366d4e3f-- From unknown Tue Jun 17 22:20:31 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Troy Brown Subject: bug#78184: closed (Re: bug#78184: 30.0.93; ansi-osc-apply-on-region should use end marker) Message-ID: References: <86wm9xq88h.fsf@gnu.org> X-Gnu-PR-Message: they-closed 78184 X-Gnu-PR-Package: emacs Reply-To: 78184@debbugs.gnu.org Date: Sat, 31 May 2025 12:24:07 +0000 Content-Type: multipart/mixed; boundary="----------=_1748694247-9871-1" This is a multi-part message in MIME format... ------------=_1748694247-9871-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #78184: 30.0.93; ansi-osc-apply-on-region should use end marker which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 78184@debbugs.gnu.org. --=20 78184: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78184 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1748694247-9871-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 78184-done) by debbugs.gnu.org; 31 May 2025 12:23:55 +0000 Received: from localhost ([127.0.0.1]:56694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uLLFi-0002Xm-KM for submit@debbugs.gnu.org; Sat, 31 May 2025 08:23:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35246) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uLLFf-0002We-LV for 78184-done@debbugs.gnu.org; Sat, 31 May 2025 08:23:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uLLFZ-0004Zq-Sr; Sat, 31 May 2025 08:23:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=WcSPFMuQc62kLymsstuB7Y1kYiSSc538lEQeIqsss/k=; b=ALCe9R+W2tVm K5gCM9R3HKj70S7XRfBqaDv1OwtGQsSPRzPxIA5s6ZVnlqzByNdDpbPxMhSrZPz4txXai2vth/PQl Q9/2v7kt8KYc12xSKdyK64fyc/NtjI2L1iQRlyt0DQO18ITecqTdleZgsoDpXNAC/ChhcrHUy/vIA PVzGYITZxJ2y/XXM1H5fbEt9h6i0icNoz0MWlH0sk6Noo6QB9NjlyYRFJl+cAXuJm9+IDxbciI96t f0YhGjwNk0A3COeCXoM/24uWEqwBMhXEyhfwdlK3YFZ6qnzVYMEwpyRZ/QDOysKUIIKVnksSI27+j 9lCwXVGzu5MC4M6p3PGDmQ==; Date: Sat, 31 May 2025 15:23:42 +0300 Message-Id: <86wm9xq88h.fsf@gnu.org> From: Eli Zaretskii To: Matthias Meulien In-Reply-To: (message from Matthias Meulien on Sat, 31 May 2025 14:02:24 +0200) Subject: Re: bug#78184: 30.0.93; ansi-osc-apply-on-region should use end marker References: <86h622jab6.fsf@gnu.org> <865xi8agbn.fsf@gnu.org> <86zff21iu9.fsf@gnu.org> <864ix1rof9.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78184-done Cc: brownts@troybrown.dev, 78184-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Matthias Meulien > Date: Sat, 31 May 2025 14:02:24 +0200 > Cc: Troy Brown , 78184@debbugs.gnu.org > > Sorry I don't think I've write access to the source repository. Whats more I've no personnal computer at > home for an undefined time period... OK, so I've now installed the patch on the master branch, and I'm therefore closing this bug. ------------=_1748694247-9871-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 1 May 2025 11:48:23 +0000 Received: from localhost ([127.0.0.1]:49226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uASOs-0003Dj-9j for submit@debbugs.gnu.org; Thu, 01 May 2025 07:48:22 -0400 Received: from lists.gnu.org ([2001:470:142::17]:53918) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uASOp-0003DH-Dd for submit@debbugs.gnu.org; Thu, 01 May 2025 07:48:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uASOi-0002Xu-FY for bug-gnu-emacs@gnu.org; Thu, 01 May 2025 07:48:13 -0400 Received: from mail-ej1-f53.google.com ([209.85.218.53]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uASOg-0007tF-Hy for bug-gnu-emacs@gnu.org; Thu, 01 May 2025 07:48:12 -0400 Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-ac345bd8e13so131082666b.0 for ; Thu, 01 May 2025 04:48:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746100088; x=1746704888; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Juu6z0EFFdzELsEOjERFgls13EYAjo26vxVbRRelfgQ=; b=Ixd4gpRo9nAgDxxd3a84FLo3IloVhGZZ+H1WXFgxu8kWsVCutqzBtVULjF1YRBLIVo Q52RDoV8hvT6TERLLOur4pk856ugQvB9+Ckc3WQ4SYMXaUTGyDivZuU49/AtPHqb6OIX ShgHm5IrF9i+Tpsn8U3hD8xLkmsZdv/WAm4eKfFOZfvVc1rmJnI1o9HNXJhJeDI3Esqp 5fjksXbOsbjIYsI/fkndXE6fryUCS1z0BIVaYKktILSJdmPWeWnh9ljyDbtApaL/lq6L 8QStIIKHck60jMF9TBsJBHqpqH9w46/dHeNpfUzbjo3aV/gjceeOfoRcVWFI55YHRmyJ i7yw== X-Gm-Message-State: AOJu0YwC8unpm8opnAgwmO/Z61XPgXcd3egolG5e7ZG2SGulhWhU/dAe fBHABgkBvCVFeuk0Ut31eZdQsCmNvx1NEGuEx9AgtJ8Nru1HSUsUdPWRrEuW X-Gm-Gg: ASbGncukgrNHitfe5HQJshahttvY/UgX/kUsE6V5oAXe9osBrntpYAUbnHcFiTaly0b zaHmwnD+/+7Q1ra02eRGzKTmerluK0+wFMIpfm5dLJKOB+r5RjMZhscXrFBZwWFwYZAAA1iTPbC cgLl11up06knZ1AXM7PpB4iUfOdp187W5On8DPX2p81qFZ15KTJr47Y2WZCWRcVCQmhBwtcmxpj zfu1ccVQQWKNO2p8w8gcP9spV7j+t6e0iC+8clOXepIpaB3azcvIfDJkF/oKfOQCuQ4oPiKCGsr fwiZYHNj6VkIlJMBazpq+rXDTuuOz5gxoC14B106iXs/fpoSJX7YoN5VU6b+sXd7xYyvbtd7biH CMx3d X-Google-Smtp-Source: AGHT+IFWn2ENck501y05dQtAK2sNO/VuWi5GrVwUFsBqoG42xUgLFvhu+qPJGtzxWjUXn74PILgg4w== X-Received: by 2002:a17:906:7154:b0:acf:5b21:1df4 with SMTP id a640c23a62f3a-acf5b212039mr90851066b.30.1746100087660; Thu, 01 May 2025 04:48:07 -0700 (PDT) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com. [209.85.218.45]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad0da517332sm28886366b.118.2025.05.01.04.48.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 May 2025 04:48:07 -0700 (PDT) Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-ace3b03c043so114272766b.2 for ; Thu, 01 May 2025 04:48:07 -0700 (PDT) X-Received: by 2002:a17:906:f58f:b0:ac4:5f1:a129 with SMTP id a640c23a62f3a-acedc5d0772mr726683166b.15.1746100087075; Thu, 01 May 2025 04:48:07 -0700 (PDT) MIME-Version: 1.0 From: Troy Brown Date: Thu, 1 May 2025 07:47:56 -0400 X-Gmail-Original-Message-ID: X-Gm-Features: ATxdqUEae4d61yjDwy55MklIP8a7jp2HTMc4jJPnmRib5PFBeHUtATmcZufkpHk Message-ID: Subject: 30.0.93; ansi-osc-apply-on-region should use end marker To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=209.85.218.53; envelope-from=troy.s.brown@gmail.com; helo=mail-ej1-f53.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) I've been running into an issue when using the ANSI OSC compilation filters, where part way through parsing input, I'll get an "args out of range" error on the call to `put-text-property`. I believe this is because `ansi-osc-apply-on-region` uses `delete-region` and therefore the buffer can shrink from its original size. Due to this shrinking, the use of "end", in the call to `put-text-property` can reside outside the current bounds of the buffer, causing the error. Looking at similar functionality in `ansi-color-apply-on-region`, I noticed that it creates a marker for "end" at the beginning of the function, avoiding this problem. I believe the ANSI OSC package should use a similar approach and create a marker for "end". It's also likely that a marker should be used in other functions within the package, such as `ansi-osc-filter-region`, although `re-search-forward` doesn't seem to be susceptible to the range issue that `put-text-property` is. Currently, I use the following advice to workaround the problem by ensuring that "end" is a marker before calling the original function: ```emacs (defun init.el/advice/ansi-osc-apply-on-region (oldfun &rest r) (let ((start (car r)) (end (cadr r))) (funcall oldfun start (copy-marker end)))) (advice-add 'ansi-osc-apply-on-region :around #'init.el/advice/ansi-osc-apply-on-region) ``` ------------=_1748694247-9871-1--