GNU bug report logs -
#74499
[PATCH] Avoid loading 'rx' at runtime in 'lua-ts-mode'
Previous Next
Reported by: john muhl <jm <at> pub.pink>
Date: Sat, 23 Nov 2024 23:07:01 UTC
Severity: normal
Tags: patch
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74499 in the body.
You can then email your comments to 74499 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
philipk <at> posteo.net, bug-gnu-emacs <at> gnu.org
:
bug#74499
; Package
emacs
.
(Sat, 23 Nov 2024 23:07:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
john muhl <jm <at> pub.pink>
:
New bug report received and forwarded. Copy sent to
philipk <at> posteo.net, bug-gnu-emacs <at> gnu.org
.
(Sat, 23 Nov 2024 23:07:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Tags: patch
Philip mentioned changing these rx-to-string forms to use literal
over in bug#74235. I meant to include them there but guess it
slipped my mind.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74499
; Package
emacs
.
(Sat, 23 Nov 2024 23:09:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 74499 <at> debbugs.gnu.org (full text, mbox):
[0001-Avoid-loading-rx-at-runtime-in-lua-ts-mode.patch (text/x-patch, attachment)]
[Message part 2 (text/plain, inline)]
john muhl <jm <at> pub.pink> writes:
> Tags: patch
>
> Philip mentioned changing these rx-to-string forms to use literal
> over in bug#74235. I meant to include them there but guess it
> slipped my mind.
Reply sent
to
Stefan Kangas <stefankangas <at> gmail.com>
:
You have taken responsibility.
(Sun, 24 Nov 2024 01:23:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
john muhl <jm <at> pub.pink>
:
bug acknowledged by developer.
(Sun, 24 Nov 2024 01:23:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 74499-done <at> debbugs.gnu.org (full text, mbox):
john muhl <jm <at> pub.pink> writes:
> From 309e80a336bce5c4a9191c87af636b8adfc04b97 Mon Sep 17 00:00:00 2001
> From: john muhl <jm <at> pub.pink>
> Date: Sat, 23 Nov 2024 14:08:21 -0600
> Subject: [PATCH] Avoid loading 'rx' at runtime in 'lua-ts-mode'
>
> * lisp/progmodes/lua-ts-mode.el (lua-ts-inferior-lua):
> Replace 'rx-to-string' and substitution with 'rx' and 'literal'.
>
> (Bug#74499)
Thanks for the patch, now installed on master as commit e71d714a815.
I'm therefore closing this bug report.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74499
; Package
emacs
.
(Sun, 24 Nov 2024 08:43:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 74499 <at> debbugs.gnu.org (full text, mbox):
> Resent-To: bug-gnu-emacs <at> gnu.org
> Cc: philipk <at> posteo.net
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Sat, 23 Nov 2024 20:21:22 -0500
>
> john muhl <jm <at> pub.pink> writes:
>
> > From 309e80a336bce5c4a9191c87af636b8adfc04b97 Mon Sep 17 00:00:00 2001
> > From: john muhl <jm <at> pub.pink>
> > Date: Sat, 23 Nov 2024 14:08:21 -0600
> > Subject: [PATCH] Avoid loading 'rx' at runtime in 'lua-ts-mode'
> >
> > * lisp/progmodes/lua-ts-mode.el (lua-ts-inferior-lua):
> > Replace 'rx-to-string' and substitution with 'rx' and 'literal'.
> >
> > (Bug#74499)
>
> Thanks for the patch, now installed on master as commit e71d714a815.
lua-ts-mode is new in Emacs 30, so changes in it should generally be
installed on the emacs-30 branch, unless they are dangerous or depend
on functionality we only have on master. So I've now cherry-picked
this change to the emacs-30 branch.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74499
; Package
emacs
.
(Sun, 24 Nov 2024 10:39:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 74499 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> lua-ts-mode is new in Emacs 30, so changes in it should generally be
> installed on the emacs-30 branch, unless they are dangerous or depend
> on functionality we only have on master. So I've now cherry-picked
> this change to the emacs-30 branch.
Thanks for doing that.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74499
; Package
emacs
.
(Sun, 24 Nov 2024 19:38:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 74499 <at> debbugs.gnu.org (full text, mbox):
john muhl <jm <at> pub.pink> writes:
> From 309e80a336bce5c4a9191c87af636b8adfc04b97 Mon Sep 17 00:00:00 2001
> From: john muhl <jm <at> pub.pink>
> Date: Sat, 23 Nov 2024 14:08:21 -0600
> Subject: [PATCH] Avoid loading 'rx' at runtime in 'lua-ts-mode'
>
> * lisp/progmodes/lua-ts-mode.el (lua-ts-inferior-lua):
> Replace 'rx-to-string' and substitution with 'rx' and 'literal'.
>
> (Bug#74499)
> ---
> lisp/progmodes/lua-ts-mode.el | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el
> index f88fe0e49af..828636f359d 100644
> --- a/lisp/progmodes/lua-ts-mode.el
> +++ b/lisp/progmodes/lua-ts-mode.el
> @@ -659,9 +659,9 @@ lua-ts-inferior-lua
> (setq-local comint-input-ignoredups t
> comint-input-ring-file-name lua-ts-inferior-history
> comint-prompt-read-only t
> - comint-prompt-regexp (rx-to-string `(: bol
> - ,lua-ts-inferior-prompt
> - (1+ space))))
> + comint-prompt-regexp (rx bol
> + (literal lua-ts-inferior-prompt)
> + (1+ space)))
Strictly speaking this could have introduced a regression, since literal
quotes the string, and it might be that someone has set
`lua-ts-inferior-prompt' to a quoted regular expression that is now
double-quoted, but I assume that this is an acceptable edge-case?
> (comint-read-input-ring t)
> (add-hook 'comint-preoutput-filter-functions
> (lambda (string)
> @@ -672,11 +672,11 @@ lua-ts-inferior-lua
> ;; accumulate in the output when sending regions
> ;; to the inferior process.
> (replace-regexp-in-string
> - (rx-to-string `(: bol
> - (* ,lua-ts-inferior-prompt
> - (? ,lua-ts-inferior-prompt)
> - (1+ space))
> - (group (* nonl))))
> + (rx bol
> + (* (literal lua-ts-inferior-prompt)
> + (? (literal lua-ts-inferior-prompt))
> + (1+ space))
> + (group (* nonl)))
> "\\1" string)
> ;; Re-add the prompt for the next line.
> lua-ts-inferior-prompt " ")))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74499
; Package
emacs
.
(Tue, 26 Nov 2024 02:05:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 74499 <at> debbugs.gnu.org (full text, mbox):
Philip Kaludercic <philipk <at> posteo.net> writes:
> john muhl <jm <at> pub.pink> writes:
>
>> From 309e80a336bce5c4a9191c87af636b8adfc04b97 Mon Sep 17 00:00:00 2001
>> From: john muhl <jm <at> pub.pink>
>> Date: Sat, 23 Nov 2024 14:08:21 -0600
>> Subject: [PATCH] Avoid loading 'rx' at runtime in 'lua-ts-mode'
>>
>> * lisp/progmodes/lua-ts-mode.el (lua-ts-inferior-lua):
>> Replace 'rx-to-string' and substitution with 'rx' and 'literal'.
>>
>> (Bug#74499)
>> ---
>> lisp/progmodes/lua-ts-mode.el | 16 ++++++++--------
>> 1 file changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el
>> index f88fe0e49af..828636f359d 100644
>> --- a/lisp/progmodes/lua-ts-mode.el
>> +++ b/lisp/progmodes/lua-ts-mode.el
>> @@ -659,9 +659,9 @@ lua-ts-inferior-lua
>> (setq-local comint-input-ignoredups t
>> comint-input-ring-file-name lua-ts-inferior-history
>> comint-prompt-read-only t
>> - comint-prompt-regexp (rx-to-string `(: bol
>> - ,lua-ts-inferior-prompt
>> - (1+ space))))
>> + comint-prompt-regexp (rx bol
>> + (literal lua-ts-inferior-prompt)
>> + (1+ space)))
>
> Strictly speaking this could have introduced a regression, since literal
> quotes the string, and it might be that someone has set
> `lua-ts-inferior-prompt' to a quoted regular expression that is now
> double-quoted, but I assume that this is an acceptable edge-case?
It doesn’t strike me as a significant issue but I don’t customize
prompts so maybe it’s in my blind spot. Feel free to revert it or
not as you see fit.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 24 Dec 2024 12:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 177 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.