GNU bug report logs -
#51899
Odd highlighting in compilation mode
Previous Next
Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Date: Tue, 16 Nov 2021 19:24:02 UTC
Severity: minor
Tags: wontfix
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 51899 in the body.
You can then email your comments to 51899 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#51899
; Package
emacs
.
(Tue, 16 Nov 2021 19:24:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 16 Nov 2021 19:24: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)]
Save and open the attached file with emacs -Q.
You will see:
One $m is highlighted, the others and $i etc. aren't.
"/tmp/$(basename" is highlighted.
[q (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]
I have no opinions on what should be highlighted. Just be consistent.
emacs-version "27.1"
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#51899
; Package
emacs
.
(Tue, 16 Nov 2021 21:32:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 51899 <at> debbugs.gnu.org (full text, mbox):
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:
> "/tmp/$(basename" is highlighted.
Yup, I guess that's due to this bit this from
compilation-mode-font-lock-keywords:
> (" --?o\\(?:utfile\\|utput\\)?[= ]\\(\\S +\\)" . 1)
The heuristic, I guess, is "highlight things that look like output
arguments". Maybe it could do with a smarter font-lock matcher?
I'm not knowledgeable enough with font-lock to see how that could work;
I think we'd want to skip over the --?o\\(?:utfile\\|utput\\)?[= ] part,
then match everything that we find by forward-sexp'ing until
(char-after) matches [ ;&|] (or we hit "no next sexp")? No idea if
that's expressible with font-lock matchers.
> One $m is highlighted, the others and $i etc. aren't.
compilation-mode mostly expects command outputs, not shell scripts
sources, so I don't know how much shell syntax we want the mode to
highlight by default.
The font-lock rule discussed above does show we expect some shell
commands, but compilation-mode seems more concerned with bits relevant
to the compilation process (i.e. here, the output files) than with shell
syntax in general.
> I have no opinions on what should be highlighted. Just be consistent.
The consistency compilation-mode aims for, IIUC, is "highlight outputs
of the compilation process".
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#51899
; Package
emacs
.
(Tue, 16 Nov 2021 21:40:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 51899 <at> debbugs.gnu.org (full text, mbox):
Kévin Le Gouguec <kevin.legouguec <at> gmail.com> writes:
>> I have no opinions on what should be highlighted. Just be consistent.
>
> The consistency compilation-mode aims for, IIUC, is "highlight outputs
> of the compilation process".
That could have been phrased less ambiguously, although hopefully the
rest of the message made it clear that by "outputs of the compilation
process" I meant "filenames of build artifacts, typically given as
arguments of -o/--output options".
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#51899
; Package
emacs
.
(Wed, 17 Nov 2021 08:10:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 51899 <at> debbugs.gnu.org (full text, mbox):
Kévin Le Gouguec <kevin.legouguec <at> gmail.com> writes:
> compilation-mode mostly expects command outputs, not shell scripts
> sources, so I don't know how much shell syntax we want the mode to
> highlight by default.
Yeah, I think it's way outside the remit of compilation mode to parse
stuff like this -- a makefile can basically output anything, in any
language. Shells are the most popular, but...
So I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) wontfix.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 17 Nov 2021 08:10:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
51899 <at> debbugs.gnu.org and 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 17 Nov 2021 08:10:02 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
.
(Wed, 15 Dec 2021 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 131 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.