Helm: When running helm-mini: Invalid function: "B"

Created on 6 Nov 2018  路  10Comments  路  Source: emacs-helm/helm

Expected behavior

Start Helm minibuffer with open buffers and recent files

Actual behavior (from emacs-helm.sh if possible, see note at the bottom)

Message: Invalud function: "B" and no minibuffer

Steps to reproduce (recipe)

M-x helm-mini

Backtraces if any (M-x toggle-debug-on-error)

The backtrace behaves weirdly, so I can't copy-paste, but the last three functions are:

helm-file-human-size(1290)
helm-buffer-size(#<buffer *scratch*>)
helm-buffer--details("*scratch*" details)

Describe versions of Helm, Emacs, operating system, etc.

helm-20181029.623
emacs 26.1
fedora 28

Are you using emacs-helm.sh to reproduce this bug (yes/no):

Yes

All 10 comments

Peter Hill notifications@github.com writes:

Expected behavior

Start Helm minibuffer with open buffers and recent files

Actual behavior (from emacs-helm.sh if possible, see note at the bottom)

Message: Invalud function: "B" and no minibuffer

See #2110 it is the same problem, it should go away after recompilation.

Thanks.

--
Thierry

Reverse the change on this line and then recompile helm.

Dar Montou notifications@github.com writes:

Reverse the change on this line and then recompile helm.

NO! You don't need to reverse the change on this line!!! You only have
to recompile Helm properly. The point is that when people update package
from Melpa the package are badly recompiled for some reason and/or they
don't restart emacs after that, you always need to restart Emacs after a
package update even if the Emacs manual claims it is not necessary.
Please don't make changes you don't understand, or at least don't
propose them as a solution publicly.

--
Thierry

Here some tests:

(helm-file-human-size 4)
;;"4"
(helm-file-human-size 40)
;;"40"
(helm-file-human-size 400)
;;"400"
(helm-file-human-size 4000)
;;"3.9k"
(helm-file-human-size 40000)
;;"39.1k"
(helm-file-human-size 400000)
;;"390.6k"
(helm-file-human-size 4000000)
;;"3.8M"
(helm-file-human-size 40000000)
;;"38.1M"
(helm-file-human-size 400000000)
;;"381.5M"
(helm-file-human-size 4000000000)
;;"3.7G"

If you have an error in those tests, it is your helm is badly recompiled.

To recompile Helm (or whatever packages), always recompile from a clean environment, that is from outside you current Emacs, for this use helm-list-elisp-packages-no-fetch, go to installed packages with M-I and use the recompile package action, from Lisp you can use directly async-byte-recompile-directory, if you installed from source use make. And then RESTART Emacs.
See https://github.com/emacs-helm/helm/wiki#from-melpa.

Thanks @thierryvolpiatto, recompiling did the trick! I had restarted Emacs after updating my packages, but I guess that wasn't enough.

Great, closing now.

I wonder why sometimes a manual recompilation is needed. IIUC the package manager takes care of that for you. But I just ran into this issue and needed to recompile despite the .elc files being newer than the .el files (which means the latest files have already been compiled).

Tianxiang Xiong notifications@github.com writes:

I wonder why sometimes a manual recompilation is needed. IIUC the
package manager takes care of that for you. But I just ran into this
issue and needed to recompile despite the .elc files being newer than
the .el files (which means the latest files have already been
compiled).

The *.elc files beeing newer than the *.el files doesn't mean forcibly
the compilation went well, it depend in the order the compilation went.
If the helm-core package have a new macro which is used somewhere in the
helm package, the helm-core package have to be recompiled before the
helm package.

--
Thierry

Was this page helpful?
0 / 5 - 0 ratings