coldnew / linum-relative

display relative line number in the left margin in emacs
169 stars 20 forks source link

linum-relative: Invalid function: with-helm-buffer #21

Closed jgkamat closed 8 years ago

jgkamat commented 9 years ago

I updated linum-relative today, and whenever I open a new helm window, I get this.

linum-relative: Invalid function: with-helm-buffer

I don't want linum-relative in my helm buffers anyway, is there a way to turn this feature off?

I'm prety new to emacs, could someone tell me how to provide more debug info (if you need it) I'm using the latest helm on melpa Helm also updated today (so that might be the issue?)

peterhadlaw commented 9 years ago

+1 - I'd be happy to help in anyway I can although I'm new to Emacs dev.

coldnew commented 9 years ago

@jgkamat Thanks for report this issue, I'll handle it. The helm feature just merge yesterday, I'll add config to enable/disable it .

jgkamat commented 9 years ago

Thanks! :smile:

coldnew commented 9 years ago

Use (setq linum-relative-with-helm t) to enable integrate with helm-mode, this feature is set to nil by default.

jgkamat commented 9 years ago

Thanks for the quick fix! Its looking good from my end now.

tylercecil commented 8 years ago

I'm not yet sure why, but I still am getting byte-code: Invalid function: with-helm-buffer whenever I attempt to open a helm window (such as trying to open file with C-x C-f), even with #27 . This happens regardless of whether or not linum-relative-on has ever been evoked. Helm works just fine without linum-relative. The with-helm-buffer seems to work just fine in other packages. Here is my linum-relative related configuration:

  ;; Relative linum mode
   (use-package linum-relative
   :ensure t
   :init
    (setq linum-relative-current-symbol ""
             linum-relative-format "%3s"
             linum-relative-plusp-offset 1))

Any thoughts? Am I missing something? I'm going to continue looking into it.

peterhadlaw commented 8 years ago

I fixed this issue a while ago and then it resurfaced with recent updates. I.e. I'm confirming I too am having this issue On Nov 28, 2015 22:09, "Izzy Cecil" notifications@github.com wrote:

I'm not yet sure why, but I still am getting byte-code: Invalid function: with-helm-buffer whenever I attempt to open a helm window (such as trying to open file with C-x C-f), even with #27 https://github.com/coldnew/linum-relative/pull/27 . This happens regardless of whether or not linum-relative-on has ever been evoked. Helm works just fine without linum-relative. The with-helm-buffer seems to work just fine in other packages. Here is my linum-relative related configuration:

;; Relative linum mode (use-package linum-relative :ensure t :init (setq linum-relative-current-symbol "" linum-relative-format "%3s" linum-relative-plusp-offset 1))

Any thoughts? Am I missing something? I'm going to continue looking into it.

— Reply to this email directly or view it on GitHub https://github.com/coldnew/linum-relative/issues/21#issuecomment-160369265 .

coldnew commented 8 years ago

I try to use emacs -q to load the linum-relative.el and eval it. There's no such issue. I'll re-test it with a minimal emacs config which has both linum-relative and helm later.

thblt commented 8 years ago

I have the same issue, but triggering it requires that linum-relative has been enabled at least once (not necessarily to be still actually activated anywhere).

Edit: Ignore my comment, I just learned about autoload. Sorry :-)

wujiang commented 8 years ago

@coldnew, any updates? thanks.

coldnew commented 8 years ago

Can anyone give me a public emacs config or test in clean install with this issue ?

I use this as a minimal config to test this issue, there's no Invalid function: with-helm-buffer problem when I use M-x helm-find-files.

I also test on spacemacs with clean install, no this issue yet.

thblt commented 8 years ago

I've been able to trigger the bug with this config:

(require 'package)
(setq package-archives '(("melpa"     . "https://melpa.org/packages/"))) 
(package-initialize)
(package-install 'helm)
(package-install 'linum-relative)

This may not be as minimal/clean/elegant as one could hope, but I'm pretty new to Emacs, as you may already have noticed :-)

Using this config, M-x linum-relative-global-mode M-x helm-M-x splits the window, then prints the message "linum-relative: Invalid function: with-helm-buffer".

coldnew commented 8 years ago

@thblt I can reproduce this issue, let me think how to handle this

coldnew commented 8 years ago

Workaround: remove your linum-relative.elc and restart emacs and the error message is gone.

I think there's some problem when byte-compile the linum-relative.el, if anyone has this issue you can try the workaround first.

I'm still finding the elegant way to solve this issue.

coldnew commented 8 years ago

I think this is fixed in commit 3bed92a . If anyone still has this error, please reopen the issue.

thblt commented 8 years ago

Thanks!

dinojr commented 6 years ago

The problem occurs again. Deleting linume-relative.elc fixes it.