From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: /srv/bzr/emacs/trunk r102478: shr.el (shr-tag-color-check):Convert colors to hexadecimal with shr-color->hexadecimal. Date: Tue, 23 Nov 2010 16:05:03 -0800 Message-ID: <4F815C192A5E4E98AC8DDA0CD05249C4@us.oracle.com> References: <961v6bom3j.fsf@fencepost.gnu.org> <87eiabdc04.fsf@stupidchicken.com><87ipznhhe3.fsf@keller.adm.naquadah.org><87mxoz7mml.fsf@stupidchicken.com> <874ob71y6v.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1290557181 15089 80.91.229.12 (24 Nov 2010 00:06:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 24 Nov 2010 00:06:21 +0000 (UTC) To: "'Chong Yidong'" , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 24 01:06:10 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PL2sB-00008w-D5 for ged-emacs-devel@m.gmane.org; Wed, 24 Nov 2010 01:06:07 +0100 Original-Received: from localhost ([127.0.0.1]:52017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PL2sA-0002ea-Qi for ged-emacs-devel@m.gmane.org; Tue, 23 Nov 2010 19:06:06 -0500 Original-Received: from [140.186.70.92] (port=57420 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PL2s1-0002dQ-SC for emacs-devel@gnu.org; Tue, 23 Nov 2010 19:06:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PL2rt-0004H4-Ao for emacs-devel@gnu.org; Tue, 23 Nov 2010 19:05:57 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:62023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PL2rs-0004Gu-S4 for emacs-devel@gnu.org; Tue, 23 Nov 2010 19:05:49 -0500 Original-Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oAO05j0h005155 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 24 Nov 2010 00:05:47 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oANLfPr3001526; Wed, 24 Nov 2010 00:05:45 GMT Original-Received: from abhmt009.oracle.com by acsmt353.oracle.com with ESMTP id 801513251290557103; Tue, 23 Nov 2010 16:05:03 -0800 Original-Received: from dradamslap1 (/10.159.218.132) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 23 Nov 2010 16:05:03 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <874ob71y6v.fsf@stupidchicken.com> Thread-Index: AcuLXZgWNa/3/ZPdTgGpp2D9HZ45CgAAd8/g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:133101 Archived-At: > I see. Why not just use hexrgb.el (or build on it)? It's been around > long enough that such teething problems should have been eliminated. > > Drew Adams has an assignment on file; if he is willing to include > hexrgb.el under that assignment, we could simply add that to Emacs. > Whatever additional functionality you need that isn't already present, > you could then simply add. Almost missed this mail - haven't been following this thread. Yes, you can include hexrgb.el in Emacs if you want. There is no doubt some overlap between `hexrgb-read-color' in hexrgb.el and `read-color' in Emacs (originally from hexrgb.el, but modified since). Someone should take a look, to see if you need to merge/adapt some things (e.g. in facemenu.el). Some things like extra defcustom :group's will need to be removed from the hexrgb.el code. Some of the hexrgb.el code uses functions and vars from eyedropper.el, but not in any essential way. This part lets you use colors that you pick up from under the cursor or the pointer, as with an eyedrop. These parts can be cut out of the hexrgb.el code, or you can also include eyedropper.el in Emacs (it is small). Some of the eyedropper.el functions have already been added to Emacs (`face-at-point' is `eyedropper-face-at-point' etc.). That's another possibility: add the eyedropper.el code but drop the prefix `eyedrop-'. There are two places where the hexgrb.el code is conditional for Emacs 20: - work around an Emacs 20 bug: (= N N) returns t for a Nan - use of `try-completion' if `test-completion' is not defined These are short enough and benign enough that I'd hope they could stay in the code. I'm willing to make changes that you request. If there are no incompatible changes, so I can also use it for my local needs, then I won't need to also maintain it separately (locally). Otherwise (incompatible changes, stuff removed that I need), then I will either need to also maintain a local version or move the differences to another local file. Depends on what changes you require. The code is here: http://www.emacswiki.org/emacs/hexrgb.el http://www.emacswiki.org/emacs/eyedropper.el