Wilfred / ag.el

An Emacs frontend to The Silver Searcher
http://agel.readthedocs.org/en/latest/
525 stars 61 forks source link

Won't byte-compile without evil installed #82

Closed purcell closed 9 years ago

purcell commented 9 years ago

When evil is not installed, then

(eval-after-load 'evil
  `(progn
     (eval-when-compile (require 'evil-core))
     (add-to-list 'evil-motion-state-modes 'ag-mode)
     (evil-add-hjkl-bindings ag-mode-map 'motion)))

leads to

ag.el:592:35:Error: Cannot open load file: no such file or directory, evil-core
Wilfred commented 9 years ago

Argh, sorry about this. I'm not sure what my schedule looks like for the next few days, but it's my top elisp priority to fix. Patches would also be welcome if it's causing a big problem for you.

swsnr commented 9 years ago

@Wilfred I could write a patch, but I' not sure in what directory you'd like to move.

I think that we should remove this code from ag, and open a pull request for evil/evil-integration.el. That's where this code really belongs, imho. It's evil's responsibility to ensure interoperability with 3rd party packages, after all, and there's already similar code for other packages in evil-integration.el.

Besides, since evil-add-hjkl-bindings is a macro for no good reason, it's close to impossible to compile ag.el correctly without evil-core being present, if the code is kept in ag.el.

Wilfred commented 9 years ago

OK, I've opened a merge request on the gitorious site: https://gitorious.org/evil/evil/merge_requests/75 . Evil also seems to be hosted on bitbucket: https://bitbucket.org/lyro/evil/wiki/Home but there are far more merged changes on the gitorious repo.

swsnr commented 9 years ago

@Wilfred Funny. I thought Gitorious was long dead…