groovy-emacs-modes icon indicating copy to clipboard operation
groovy-emacs-modes copied to clipboard

Update groovy-electric for latest groovy-mode

Open sammyjava opened this issue 6 years ago • 4 comments

My version: This is GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-17 on lgw01-04, modified by Debian

Leaving directory `/home/sam/.emacs.d/elpa/s-20170428.1026'

Compiling file /home/sam/.emacs.d/elpa/s-20170428.1026/s-pkg.el at Mon Jul 24 07:02:57 2017
Entering directory `/home/sam/.emacs.d/elpa/s-20170428.1026/'

Compiling file /home/sam/.emacs.d/elpa/s-20170428.1026/s.el at Mon Jul 24 07:02:57 2017

Compiling no file at Mon Jul 24 07:03:00 2017
Leaving directory `/home/sam/.emacs.d/elpa/gradle-mode-20150313.1205'

Compiling file /home/sam/.emacs.d/elpa/gradle-mode-20150313.1205/gradle-mode-pkg.el at Mon Jul 24 07:03:00 2017
Entering directory `/home/sam/.emacs.d/elpa/gradle-mode-20150313.1205/'

Compiling file /home/sam/.emacs.d/elpa/gradle-mode-20150313.1205/gradle-mode.el at Mon Jul 24 07:03:00 2017

Compiling no file at Mon Jul 24 07:05:32 2017
Leaving directory `/home/sam/.emacs.d/elpa/groovy-mode-201203310931'

Compiling file /home/sam/.emacs.d/elpa/groovy-mode-201203310931/groovy-mode-pkg.el at Mon Jul 24 07:05:32 2017
Entering directory `/home/sam/.emacs.d/elpa/groovy-mode-201203310931/'

Compiling file /home/sam/.emacs.d/elpa/groovy-mode-201203310931/groovy-mode.el at Mon Jul 24 07:05:32 2017

In groovy-lineup-arglist:
groovy-mode.el:437:38:Warning: reference to free variable
    `c-syntactic-element'

In groovy-mode:
groovy-mode.el:566:25:Warning: (lambda nil ...) quoted with ' rather than with
    #'
groovy-mode.el:566:25:Warning: (lambda nil ...) quoted with ' rather than with
    #'

In end of data:
groovy-mode.el:592:1:Warning: the function `c-populate-syntax-table' might not
    be defined at runtime.

sammyjava avatar Jul 24 '17 13:07 sammyjava

Hummm… I didn't spot it earlier (I should have, sorry), but this is trying to bring in the ELPA 2012-03 version of groovy-mode after bringing in the ELPA 2015-03 one and rather than bringing in the MELPA 2017-07 one. That the 2015-03 worked but the 2012-03 one didn't shows that the bug got fixed, but why bring in two versions? I am non-plussed on that one. Of course since then we have thrown away that whole code and replaced it. So we need to get you using the right version of groovy-mode rather than trying to solve the bug in this case. The core here is not you are getting ELPA stuff but not MELPA stuff. This indicates a ~/.emacs or ~/emacs.d/init.el problem. I have to admit I have ditched ~/.emacs completely in favour of using ~/.emacs.d/init.el. Do you perhaps have both? I guess we need to take a careful look at the ELisp code to see whjich of ELPA or MELPA is actually being called for.

russel avatar Jul 24 '17 14:07 russel

I think I had MELPA installed wrong. I've done so again using the package tool within emacs, although it's installing under emacs.d/elpa. But it's the current version:

sam@elite:~$ ls -l .emacs.d/elpa/
total 32
drwxrwxr-x 5 sam sam 4096 Jul 24 07:02 archives
drwxrwxr-x 2 sam sam 4096 Jul 24 09:09 cypher-mode-20151110.342
drwx------ 2 sam sam 4096 Feb 22  2016 gnupg
-rw-rw-r-- 1 sam sam  120 Jul 24 07:03 gradle-mode-readme.txt
drwxr-xr-x 2 sam sam 4096 Jul 24 09:10 groovy-mode-20170718.234
-rw-rw-r-- 1 sam sam  402 Jul 24 09:10 groovy-mode-readme.txt
drwxrwxr-x 2 sam sam 4096 Jul 24 09:10 s-20170428.1026
-rw-rw-r-- 1 sam sam  235 Jul 24 07:25 web-mode-readme.txt

and it's still throwing warnings, not that this is really worth spending much time on, and seems perhaps a dependency providing the c-* functions is missing.


Compiling no file at Mon Jul 24 09:10:50 2017
Leaving directory `/home/sam/.emacs.d/elpa/groovy-mode-20170718.234'

Compiling file /home/sam/.emacs.d/elpa/groovy-mode-20170718.234/groovy-electric.el at Mon Jul 24 09:10:50 2017
Entering directory `/home/sam/.emacs.d/elpa/groovy-mode-20170718.234/'

In end of data:
groovy-electric.el:194:1:Warning: the function `c-literal-limits' is not known
    to be defined.

Compiling file /home/sam/.emacs.d/elpa/groovy-mode-20170718.234/groovy-mode.el at Mon Jul 24 09:10:50 2017

Compiling file /home/sam/.emacs.d/elpa/groovy-mode-20170718.234/inf-groovy.el at Mon Jul 24 09:10:50 2017
inf-groovy.el:92:1:Warning: global/dynamic var `groovysh' lacks a prefix
inf-groovy.el:102:1:Warning: defcustom for `groovysh-args' fails to specify
    containing group
inf-groovy.el:102:1:Warning: defcustom for `groovysh-args' fails to specify
    containing group

In end of data:
inf-groovy.el:411:1:Warning: the following functions are not known to be defined: c-end-of-defun,
    c-beginning-of-defun

But I don't think this is worth spending any time on, especially if it's just my config that's wacky. Feel free to close this and thanks again for all the help! I've got all my non-repo modes loaded from MELPA now, so that's a nice improvement!

sammyjava avatar Jul 24 '17 15:07 sammyjava

OK, we now have some serious problems that need to be fixed!

What is highlighted here is that the groovy-electric.el file is still the one for the old groovy-mode.el – I am surprised this hasn't been raised sooner, it is a bit of a cock up.

The other point relates to the inf-groovy.el and indicates a bug we thought had been fixed has been reverted in some way. So two distinct and separate problems here. Though it too appears to have old groovy-mode bits that should have gone.

(Any Elisp function starting c- is related to the CC Mode base of the old groovy-mode implementation.)

russel avatar Jul 24 '17 15:07 russel

Ahh, well happy to be the canary in the coal mine. In any case, it seems to be working for my purposes, so I'm not an asphyxiated canary.

sammyjava avatar Jul 24 '17 16:07 sammyjava