GNU bug report logs -
#57250
emacs-lisp-mode not highlighting single characters `k' in comments
Previous Next
Reported by: uzibalqa <uzibalqa <at> proton.me>
Date: Tue, 16 Aug 2022 18:58:02 UTC
Severity: normal
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 57250 in the body.
You can then email your comments to 57250 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#57250
; Package
emacs
.
(Tue, 16 Aug 2022 18:58:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
uzibalqa <uzibalqa <at> proton.me>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 16 Aug 2022 18:58: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)]
With emacs-lisp-mode make a comment that includes character sequences enclosed
by tick ` and a single quote ' .
The character sequence within gets highlighted with a different colour than the
usual typeface for comments.
Example:
;; Insert `cog', `col', `com', `con', `cor', `coun', `cum'.
The character sequences cog, col, com, con, cor, coun, and cum get highlighted
But if the character sequence within tick ` and a single quote ' is a single
character, the character does not get highlighted.
Example:
;; Insert `k' for words with initial values.
The character k does not get highlighted.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57250
; Package
emacs
.
(Tue, 16 Aug 2022 19:13:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 57250 <at> debbugs.gnu.org (full text, mbox):
uzibalqa via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:
> But if the character sequence within tick ` and a single quote ' is a single
> character, the character does not get highlighted.
>
> Example:
>
> ;; Insert `k' for words with initial values.
>
> The character k does not get highlighted.
That's because k here is more likely to be a key than a Lisp symbol.
So I think this is expected.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57250
; Package
emacs
.
(Tue, 16 Aug 2022 19:18:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 57250 <at> debbugs.gnu.org (full text, mbox):
------- Original Message -------
On Tuesday, August 16th, 2022 at 7:11 PM, Stefan Kangas <stefankangas <at> gmail.com> wrote:
> uzibalqa via "Bug reports for GNU Emacs, the Swiss army knife of text
> editors" bug-gnu-emacs <at> gnu.org writes:
>
> > But if the character sequence within tick ` and a single quote ' is a single
> > character, the character does not get highlighted.
> >
> > Example:
> >
> > ;; Insert `k' for words with initial values.
> >
> > The character k does not get highlighted.
>
>
> That's because k here is more likely to be a key than a Lisp symbol.
>
> So I think this is expected.
What is the reason for the highlight for more than a single character?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57250
; Package
emacs
.
(Tue, 16 Aug 2022 19:24:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 57250 <at> debbugs.gnu.org (full text, mbox):
> > But if the character sequence within tick ` and a single quote ' is a
> single
> > character, the character does not get highlighted.
> >
> > Example:
> >
> > ;; Insert `k' for words with initial values.
> >
> > The character k does not get highlighted.
>
> That's because k here is more likely to be a key than a Lisp symbol.
>
> So I think this is expected.
FWIW, I don't think it should be expected.
And even if it were expected to consider it
a key, that's not a reason not to highlight
it. Keys such as `M-x' do get highlighted.
To me, this is a minor bug or a nice-to-have.
If it can be fixed reasonably then that would
be good.
We need not expect, for this bug fix, that
things like `C-x C-x', which contains a SPC
char, would also get fixed (highlighted).
That would be nice, but there's only so much
that reasonably can be done. Highlighting
everything from ` to ' would likely introduce
a fair number of problems. (And then there
are things like a `C-x C-x' that's split
across a newline...)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57250
; Package
emacs
.
(Tue, 16 Aug 2022 20:33:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 57250 <at> debbugs.gnu.org (full text, mbox):
------- Original Message -------
On Tuesday, August 16th, 2022 at 7:23 PM, Drew Adams <drew.adams <at> oracle.com> wrote:
> > > But if the character sequence within tick ` and a single quote ' is a
> > > single
> > > character, the character does not get highlighted.
> > >
> > > Example:
> > >
> > > ;; Insert `k' for words with initial values.
> > >
> > > The character k does not get highlighted.
> >
> > That's because k here is more likely to be a key than a Lisp symbol.
> >
> > So I think this is expected.
>
>
> FWIW, I don't think it should be expected.
>
> And even if it were expected to consider it
> a key, that's not a reason not to highlight
> it.
I agree. That has been my argument.
Keys such as `M-x' do get highlighted. To me, this is a minor bug or a nice-to-have. If it can be fixed reasonably then that would be good. We need not expect, for this bug fix, that things like` C-x C-x', which contains a SPC
> char, would also get fixed (highlighted).
>
> That would be nice, but there's only so much
> that reasonably can be done. Highlighting
> everything from `to ' would likely introduce a fair number of problems. (And then there are things like a`C-x C-x' that's split
> across a newline...)
It would valuable to highlight everything from ` to ' if they happen on tho same line.
Or some other mechanism to highlight certain elements in comments that would benefit out of emphasising.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57250
; Package
emacs
.
(Wed, 17 Aug 2022 11:17:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 57250 <at> debbugs.gnu.org (full text, mbox):
uzibalqa <uzibalqa <at> proton.me> writes:
> But if the character sequence within tick ` and a single quote ' is a single
> character, the character does not get highlighted.
>
> Example:
>
> ;; Insert `k' for words with initial values.
This is the case in Emacs 27.1, but not in later versions of Emacs.
Closing.
bug closed, send any further explanations to
57250 <at> debbugs.gnu.org and uzibalqa <uzibalqa <at> proton.me>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 17 Aug 2022 11:17: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, 14 Sep 2022 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 337 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.