GNU bug report logs - #47313
27.1; highlight functions should accept colors too

Previous Next

Package: emacs;

Reported by: scame <laszlomail <at> protonmail.com>

Date: Mon, 22 Mar 2021 09:30:01 UTC

Severity: normal

Tags: wontfix

Found in version 27.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 47313 in the body.
You can then email your comments to 47313 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#47313; Package emacs. (Mon, 22 Mar 2021 09:30:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to scame <laszlomail <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 22 Mar 2021 09:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: scame <laszlomail <at> protonmail.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 27.1; highlight functions should accept colors too
Date: Mon, 22 Mar 2021 09:29:24 +0000
[Message part 1 (text/plain, inline)]
I wanted to use highlight-regexp to color some lines gray, but the command
did not accept the color, it only accept faces, so I had to look for a suitable
face.

These highlight-* commands should accept color names too if the user
wants a specific color, not a specific face,
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47313; Package emacs. (Mon, 22 Mar 2021 17:35:02 GMT) Full text and rfc822 format available.

Message #8 received at 47313 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: scame <laszlomail <at> protonmail.com>
Cc: 47313 <at> debbugs.gnu.org
Subject: Re: bug#47313: 27.1; highlight functions should accept colors too
Date: Mon, 22 Mar 2021 19:34:45 +0200
> Date: Mon, 22 Mar 2021 09:29:24 +0000
> From:  scame via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> I wanted to use highlight-regexp to color some lines gray, but the command
> did not accept the color, it only accept faces, so I had to look for a suitable
> face.
> 
> These highlight-* commands should accept color names too if the user
> wants a specific color, not a specific face,

Faces are not just colors, they have many additional attributes.

I'm not sure it is a good idea to make these commands accept both
faces and colors, as this could make the UI confusing and error prone.
It may be better to provide new commands, similar to the existing
ones, but which will accept only the colors instead of faces.

(You could of course define a face which specifies just the color, and
use that with highlight-* commands, but that is less user-friendly.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47313; Package emacs. (Mon, 22 Mar 2021 17:45:01 GMT) Full text and rfc822 format available.

Message #11 received at 47313 <at> debbugs.gnu.org (full text, mbox):

From: scame <laszlomail <at> protonmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "47313 <at> debbugs.gnu.org" <47313 <at> debbugs.gnu.org>
Subject: Re: bug#47313: 27.1; highlight functions should accept colors too
Date: Mon, 22 Mar 2021 17:44:40 +0000
>
> I'm not sure it is a good idea to make these commands accept both
> faces and colors, as this could make the UI confusing and error prone.
> It may be better to provide new commands, similar to the existing
> ones, but which will accept only the colors instead of faces.

I thought people only used colors to temporarily highlight certain phrases,
etc. If it's not true then you have a point that faces can do more.

At least, the face completion prompt should be improved, so that it shows
the face's style inline like with list-faces-display.This could solve
the color selection problem, because if the face's style is instantly
visible then the user can simply choose a face which is similar to the
color he wants.







Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47313; Package emacs. (Mon, 22 Mar 2021 18:08:01 GMT) Full text and rfc822 format available.

Message #14 received at 47313 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: scame <laszlomail <at> protonmail.com>
Cc: 47313 <at> debbugs.gnu.org
Subject: Re: bug#47313: 27.1; highlight functions should accept colors too
Date: Mon, 22 Mar 2021 20:07:13 +0200
> Date: Mon, 22 Mar 2021 17:44:40 +0000
> From: scame <laszlomail <at> protonmail.com>
> Cc: "47313 <at> debbugs.gnu.org" <47313 <at> debbugs.gnu.org>
> 
> At least, the face completion prompt should be improved, so that it shows
> the face's style inline like with list-faces-display.This could solve
> the color selection problem, because if the face's style is instantly
> visible then the user can simply choose a face which is similar to the
> color he wants.

We could try that, but I fear that the result of showing many faces in
the same buffer one besides the other will look ugly, while displaying
them one face per line would make a very long buffer, scrolling
through which could be impractical.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47313; Package emacs. (Mon, 22 Mar 2021 18:40:02 GMT) Full text and rfc822 format available.

Message #17 received at 47313 <at> debbugs.gnu.org (full text, mbox):

From: scame <laszlomail <at> protonmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "47313 <at> debbugs.gnu.org" <47313 <at> debbugs.gnu.org>
Subject: Re: bug#47313: 27.1; highlight functions should accept colors too
Date: Mon, 22 Mar 2021 18:39:11 +0000
>
> We could try that, but I fear that the result of showing many faces in
> the same buffer one besides the other will look ugly, while displaying
> them one face per line would make a very long buffer, scrolling
> through which could be impractical.

It can't be uglier than the completions of read-color which is pretty bad.
It's a cacophony of colors and some of them are hard to read:

https://i.imgur.com/NtIDihs.png

IMO the list-colors-display UI is much better even if it's longer (and if
it's a completion list then it's easy to narrow it down):

https://www.valenciatech.com/wp-content/uploads/2019/08/gnu-emacs-list-colors-display.png




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47313; Package emacs. (Mon, 22 Mar 2021 18:54:01 GMT) Full text and rfc822 format available.

Message #20 received at 47313 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: scame <laszlomail <at> protonmail.com>
Cc: "47313 <at> debbugs.gnu.org" <47313 <at> debbugs.gnu.org>,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#47313: 27.1; highlight functions should accept colors too
Date: Mon, 22 Mar 2021 19:53:04 +0100
scame <laszlomail <at> protonmail.com> writes:

> I thought people only used colors to temporarily highlight certain phrases,
> etc. If it's not true then you have a point that faces can do more.

I think it makes sense to continue to use faces here (and not
colours) -- people may want underlining or overstrike or whatever.

Adding colours in addition to faces would be a confusing interface, I
think, so I don't think that would work well.  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. (Mon, 22 Mar 2021 18:54:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 47313 <at> debbugs.gnu.org and scame <laszlomail <at> protonmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 22 Mar 2021 18:54:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47313; Package emacs. (Mon, 22 Mar 2021 19:02:02 GMT) Full text and rfc822 format available.

Message #27 received at 47313 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: scame <laszlomail <at> protonmail.com>
Cc: 47313 <at> debbugs.gnu.org
Subject: Re: bug#47313: 27.1; highlight functions should accept colors too
Date: Mon, 22 Mar 2021 21:01:45 +0200
> Date: Mon, 22 Mar 2021 18:39:11 +0000
> From: scame <laszlomail <at> protonmail.com>
> Cc: "47313 <at> debbugs.gnu.org" <47313 <at> debbugs.gnu.org>
> 
> > We could try that, but I fear that the result of showing many faces in
> > the same buffer one besides the other will look ugly, while displaying
> > them one face per line would make a very long buffer, scrolling
> > through which could be impractical.
> 
> It can't be uglier than the completions of read-color which is pretty bad.

I think it can.  But again, you are welcome to try that, perhaps I'm
wrong.

> It's a cacophony of colors and some of them are hard to read:
> 
> https://i.imgur.com/NtIDihs.png

I don't see any cacophony, and have no difficulty reading the names.
Besides, when you see the color itself, why does it matter how it is
named?

> 
> IMO the list-colors-display UI is much better even if it's longer (and if
> it's a completion list then it's easy to narrow it down):
> 
> https://www.valenciatech.com/wp-content/uploads/2019/08/gnu-emacs-list-colors-display.png

FWIW, I'd be annoyed by the length of this long before I found the
color I was after.  But that's me.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 20 Apr 2021 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.