all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#27392: 26.0.50; [css-mode] Completion fails after "grid" is typed out
@ 2017-06-16 10:01 Dmitry Gutov
  2017-06-16 18:23 ` Simen Heggestøyl
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Gutov @ 2017-06-16 10:01 UTC (permalink / raw)
  To: 27392

With these buffer contents (with point at |), press C-M-i:

html {
   gri|
}


It completes to "grid". Press C-M-i again: "No match".

Even though css-mode knows about various grid-** properties, it fails to 
suggest them in this situation.

It *does* offer them as completions after "gri" for `company-capf', however.

Same for "border", "animation" and probably others.

It's a problem for company-capf in particular because with 
company-require-match, after you `M-x company-capf', you're not allowed 
to type out the last letter of each respective word.

It's also a problem in discoverability.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#27392: 26.0.50; [css-mode] Completion fails after "grid" is typed out
  2017-06-16 10:01 bug#27392: 26.0.50; [css-mode] Completion fails after "grid" is typed out Dmitry Gutov
@ 2017-06-16 18:23 ` Simen Heggestøyl
  2017-06-16 20:33   ` Dmitry Gutov
  0 siblings, 1 reply; 4+ messages in thread
From: Simen Heggestøyl @ 2017-06-16 18:23 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 27392

[-- Attachment #1: Type: text/plain, Size: 180 bytes --]

It seems to be because 'css--complete-property-value' is a bit too 
eager.

Can you try with the following patch? If it's sufficent I'll install it
with some test cases.

-- Simen

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-WIP-Make-css-complete-property-value-less-eager.patch --]
[-- Type: text/x-patch, Size: 984 bytes --]

From baf93870893be37e4f214963bdb31659d7514af7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= <simenheg@gmail.com>
Date: Fri, 16 Jun 2017 20:19:56 +0200
Subject: [PATCH] WIP: Make css--complete-property-value less eager

---
 lisp/textmodes/css-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 0beaaaa32f..3c3c38afc9 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -1292,7 +1292,8 @@ css--complete-property-value
            (let ((property-end (point)))
              (skip-chars-backward "-[:alnum:]")
              (let ((property (buffer-substring (point) property-end)))
-               (car (member property css-property-ids)))))))
+               (and (eq (char-after property-end) ?:)
+                    (car (member property css-property-ids))))))))
     (when property
       (let ((end (point)))
         (save-excursion
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#27392: 26.0.50; [css-mode] Completion fails after "grid" is typed out
  2017-06-16 18:23 ` Simen Heggestøyl
@ 2017-06-16 20:33   ` Dmitry Gutov
  2017-06-17  8:40     ` Simen Heggestøyl
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Gutov @ 2017-06-16 20:33 UTC (permalink / raw)
  To: Simen Heggestøyl; +Cc: 27392

On 6/16/17 9:23 PM, Simen Heggestøyl wrote:
> It seems to be because 'css--complete-property-value' is a bit too eager.
> 
> Can you try with the following patch? If it's sufficent I'll install it
> with some test cases.

Looks like it does fix the problem. Thanks!





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#27392: 26.0.50; [css-mode] Completion fails after "grid" is typed out
  2017-06-16 20:33   ` Dmitry Gutov
@ 2017-06-17  8:40     ` Simen Heggestøyl
  0 siblings, 0 replies; 4+ messages in thread
From: Simen Heggestøyl @ 2017-06-17  8:40 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 27392-done

Installed a similar fix as 8960f6aa36000a8d6014e0c7371ee96ba148965a.

Thanks for reporting!

-- Simen






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-17  8:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-16 10:01 bug#27392: 26.0.50; [css-mode] Completion fails after "grid" is typed out Dmitry Gutov
2017-06-16 18:23 ` Simen Heggestøyl
2017-06-16 20:33   ` Dmitry Gutov
2017-06-17  8:40     ` Simen Heggestøyl

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.