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#22923: [PATCH] Support completion of attribute values in CSS mode Date: Wed, 23 Mar 2016 19:17:56 +0100 Message-ID: <1458757076.18872.0@smtp.gmail.com> References: <1457272432.10399.0@smtp.gmail.com> <1457550112.3805.2@smtp.gmail.com> <0400ddb1-6995-eb93-2dde-c7d5a5a992b0@yandex.ru> <1458391338.13455.0@smtp.gmail.com> <1458551649.2272.0@smtp.gmail.com> <7d30e9bd-b376-f1ba-527a-268a8e4d0fce@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=-SyJq81tDZfZJdiLBHqsV" X-Trace: ger.gmane.org 1458757170 24811 80.91.229.3 (23 Mar 2016 18:19:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2016 18:19:30 +0000 (UTC) Cc: 22923-done@debbugs.gnu.org, Stefan Monnier To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 23 19:19:16 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 1ainNA-0000VF-AV for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Mar 2016 19:19:12 +0100 Original-Received: from localhost ([::1]:45360 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ainN9-0002rR-GO for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Mar 2016 14:19:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ainN5-0002pW-7u for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 14:19:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ainN1-00049k-7I for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 14:19:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ainN1-00049a-3j for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 14:19:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ainN1-0007zZ-0Q for bug-gnu-emacs@gnu.org; Wed, 23 Mar 2016 14:19:03 -0400 Resent-From: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Mar 2016 18:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 22923 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 22923@debbugs.gnu.org, simenheg@gmail.com, simenheg@gmail.com Original-Received: via spool by 22923-done@debbugs.gnu.org id=D22923.145875708630610 (code D ref 22923); Wed, 23 Mar 2016 18:19:02 +0000 Original-Received: (at 22923-done) by debbugs.gnu.org; 23 Mar 2016 18:18:06 +0000 Original-Received: from localhost ([127.0.0.1]:34708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ainM6-0007xd-J0 for submit@debbugs.gnu.org; Wed, 23 Mar 2016 14:18:06 -0400 Original-Received: from mail-lf0-f51.google.com ([209.85.215.51]:33204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ainM4-0007x3-Hd for 22923-done@debbugs.gnu.org; Wed, 23 Mar 2016 14:18:04 -0400 Original-Received: by mail-lf0-f51.google.com with SMTP id o73so17717716lfe.0 for <22923-done@debbugs.gnu.org>; Wed, 23 Mar 2016 11:18:04 -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=xVD5OOmtuewu6Dfqxp9HtFnIaLDhrOG1p/AfwCFN0BE=; b=OuVY5MLi8ku+qUUDvXtsbRoTGxjVDG/j5J/ayzGjQ8T96J5/N4hDQGRIeFuquGBXIL uTEB8u5VflW1fRy15/ijZpuA/YIL1L85q1gKndxmmLGhFjCzDJ6PzOJ+p4v64w+VwxQE 5QrkhmE3pVGaVFXwW3zQEHWhBwWHQrIPT2ygs6SYMydDKf0dVJ4TaIG017g958z31evy WllNmgjC4T3DzMJwleFt/kieTNxodW1a3p2SI1/8XLChfGm8D+P5/KOJ9/5XrdCyKSXT d94iOIahsVgiWaegUOWM1ji+ImIaL4cggQutaM2qaRQ3CHTxvHc7NpFhw/q1gI6SE+6Y rnqw== 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=xVD5OOmtuewu6Dfqxp9HtFnIaLDhrOG1p/AfwCFN0BE=; b=i0OR+ZU1eUevS8s9aB9T1APeNL1RJ3o6wJSIbhwVuuYjG1/P579SIOoSkZEirvywd6 UWePBJnalA2s/iDCmk166aJBDHlIDlkABINrx3nsGq150EW3Zb+g0SAM01n7ANEef396 szm8W60IPeVduDpUf0pSK0jEsm8sSXgwCED3HY1AlXo+ixj0h6RGX6Y0SSbj628UofOq 4vIWo3RtTRxyXTmrfbx5nqWvsamhBv9nWdQ0DN2uz46M1NXT7V7xxugf7o85dyYcjgFy 5PtiyDL6FcLqsjbCwrk2u5j9rTbeEr5QzoCXfP71ZeJSSCyluKbU6RAzC4lvWT0uFKs1 1PPw== X-Gm-Message-State: AD7BkJKVjG2VYC3kx1F4qBhU/IzLe5uqvAJuZRQbCYDRaMKRFKbMLE+uSVim2Z5zgR36tw== X-Received: by 10.25.28.140 with SMTP id c134mr1460378lfc.99.1458757078682; Wed, 23 Mar 2016 11:17:58 -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 jb5sm579711lbc.8.2016.03.23.11.17.57 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Mar 2016 11:17:58 -0700 (PDT) In-Reply-To: <7d30e9bd-b376-f1ba-527a-268a8e4d0fce@yandex.ru> 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115402 Archived-At: --=-SyJq81tDZfZJdiLBHqsV Content-Type: text/plain; charset=utf-8; format=flowed On Mon, Mar 21, 2016 at 12:02 PM, Dmitry Gutov wrote: > You're right, it's a bug. I'd fix that with only making > company-css-value-classes recursive (but not refer back to > company-css-property-alist there). > > To put it differently, I don't like that there's conflation of > property values and property names: if there appears a value > sometimes that is the same as some property's name (unlikely, I > know), it would be hard to represent in the proposed structure. > > Anyway, I've taken more than enough of your time. Please go ahead > with whichever version you prefer. Don't worry Dmitry, I very much appreciate your through reviews. You are right that there are some cases where property names and value class names are the same (there are currently four), and I found a bug in my handling of one of those. I remedied that by going with your suggestion of making value classes symbols again, and only referring to other value classes from those. For properties, I made them also refer to value classes by default, but made it possible to refer back to other properties in the cases where the reference isn't found in the value class alist. I attempted to document this thoroughly in the code and added some tests that should cover the tricky cases. I've installed the patch with the changes mentioned above. Thanks again! -- Simen --=-SyJq81tDZfZJdiLBHqsV Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Mar 21, 2016 at 12:02 PM, Dmitry Gutov <dgutov@yandex.ru> wro= te:
You're right, it's a bug. I'd fix that with only making com= pany-css-value-classes recursive (but not refer back to company-css-propert= y-alist there). To put it differently, I don't like that there's conflation of property val= ues and property names: if there appears a value sometimes that is the same= as some property's name (unlikely, I know), it would be hard to represent = in the proposed structure. Anyway, I've taken more than enough of your time. Please go ahead with whic= hever version you prefer.

Don't worry Dmitr= y, I very much appreciate your through reviews.

Yo= u are right that there are some cases where property names and value
<= div>class names are the same (there are currently four), and I found a bug<= /div>
in my handling of one of those. I remedied that by going with you= r
suggestion of making value classes symbols again, and only refe= rring to
other value classes from those.

For properties, I made them also refer to value classes by default, but
made it possible to refer back to other properties in the cases whe= re
the reference isn't found in the value class alist.
=
I attempted to document this thoroughly in the code and adde= d some tests
that should cover the tricky cases.

I've installed the patch with the changes mentioned above.

Thanks again!

-- Sime= n
= --=-SyJq81tDZfZJdiLBHqsV--