emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#30377: closed (27.0.50; Missing and misspelled SHR


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#30377: closed (27.0.50; Missing and misspelled SHR/CSS colors)
Date: Wed, 07 Feb 2018 21:20:02 +0000

Your message dated Wed, 07 Feb 2018 22:19:01 +0100
with message-id <address@hidden>
and subject line Re: bug#30377: 27.0.50; Missing and misspelled SHR/CSS colors
has caused the debbugs.gnu.org bug report #30377,
regarding 27.0.50; Missing and misspelled SHR/CSS colors
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
30377: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30377
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 27.0.50; Missing and misspelled SHR/CSS colors Date: Wed, 07 Feb 2018 03:37:05 +0000

Attachment: 0001-Fix-shr-and-CSS-4-color-maps.patch
Description: Text Data

I attach a patch to fix the following minor issues.

1. The variable shr-color-html-colors-alist from lisp/net/shr-color.el
   is missing the CSS 4 colour RebeccaPurple and contains typos in the
   hex value of colours MediumPurple and PaleVioletRed.

2. The variable css--color-map from lisp/textmodes/css-mode.el is
   missing the magenta and cyan aliases of fuchsia and aqua,
   respectively.

I have taken the liberty of CCing the authors of these features both for
comment on this patch, but more importantly to address Eli's question
from bug#25525 anew:

> I wonder whether it would make sense to reuse some existing data and
> code here?

In that bug report, which introduced css--color-map, Eli was referring
to the list of colours in lisp/term/tty-colors.el.  I would instead like
to draw attention to the overlap between css--color-map and
shr-color-html-colors-alist.

In particular, applying the patch proposed herein satisfies the
following condition:

  (seq-set-equal-p
   css--color-map
   shr-color-html-colors-alist
   (lambda (a b)
     (and (eq t (compare-strings (car a) nil nil (car b) nil nil t))
          (eq t (compare-strings (cdr a) nil nil (cdr b) nil nil t)))))

In other words, css--color-map and shr-color-html-colors-alist become
identical, bar letter case.  I have additionally cross-checked the
updated maps with the latest CSS spec[1] and did not find any other
omissions.

[1] https://www.w3.org/TR/css-color-4/.

So, would it be reasonable for one mode to reuse the map of the other?
A (very) cursory glance through bug#25525 and lisp/net/shr-color.el
suggests there may be some further code duplication pertaining to colour
distances; is this so?

Thanks (and apologies if the noise is unjustified),

-- 
Basil

In GNU Emacs 27.0.50 (build 4, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll 
bars)
 of 2018-02-03 built on thunk
Repository revision: 84c9dba4cee052b68b194c3a2e5c297a94d8c8af
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Debian GNU/Linux buster/sid

--- End Message ---
--- Begin Message --- Subject: Re: bug#30377: 27.0.50; Missing and misspelled SHR/CSS colors Date: Wed, 07 Feb 2018 22:19:01 +0100
I've installed the patch, thanks again, Basil.

I'm closing this ticket, but I think the discussion regarding color
distances could continue naturally at the still-open Bug#30295.

-- Simen

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]