From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Newsgroups: gmane.emacs.bugs Subject: bug#23383: [PATCH] Support completion of color functions in CSS mode Date: Wed, 27 Apr 2016 21:16:58 +0200 Message-ID: <1461784618.2119.2@smtp.gmail.com> References: <20160426184852.391f744d@ThinkPax> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=-bAzn4TZ5KABmMhM0F4Yq" X-Trace: ger.gmane.org 1461784712 31195 80.91.229.3 (27 Apr 2016 19:18:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Apr 2016 19:18:32 +0000 (UTC) Cc: 23383@debbugs.gnu.org To: Etienne Prud'homme Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 27 21:18:21 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1avUyb-0006Ms-CL for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 21:18:21 +0200 Original-Received: from localhost ([::1]:44916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avUya-0003G3-PW for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 15:18:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avUyN-0002xj-Bl for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 15:18:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avUyI-0005Lc-6E for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 15:18:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avUyI-0005LY-10 for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 15:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1avUyH-0007LH-UF for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 15:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Apr 2016 19:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23383 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 23383-submit@debbugs.gnu.org id=B23383.146178462828009 (code B ref 23383); Wed, 27 Apr 2016 19:18:01 +0000 Original-Received: (at 23383) by debbugs.gnu.org; 27 Apr 2016 19:17:08 +0000 Original-Received: from localhost ([127.0.0.1]:50600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avUxQ-0007HP-Ay for submit@debbugs.gnu.org; Wed, 27 Apr 2016 15:17:08 -0400 Original-Received: from mail-lf0-f42.google.com ([209.85.215.42]:33513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avUxP-0007DC-4l for 23383@debbugs.gnu.org; Wed, 27 Apr 2016 15:17:07 -0400 Original-Received: by mail-lf0-f42.google.com with SMTP id y84so60915790lfc.0 for <23383@debbugs.gnu.org>; Wed, 27 Apr 2016 12:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:subject:to:cc:message-id:in-reply-to:references :mime-version; bh=lNNfhgB6Q0BsuR/dGekv1gwguVNeQfdupUxJqHEk0gs=; b=fWb86cyQ/b+Ce/pJTp3oo8stOPqKQ7rUubNHdsmeGDfB/lL5baQofy8L/Pu8Z7t90F yLGtYUa26zFu4s9qEuXAkceuUBUJg6+emNLWEwgIie/HcnNRSVaHLsjoz1+ieqdtB8y8 2NgRddDqnRhGrWH00oeDviMW1Ht1Qq/U+6fJIVB3/AtdczvzrG7lPhzCa/mon9ZP2raH 9HBlcc+a48b3kxM4WoBS3V2WKqxfAnPeEm8wCvv9cUKXZSL8AIqEt9BMLpZLNMq97icq hX2q3BKe18l1ZgDAaJMHhjH1Xi0QPfP+EoRqskYFYk/UoVxka0YPXxQKbgTHbMbOREM1 2CJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:subject:to:cc:message-id:in-reply-to :references:mime-version; bh=lNNfhgB6Q0BsuR/dGekv1gwguVNeQfdupUxJqHEk0gs=; b=kc/Xe6AZFKtBUZCat4liOVlQBCif1KQ8ozCQiADyEmR87E6lDr9OVQ2WE4/6NW02r4 R53Yfj5xzZ8Ftl14TOol0JWPQBsq8cuFSObyknrd5NYMK6z5y5ZJvWhe4z8JWjqzy0I2 R/Zy358cT4Vgb5Y5Mod0iGof04bt8MYaOOJE7pZNLJdQe6TmyzO/C7Y1Wx8A3M3Bk6j1 nbb/QXwBvHOfjiDJGkUzWkf8HdyJhGTvraSFNGAZ4bOKBPBXRTIGbFrS3rcFgxsqalKR iZvv/kHiNL4WaoF3Jooy1JZUOpmR/NIsKQLBj1/LkeIviILVFfaGRd5VxS3fbGzaPR/d qWEQ== X-Gm-Message-State: AOPr4FUOD30hT/mfhSra+umWE4732DWMWHRq/jCWDKOE95TrupVpQDA/y06kIW8+2SzrIw== X-Received: by 10.112.125.201 with SMTP id ms9mr4391645lbb.141.1461784621179; Wed, 27 Apr 2016 12:17:01 -0700 (PDT) Original-Received: from [192.168.100.5] (cm-84.210.143.4.getinternet.no. [84.210.143.4]) by smtp.gmail.com with ESMTPSA id i6sm1049574lbc.8.2016.04.27.12.16.59 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Apr 2016 12:17:00 -0700 (PDT) In-Reply-To: <20160426184852.391f744d@ThinkPax> X-Mailer: geary/0.10.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:116962 Archived-At: --=-bAzn4TZ5KABmMhM0F4Yq Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hello Etienne, thanks for the patch. On Wed, Apr 27, 2016 at 12:48 AM, Etienne Prud'homme=20 wrote: > The attached patch adds completion for CSS color functions such as > `rgb()'. Values were taken from the =E2=80=9CCSS Color Module Level 4=E2= =80=9D.=20 > It can > be found at: https://drafts.csswg.org/css-color/#color-type It will be nice to have completion for those new color functions. Some feedback regarding the patch follows. - In the completion definitions we've tried to stay as close as possible to the structure used in the CSS spec. This means that instead of introducing `color-functions' we should make `color' complete directly to "rgb()", "rgba()", and so on, then `hex-color', `named-color' and the literal `currentcolor' (I think we can skip `deprecated-system-color'). `named-color' will then contain the literal color names like `color' does now. - One of the tests in test/lisp/textmodes/css-mode-tests.el needs updating. To see this, run `make lisp/textmodes/css-mode-tests' from the test directory. - Please wrap lines around column 70 or so to stay in line with the rest of the file. > As a sidenote, how should we handle functions? Since they use > parentheses, the point is going to be outside of parentheses. >=20 > Eg. > rgba()* > ^(point) True, I'm not sure how to best solve it. > Also, should we include the parameters number? I think that's rather a job for something like ElDoc (I'm currently working on adding ElDoc support to CSS mode). -- Simen = --=-bAzn4TZ5KABmMhM0F4Yq Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Etienne, thanks for the patch.

