troyp / evil-visual-replace

Search and replace within Emacs evil-mode's visual blocks (rectangle selections)
GNU General Public License v2.0
8 stars 3 forks source link

Autoloading issue #2

Open dcostaras opened 8 years ago

dcostaras commented 8 years ago

Hi,

I'm getting an error during package initialization...

Debugger entered--Lisp error: (void-function evil-define-operator)

load-with-code-conversion("/Users/donavan/.emacs.d/elpa/evil-visual-replace-20160731.508/evil-visual-replace-autoloads.el" "/Users/donavan/.emacs.d/elpa/evil-visual-replace-20160731.508/evil-visual-replace-autoloads.el" nil t)

package-activate(evil-visual-replace)

package-initialize()

I've edited the error message, let me know if you want the full output.

I really don't know much about packages but I think evil functions can't be called in the generated autoloads file and so the autoload directives should be removed from evil-define-operator

troyp commented 8 years ago

Sorry I haven't responded to this, I haven't been well lately so I haven't been paying attention.

I can't reproduce this in Emacs 24.x. I've tried on Linux and Windows, both with Spacemacs and a minimal Emacs/Evil install (just evil and evil-visual-replace installed). Are you using an old Emacs? Or Emacs 25 (I haven't tested that yet)?

evil-visual-replace requires evil, which requires evil-macros which contains evil-define-operator, so it's odd that you're getting this error. I tried executing the load-with-code-conversion call that gave you an error (on a minimal evil system) and it worked fine.

I have noticed that the autoload comments aren't working properly for the functions defined with evil-define-operator though. They're not giving errors, but they're not properly autoloaded either. So I'll remove them. Hopefully that'll fix the error on your system. (I could probably replace them with explicit autoload calls, but I won't bother for now.)