From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Niels Giesen Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add rainbow-mode Date: Wed, 4 Aug 2010 10:05:00 +0200 Message-ID: References: <1280235011-12761-1-git-send-email-julien@danjou.info> <87zkx8nb9e.fsf@lifelogs.com> <877hk9gjhp.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1280910376 497 80.91.229.12 (4 Aug 2010 08:26:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 4 Aug 2010 08:26:16 +0000 (UTC) Cc: Ted Zlatanov , Lennart Borgman , emacs-devel@gnu.org To: Wojciech Meyer Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 04 10:26:12 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 1OgZIi-0007KW-DE for ged-emacs-devel@m.gmane.org; Wed, 04 Aug 2010 10:26:12 +0200 Original-Received: from localhost ([127.0.0.1]:60472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OgZIh-00007r-CY for ged-emacs-devel@m.gmane.org; Wed, 04 Aug 2010 04:26:11 -0400 Original-Received: from [140.186.70.92] (port=35361 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OgYyR-0001He-A5 for emacs-devel@gnu.org; Wed, 04 Aug 2010 04:05:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OgYyE-0004na-O0 for emacs-devel@gnu.org; Wed, 04 Aug 2010 04:05:06 -0400 Original-Received: from mail-fx0-f41.google.com ([209.85.161.41]:46722) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgYyE-0004nM-Ie for emacs-devel@gnu.org; Wed, 04 Aug 2010 04:05:02 -0400 Original-Received: by fxm20 with SMTP id 20so2480292fxm.0 for ; Wed, 04 Aug 2010 01:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=HBbvLnuP3Y+HQnLW7P1AaGpF4ELDTPhDZxws386VNY4=; b=jd9hRYw3GXSC+DC/004q4CcxUa2vGD6G+VubnKoMtoNSt/w20cxU+p8kHoH1gcPmdM /2fAdbifvDrtBpzcK/zcx8rj1tf1TqPFJdvhlRRY8wOzoPy5zEyJ3YrsiXJh5mTEXv1O 0xFLsIvcQgmu+HHrqnDvmdaLshP6ld1resjcU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=moktBv6YqwxMMj/lxZK2Axn2qwEbZCn7gbykcf6751PasNS9oSdr55ITzOxkMYAjF1 4AECg8AZHvDYDJzL7AFFsmhZ91UosLFET+U0s5HDCuSm77IKSK9xi+u8LXFMm59DuJU+ zt0qlndbcIpysFfHVsPIMeFeE9HvxWkH9dmNQ= Original-Received: by 10.239.134.134 with SMTP id 6mr376837hbz.159.1280909100363; Wed, 04 Aug 2010 01:05:00 -0700 (PDT) Original-Received: by 10.239.185.71 with HTTP; Wed, 4 Aug 2010 01:05:00 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Wed, 04 Aug 2010 04:23:50 -0400 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:128214 Archived-At: Hi all, Sorry for chiming in this late, but I had little time. So here are my thoug= hts. This morning I finally got a chance to look at rainbow-mode. I must say I like the clearness of the code. I definitely want to see wether css-color.el can learn from it. It seems rainbow-mode is less css-specific or more generic in that it also handles LaTeX colors and x-defined-colors. On the other hand, rainbow-mode does not handle all color notations valid in css (no hsl()). Css-color-mode currently only handles colors that are (also) valid css-colo= rs. In my view, the biggest plus of css-color are the conversions, whereas the biggest plus of rainbow-mode is the automatic handling of major-modes. I would be open to add support for more color notations, possibly user-configurable. We may make `css-color-type-circle' buffer-local and use rainbow-mode's handling of major modes to set the appropriate ring. This means adding appropriate conversion functions, and bailing out when the ring contains just one type (i.e., new type =3D=3D old type). We could opt to still do font-locking of all color notations regardless of the major-mode, or split up font-lock-keywords the same way that rainbow-mode does. Regards, Niels. On Mon, Aug 2, 2010 at 6:49 PM, Wojciech Meyer wrote: > wrote: >> 2010/8/2 Ted Zlatanov : >>> >>> LB> I do not think rainbow-mode has all the functionality in >>> LB> css-color-mode (but I only glanced at rainbow-mode so I am not quit= e >>> LB> sure). Are you really sure of this? >>> >>> I agree it doesn't have all the CSS-specific functionality. =C2=A0Is th= ere >>> something specific you need? >> >> I would be glad to get Niels comments on this. I do not think there is >> much that is very css-specific. (For example the conversion between >> different color notations could be useful in other places). > > I have seen HSV and HSL conversions, pluss css-color-mode works > in every mode. The name is a bit specific only. > >> >>> rainbow-mode.el is more generally useful and can support the >>> CSS-specific code, whereas css-color-mode.el can't support tex-mode for >>> instance. >> >> I am surprised to read that, but then perhaps functionality from the >> both minor modes should be merged? > > Yes, I think it should be. > > Wojciech > --=20 http://pft.github.com