drupal-mode icon indicating copy to clipboard operation
drupal-mode copied to clipboard

Failing installs via MELPA

Open danepowell opened this issue 8 years ago • 7 comments

I'm running Emacs 25 on Mac OS X. I'm trying to install drupal-mode by simply running M-x, package-install, drupal-mode.

It seems that all of drupal-mode's "optional" dependencies are actually required when installed this way, as the install fails with a lot of errors about missing dependencies. I was able to resolve a few of them by installing flymake-phps, ggtags, php-mode, and others (deleting the drupal-mode directory in the .emacs.d/elpa folder each time), but I still can't figure out how to resolve this:

helm-gtags.el:28:1:Error: Cannot open load file: No such file or directory, helm-gtags

gtags.el:28:1:Error: Cannot open load file: No such file or directory, gtags

danepowell avatar Mar 02 '17 17:03 danepowell

Something is definitely off there. Those files are only supposed to be loaded if you already have their dependencies loaded. To take one example, in drupal-mode.el:

(eval-after-load 'helm-gtags '(require 'drupal/helm-gtags))

Causes the helm-gtags support to only be loaded after helm-gtags has been loaded.

Do you see other references to helm-gtags in the drupal-mode directory apart from that and the file itself?

xendk avatar Mar 02 '17 19:03 xendk

Yeah that's what I figured, I just can't understand why Emacs would be trying to load them even though they're not present. But I'm completely new to the built-in packaging system.

If I run grep -ri "helm" . on the .emacs.d/elpa/drupal-mode* directory, the only hits are the line you mentioned in drupal-mode.el, drupal-mode.elc (presumably the same thing but compiled), and drupal/helm-gtags.el (obviously).

danepowell avatar Mar 02 '17 20:03 danepowell

I can reproduce this error even after completely emptying out my .emacs.d directory except for init.el, which contains just this:

(require 'package) ;; You might already have this line
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/"))
(when (< emacs-major-version 24)
  ;; For important compatibility libraries like cl-lib
  (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize) ;; You might already have this line

danepowell avatar Mar 02 '17 20:03 danepowell

Tried installing it via list-packages instead? Doubt it makes much difference though.

Tried installing other packages? expand-region and smartparens seems to have a bunch of eval-after-loads too.

Hope @arnested has better ideas.

xendk avatar Mar 02 '17 22:03 xendk

list-packages behaves no differently.

I am able to install expand-region and smartparens just fine.

Does emacs store configuration anywhere other than ~/.emacs.d? I'm just trying to figure out what could possibly be misconfigured on my machine, if anything.

One thing is that Mac installs a very old version of emacs by default (I think 22). I updated it to 25 via Homebrew. Could it be conflicting with the older version somehow?

danepowell avatar Mar 03 '17 01:03 danepowell

Odd indeed.

Does emacs store configuration anywhere other than ~/.emacs.d?

Emacs doesn't really store configuration as such, per default it loads ~/.emacs/~/.emacs.el/~/.emacs.d/init.el and places like /usr/share/emacs/site-lisp, but it tries to keep versions separate.

I'm on Linux, so I don't know much about homebrew, @arnested would know more about that.

xendk avatar Mar 03 '17 07:03 xendk

I'll take a look later. Weird problem.

arnested avatar Mar 03 '17 09:03 arnested