GNU bug report logs -
#54769
28.1; Incorrect sql comment highlighting
Previous Next
Reported by: emacsq <laszlomail <at> protonmail.com>
Date: Thu, 7 Apr 2022 16:31:01 UTC
Severity: normal
Found in version 28.1
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
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 54769 in the body.
You can then email your comments to 54769 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54769
; Package
emacs
.
(Thu, 07 Apr 2022 16:31:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
emacsq <laszlomail <at> protonmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 07 Apr 2022 16:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Attached a small test.sql file where the statement after the comment incorrectly gets comment face.
Looks like the two kinds of comment styles confuses the highlighter:
"You can include a comment in a statement in two ways:
Begin the comment with a slash and an asterisk (/*). Proceed with the text of the comment. This text can span multiple lines. End the comment with an asterisk and a slash (*/). The opening and terminating characters need not be separated from the text by a space or a line break.
Begin the comment with -- (two hyphens). Proceed with the text of the comment. This text cannot extend to a new line. End the comment with a line break.
"
If you remove the hyphens from the /* */ comment then the higlighting is correct.
Such SQL worked fine for me with 27.1, so something must have happened since then.
[Message part 2 (text/html, inline)]
[test.sql (application/sql, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54769
; Package
emacs
.
(Fri, 08 Apr 2022 13:46:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 54769 <at> debbugs.gnu.org (full text, mbox):
emacsq <laszlomail <at> protonmail.com> writes:
> Attached a small test.sql file where the statement after the comment incorrectly gets
> comment face.
[...]
> /*---*/;
> INSERT INTO `student` (`id`, `name`, `class`, `mark`, `gender`) VALUES (1, 'John Deo', 'Four', 75, 'female');
The trigger for this behaviour seems to be the dash before the asterisk.
This also displays the incorrect behaviour:
/* aa -*/;
INSERT INTO `student` (`id`, `name`, `class`, `mark`, `gender`) VALUES (1, 'John Deo', 'Four', 75, 'female');
This doesn't:
/* aa - */;
INSERT INTO `student` (`id`, `name`, `class`, `mark`, `gender`) VALUES (1, 'John Deo', 'Four', 75, 'female');
And the problem seems to be introduced by:
commit 70825a4d313fddd6f80a1840d775384e848daf9f
Author: Lars Ingebrigtsen <larsi <at> gnus.org>
AuthorDate: Mon Aug 10 13:24:19 2020 +0200
Fix problem with /- incorrectly starting a comment in SQL mode
* lisp/progmodes/sql.el (sql-mode): Move all the syntax setup
stuff here (bug#35646). Add handling of -* and /- from Kristian
Hole <kristian <at> hole.priv.no>.
The previous bug was that -* would start a comment, but the fix makes -*
inhibit ending a comment instead.
I've now fixed this in Emacs 29.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 29.1, send any further explanations to
54769 <at> debbugs.gnu.org and emacsq <laszlomail <at> protonmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 08 Apr 2022 13:46:01 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 07 May 2022 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 40 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.