GNU bug report logs -
#44214
28.0.50; css-mode: no completion in declaration with newline after
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Sun, 25 Oct 2020 20:42:01 UTC
Severity: normal
Found in version 28.0.50
Done: Simen Heggestøyl <simenheg <at> runbox.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44214 in the body.
You can then email your comments to 44214 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
simenheg <at> gmail.com, bug-gnu-emacs <at> gnu.org
:
bug#44214
; Package
emacs
.
(Sun, 25 Oct 2020 20:42:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
New bug report received and forwarded. Copy sent to
simenheg <at> gmail.com, bug-gnu-emacs <at> gnu.org
.
(Sun, 25 Oct 2020 20:42:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
X-Debbugs-CC: Simen Heggestøyl <simenheg <at> gmail.com>
1. Create new buffer (or switch to scratch), then M-x css-mode.
2. Replace the contents with the following:
div {
transform:
rota
3. Move the point to the end of 'rota' and type C-M-i.
4. See no completions.
If there is no newline after the colon, before the attribute value,
C-M-i does perform completion.
Originally reported in
https://github.com/company-mode/company-mode/issues/1029
In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.20, cairo version 1.16.0)
of 2020-10-11 built on potemkin
Repository revision: c66165b5c08e12c5dcf494fea42e61df693b80b9
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Ubuntu 20.04.1 LTS
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44214
; Package
emacs
.
(Mon, 26 Oct 2020 09:25:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 44214 <at> debbugs.gnu.org (full text, mbox):
This seems sufficient to me. Would you like to test it out?
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 0d1eeed561..748a561bab 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -1357,7 +1357,9 @@ css--property-values
(defun css--complete-property-value ()
"Complete property value at point."
(let ((property (and (looking-back "\\([[:alnum:]-]+\\):[^/][^;]*"
- (line-beginning-position) t)
+ (or (ppss-innermost-start (syntax-ppss))
+ (point-min))
+ t)
(member (match-string-no-properties 1)
css-property-ids))))
(when property
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44214
; Package
emacs
.
(Mon, 26 Oct 2020 21:58:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 44214 <at> debbugs.gnu.org (full text, mbox):
On 26.10.2020 11:24, Simen Heggestøyl wrote:
> This seems sufficient to me. Would you like to test it out?
Seems to work, yeah!
Thank you.
BTW, is the case when (ppss-innermost-start (syntax-ppss)) is nil, at
all reachable?
Reply sent
to
Simen Heggestøyl <simenheg <at> runbox.com>
:
You have taken responsibility.
(Tue, 27 Oct 2020 14:22:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
bug acknowledged by developer.
(Tue, 27 Oct 2020 14:22:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 44214-done <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> On 26.10.2020 11:24, Simen Heggestøyl wrote:
>> This seems sufficient to me. Would you like to test it out?
>
> Seems to work, yeah!
Nice, I've pushed the fix.
> BTW, is the case when (ppss-innermost-start (syntax-ppss)) is nil, at
> all reachable?
Yes, when called from top level.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44214
; Package
emacs
.
(Tue, 27 Oct 2020 21:07:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 44214 <at> debbugs.gnu.org (full text, mbox):
On 27.10.2020 16:21, Simen Heggestøyl wrote:
> Dmitry Gutov <dgutov <at> yandex.ru> writes:
>
>> On 26.10.2020 11:24, Simen Heggestøyl wrote:
>>> This seems sufficient to me. Would you like to test it out?
>>
>> Seems to work, yeah!
>
> Nice, I've pushed the fix.
Thanks! Seems to work.
>> BTW, is the case when (ppss-innermost-start (syntax-ppss)) is nil, at
>> all reachable?
>
> Yes, when called from top level.
Should the search ever succeed in this case, though? I would suggest to
use (point) instead of (point-min) to auto-fail:
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 748a561bab..747657b1ed 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -1358,7 +1358,7 @@ css--complete-property-value
"Complete property value at point."
(let ((property (and (looking-back "\\([[:alnum:]-]+\\):[^/][^;]*"
(or (ppss-innermost-start
(syntax-ppss))
- (point-min))
+ (point))
t)
(member (match-string-no-properties 1)
css-property-ids))))
Otherwise, we both do the costly-ish search from the bob, and even risk
it succeed in rare cases where the CSS in the previous rule is
incomplete (or the semicolon is omitted), e.g.:
a {
animation-delay: inherit
}
cal|
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44214
; Package
emacs
.
(Tue, 27 Oct 2020 21:12:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 44214 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
>>> BTW, is the case when (ppss-innermost-start (syntax-ppss)) is nil, at
>>> all reachable?
>> Yes, when called from top level.
>
> Should the search ever succeed in this case, though? I would suggest
> to use (point) instead of (point-min) to auto-fail:
>
> [...]
>
> Otherwise, we both do the costly-ish search from the bob, and even
> risk it succeed in rare cases where the CSS in the previous rule is
> incomplete (or the semicolon is omitted)
Good point, I didn't think about that.
Your proposed fixed looks good to me.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44214
; Package
emacs
.
(Wed, 28 Oct 2020 01:45:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 44214 <at> debbugs.gnu.org (full text, mbox):
On 27.10.2020 23:11, Simen Heggestøyl wrote:
> Good point, I didn't think about that.
>
> Your proposed fixed looks good to me.
Thanks, now pushed.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 25 Nov 2020 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 266 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.