unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Niels Giesen <niels.giesen@gmail.com>
To: Wojciech Meyer <wojciech.meyer@googlemail.com>
Cc: Ted Zlatanov <tzz@lifelogs.com>,
	Lennart Borgman <lennart.borgman@gmail.com>,
	emacs-devel@gnu.org
Subject: Re: [PATCH] Add rainbow-mode
Date: Wed, 4 Aug 2010 10:05:00 +0200	[thread overview]
Message-ID: <AANLkTik6dHkqf9+3uaiOxf+i9QHxe9KE3YpeTO0bFquV@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinWEu0sZUEFDCxfAAHnsrsfj=DMuy6mwsEMD3_s@mail.gmail.com>

Hi all,

Sorry for chiming in this late, but I had little time. So here are my thoughts.

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-colors.

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 == 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
<wojciech.meyer@googlemail.com> wrote:
> <lennart.borgman@gmail.com> wrote:
>> 2010/8/2 Ted Zlatanov <tzz@lifelogs.com>:
>>>
>>> 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 quite
>>> LB> sure). Are you really sure of this?
>>>
>>> I agree it doesn't have all the CSS-specific functionality.  Is there
>>> 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
>



-- 
http://pft.github.com



  reply	other threads:[~2010-08-04  8:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-27 12:50 [PATCH] Add rainbow-mode Julien Danjou
2010-07-27 13:19 ` Lennart Borgman
2010-07-27 13:44   ` Drew Adams
2010-07-30 17:13     ` Ted Zlatanov
2010-07-30 22:11       ` Lennart Borgman
2010-07-30 22:59         ` Wojciech Meyer
2010-07-30 23:41           ` Lennart Borgman
2010-07-31  0:39             ` Wojciech Meyer
2010-08-02 14:46         ` Ted Zlatanov
2010-08-02 16:06           ` Lennart Borgman
2010-08-02 16:49             ` Wojciech Meyer
2010-08-04  8:05               ` Niels Giesen [this message]
2010-08-04 14:11                 ` Ted Zlatanov
2010-08-04 15:17                   ` Chong Yidong
2010-08-09  8:47                   ` Julien Danjou
2010-08-10 14:00                   ` Julien Danjou
2010-08-10 15:54                     ` Ted Zlatanov
2010-08-10 16:00                     ` Lennart Borgman
2010-08-10 18:06                       ` Julien Danjou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTik6dHkqf9+3uaiOxf+i9QHxe9KE3YpeTO0bFquV@mail.gmail.com \
    --to=niels.giesen@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.com \
    --cc=tzz@lifelogs.com \
    --cc=wojciech.meyer@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).