On Wed, Apr 27, 2016 at 12:48 A= M, Etienne Prud'homme <e.e.f.prudhomme@gmail.com> wrote:
The attached patch adds completion for CSS color functions such as `rgb()'. Values were taken from the =E2=80=9CCSS Color Module Level 4=E2=80= =9D. It can be found at: htt= ps://drafts.csswg.org/css-color/#color-type

=
It will be nice to have completion for those new color func= tions. Some
feedback regarding the patch follows.

<= /div>
- In the completion definitions we've tried to stay as close as p= ossible
  to the structure used in the CSS spec. This means = that instead of
  introducing `color-functions' we should ma= ke `color' complete directly
  to "rgb()", "rgba()", and so = on, then `hex-color', `named-color' and
  the literal `curre= ntcolor' (I think we can skip
  `deprecated-system-color'). = `named-color' will then contain the
  literal color names li= ke `color' does now.

- One of the tests in test/li= sp/textmodes/css-mode-tests.el needs
  updating. To see this= , run `make lisp/textmodes/css-mode-tests' from
  the test d= irectory.

- Please wrap lines around column 70 or = so to stay in line with the rest
  of the file.
<= br>
As a sidenote, how should we handle functions? Since they use parentheses, the point is going to be outside of parentheses. Eg. rgba()* ^(point)

True, I'm not sure how= to best solve it.

Also, should we include the parameters= number?

I think that's rather a job for so= mething like ElDoc (I'm currently
working on adding ElDoc support= to CSS mode).

-- Simen
= --=-bAzn4TZ5KABmMhM0F4Yq--