* bug#55865: [BUG] 28.1.50; Msg "Local variables list is not properly terminated." displayed when opening a file with line `print("Local Variable:")`
@ 2022-06-08 23:02 Lin Sun
2022-06-09 12:56 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Lin Sun @ 2022-06-08 23:02 UTC (permalink / raw)
To: 55865
Create a file /tmp/test.sh with one line:
print("Local Variables:")
Then open this test.sh file with emacs, a message appeared in the *Message* buffer:
>Local variables list is not properly terminated.
The message produced by function `hack-local-variables--find-variables`.
Please help to check it. Thanks
B.R.
Lin
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#55865: [BUG] 28.1.50; Msg "Local variables list is not properly terminated." displayed when opening a file with line `print("Local Variable:")`
2022-06-08 23:02 bug#55865: [BUG] 28.1.50; Msg "Local variables list is not properly terminated." displayed when opening a file with line `print("Local Variable:")` Lin Sun
@ 2022-06-09 12:56 ` Lars Ingebrigtsen
2022-06-09 16:04 ` Lin Sun
2022-11-23 15:22 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 2 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-09 12:56 UTC (permalink / raw)
To: Lin Sun; +Cc: 55865
Lin Sun <sunlin7@hotmail.com> writes:
> Create a file /tmp/test.sh with one line:
>
> print("Local Variables:")
>
> Then open this test.sh file with emacs, a message appeared in the
> *Message* buffer:
>
>>Local variables list is not properly terminated.
>
> The message produced by function `hack-local-variables--find-variables`.
>
> Please help to check it. Thanks
I don't think there's anything to fix here -- Emacs makes a guess that
this is a Local Variable section, but then it turns out that it's not,
and it says so.
So if you don't want that message, you have to obfuscate the string.
Closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#55865: [BUG] 28.1.50; Msg "Local variables list is not properly terminated." displayed when opening a file with line `print("Local Variable:")`
2022-06-09 12:56 ` Lars Ingebrigtsen
@ 2022-06-09 16:04 ` Lin Sun
2022-11-23 15:22 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 0 replies; 4+ messages in thread
From: Lin Sun @ 2022-06-09 16:04 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 55865@debbugs.gnu.org
[-- Attachment #1: Type: text/plain, Size: 89 bytes --]
Hi Lars,
Thank you for your explanation, and agree with you. Thank you.
B.R.
Lin
[-- Attachment #2: Type: text/html, Size: 975 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#55865: [BUG] 28.1.50; Msg "Local variables list is not properly terminated." displayed when opening a file with line `print("Local Variable:")`
2022-06-09 12:56 ` Lars Ingebrigtsen
2022-06-09 16:04 ` Lin Sun
@ 2022-11-23 15:22 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-11-23 15:22 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Lin Sun, 55865
> I don't think there's anything to fix here -- Emacs makes a guess that
> this is a Local Variable section, but then it turns out that it's not,
> and it says so.
>
> So if you don't want that message, you have to obfuscate the string.
Indeed. If there's something to fix here it's the relative lack
of information.
E.g. we could include in the message some info about the name of the
file in which we found the `Local Variables:` string (and its position
too, while at it).
We could also try and reduce the occurrence of such false positives
(e.g. by checking for the presence of `End:` or the presence of
the same prefix on the next line), but that would increase the
risk of emitting no message when the users do intend to write a `Local
Variables:` section but make a mistake writing it.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-23 15:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-08 23:02 bug#55865: [BUG] 28.1.50; Msg "Local variables list is not properly terminated." displayed when opening a file with line `print("Local Variable:")` Lin Sun
2022-06-09 12:56 ` Lars Ingebrigtsen
2022-06-09 16:04 ` Lin Sun
2022-11-23 15:22 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).