Groovy-Emacs-Modes / groovy-emacs-modes

A groovy major mode, grails minor mode, and a groovy inferior mode.
84 stars 39 forks source link

Groovy-emacs-mode interferes with hi lock mode highlighting #14

Closed sanimalp closed 8 years ago

sanimalp commented 9 years ago

using groovy-emacs-mode appears to interfere in some way with hi-lock mode highlighting. For instance, with groovy mode enabled, as well as 'M-x global-hi-lock-mode' set to 1, i cannot get highliting to work with 'C-x w .' on a higlighted selection. The message log reports "Error during redisplay: (jit-lock-function 2692) signaled (wrong-type-argument stringp nil)"

emacs version 24.4.1, groovy-emacs-mode 201311291207 from elpa

russel commented 9 years ago

That is a very old Groovy Mode. This does not mean the problem is fixed, more that it would be good to work with the latest version. MELPA automatically tracks the Git repository and so should have the most up-to-date version. Can I get you to amend you set up to get packages from MEPLA rather than relying on ELPA?

sanimalp commented 9 years ago

@russel Thank you for your reply. You made an excellent point about the very old version. I updated to version 20150725.1050 and the problem is now resolved. Thanks again!

earl-ducaine commented 9 years ago

Just a note of warning on this. The version of groovy-mode now in Marmalade (MEPLA) does appear to be fixed. But if you installed groovy-mode previously by doing something like the following:

cd ~/.emacs.d/elpa
git clone https://github.com/Groovy-Emacs-Modes/groovy-emacs-modes.git

Make sure that you delete the archive:

~/.emacs.d/elpa/groovy-emacs-modes

Before installing it again via elpa. Otherwise, you'll end up with an inconsistent groovy-mode installation that will present you with annoying errors.

russel commented 9 years ago

Your point about deleting a manually cloned repository from that directory is very important: you should not "git clone" into the ~/.emacs.d/elpa directory. That directory is for the packaging system to control and it expects certain meta-data to be present that is not present in the git clone. The meta-data is generated by the MELPA system when it clones the git repository for update of a package.

Also, MELPA and Marmalade are separate package repositories. The Groovy Mode is delivered via MELPA. As far as I am aware Marmalade is redundant. (Marmalade is a push system whereas MELPA is a pull system, and the pull system is easier to use for packagers, albeit technically more dangerous as a publishing system.)

I do not use MELPA for Groovy Mode: I have a symbolic link in the ~/.emacs.d/elisp directory (which is on Emac's search path for me) into my Git clone so that I can test changes locally before they get uploaded to MELPA. Others can do this as well if wanting to contribute changes to the mode by creating pull requests. However, this means the meta-data that MELPA packages provide is not present and you have to do more manually (in ~/.emacs.d/init.el) with autoload, and mapping modes to file extensions.

earl-ducaine commented 9 years ago

Thanks for the response! I'll have to look into MELPA. I thought it was the same as Marmalade. Now I can stop spreading that particular piece of misinformation.

re: putting things in the elpa repository folder. It was a last resort, since I couldn't (and still can't) get emacs packages to work correctly unless I dump them into the same folder. My own ignorance and technical incompetence I'm sure! But the price is from time to time needing to blow away the whole folder and reinstall.

russel commented 8 years ago

I am assuming this problem has gone away and so am closing this issue. If there is still a problem feel free to post a new issue or reopen this one.