Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoload of inf-ruby minor mode fails #1622

Closed
lxsameer opened this issue Mar 12, 2014 · 15 comments
Closed

autoload of inf-ruby minor mode fails #1622

lxsameer opened this issue Mar 12, 2014 · 15 comments

Comments

@lxsameer
Copy link

Hi, here is my inf-ruby configuration:

(autoload 'inf-ruby "inf-ruby" "Run an inferior Ruby process" t)
(add-hook 'ruby-mode-hook 'inf-ruby-minor-mode)
(add-hook 'after-init-hook 'inf-ruby-switch-setup)

but I get this error:

Debugger entered--Lisp error: (error "Autoloading failed to define function inf-ruby-minor-mode")
  inf-ruby-minor-mode()
  run-hooks(change-major-mode-after-body-hook prog-mode-hook ruby-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook ruby-mode-hook))
  run-mode-hooks(ruby-mode-hook)
  ruby-mode()
  set-auto-mode-0(ruby-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer air_travel.rb> "~/src/Yellowen/iran_mosafer/app/models/permissions/air_travel.rb" nil nil "~/src/Yellowen/iran_mosafer/app/models/permissions/air_travel.rb" (11544041 2051))
  find-file-noselect("/home/lxsameer/src/Yellowen/iran_mosafer/app/models/permissions/air_travel.rb" nil nil)
  ido-file-internal(raise-frame)
  ido-find-file()
  call-interactively(ido-find-file nil nil)

I report a bug on inf-ruby too but it seems that it's an issue with el-get

@npostavs
Copy link
Collaborator

Try removing the (autoload ...) from your configuration. inf-ruby has an ;;;###autoload cookie on that function, so it should already have the correct autoload in ~/.emac.d/el-get/.loaddefs.el. I think your config is overriding that using the wrong path.

I report a bug on inf-ruby too

nonsequitur/inf-ruby#46

@lxsameer
Copy link
Author

I find the issue and it was rinari. It contain a very old version of inf-ruby which el-get loads before the actual inf-ruby.

thanks and sorry for trouble

@dgutov
Copy link

dgutov commented Mar 12, 2014

In that case, you probably should either file an issue at rinari, or ask to change the el-get recipe not to check out all rinari submodules.

@lxsameer
Copy link
Author

I'll check the rinari recipe and fix it if possible.

@vnavkal
Copy link

vnavkal commented Mar 24, 2014

@lxsameer did you find a fix for this? I believe I'm experiencing the same issue.

@lxsameer
Copy link
Author

@vnavkal do you use rinari ?
Try opening inf-ruby by M-x find-library RET inf-ruby and check the path for the library. make sure that, that is the library you want to load. because some packages like rinari provides a copy of inf-ruby which is old and cause this bug

@vnavkal
Copy link

vnavkal commented Mar 25, 2014

Yep, thanks -- this was exactly the problem. rinari was adding the location of its inf-ruby version to my load-path.

@lxsameer
Copy link
Author

No problem buddy

@dgutov
Copy link

dgutov commented Apr 1, 2014

FFS, can anyone fix the recipe already? Just make it not check out any submodules.

@dimitri
Copy link
Owner

dimitri commented Apr 1, 2014

@dgutov I must be blind here but I fail to see your Pull Request with the fixed recipe?

@dgutov
Copy link

dgutov commented Apr 1, 2014

@dimitri I've never used el-get, and the last time I did anything useful with rinari was over a year ago.

I shouldn't have to work on this just because it looks to users like the problem is on inf-ruby's side.

@dimitri
Copy link
Owner

dimitri commented Apr 1, 2014

Ok so I just don't understand what your position here is. FYI, I don't use ruby at all so I'm not going to be helping a bit on this one, sorry about that.

@dgutov
Copy link

dgutov commented Apr 1, 2014

I'm the annoyed maintainer of the said inf-ruby. You can look at the linked issues, if you like.

@dimitri
Copy link
Owner

dimitri commented Apr 1, 2014

ok, now I understand where you're coming from. I think some recent changes did make the rinari situation better, I don't know about inf-ruby tho. Someone here knows about all that, please?

@dgutov
Copy link

dgutov commented Apr 1, 2014

I think some recent changes did make the rinari situation better

Which changes do you mean? rinari recipe is 8 months old.

I think the only thing required is to add :submodule nil to the rinari recipe, but someone else would have to test this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants