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

Heads up about class-slot-initarg #815

Closed
girzel opened this issue Jan 11, 2015 · 14 comments
Closed

Heads up about class-slot-initarg #815

girzel opened this issue Jan 11, 2015 · 14 comments
Labels

Comments

@girzel
Copy link

girzel commented Jan 11, 2015

Recent changes in the development version of emacs are going to break Helm at some point: eieieo has undergone some refactoring and simplification, and `class-slot-initarg' no longer exists, which causes the following, in helm-source, to error:

(defun helm--create-source (object class)
"[INTERNAL] Build a helm source from a CLASS OBJECT."
(cl-loop for s in (object-slots object)
for slot = (class-slot-initarg class s)
for slot-val = (slot-value object slot)
when slot-val
collect (cons s (unless (eq t slot-val) slot-val))))

I'm not sure what the proper solution is, but it might float up on this bug report:

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19552

thierryvolpiatto pushed a commit that referenced this issue Jan 11, 2015
* helm-source.el: Add an alias for class-slot-initarg.
@thierryvolpiatto
Copy link
Member

girzel notifications@github.com writes:

Recent changes in the development version of emacs are going to break
Helm at some point:

Should be fixed now, thanks.

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@thierryvolpiatto
Copy link
Member

The fix I made works for emacs-25 from 3/4 days ago or so, now helm is
broken again with the very last changes done in eieio.
I made a new bugreport to emacs...

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19564

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@pashinin
Copy link

@thierryvolpiatto
Same problem now:

Error: Wrong type argument: eieio--class-p, helm-locate-source

@thierryvolpiatto
Copy link
Member

Sergey Pashinin notifications@github.com writes:

Same problem now:

Error: Wrong type argument: eieio--class-p, helm-locate-source

Stefan is actually working on this:

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19564

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@pashinin
Copy link

Any quick dirty fix?

@thierryvolpiatto
Copy link
Member

Sergey Pashinin notifications@github.com writes:

Any quick dirty fix?

Unfortunately no.
Switching to emacs-24 works fine though, so if you have compiled
yourself emacs, just switch to the emacs-24 branch, compile it and
install it, and helm should just work fine.

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@girzel
Copy link
Author

girzel commented Jan 12, 2015

This is working for me at present:

(defun class-slot-initarg (class-name slot)
(eieio--class-slot-initarg (eieio--class-v class-name) slot))

@thierryvolpiatto
Copy link
Member

girzel notifications@github.com writes:

This is working for me at present:

(defun class-slot-initarg (class-name slot)
(eieio--class-slot-initarg (eieio--class-v class-name) slot))

Yes, this have been posted there recently:

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19552

Probably you can report there it is working fine for you.

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@girzel
Copy link
Author

girzel commented Jan 12, 2015

I'm the one who posted it there :) Just waiting to hear what Stefan has to say...

@thierryvolpiatto
Copy link
Member

girzel notifications@github.com writes:

I'm the one who posted it there :) Just waiting to hear what Stefan has to say...

AhAh! ok :-)

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@vspinu
Copy link
Contributor

vspinu commented Jan 13, 2015

(defun class-slot-initarg (class-name slot)
(eieio--class-slot-initarg (eieio--class-v class-name) slot))

With this I am still getting the following:

Debugger entered--Lisp error: (wrong-type-argument eieio--class-p helm-source-multi-occur)
  signal(wrong-type-argument (eieio--class-p helm-source-multi-occur))
  class-slot-initarg(helm-source-multi-occur name)
  helm--create-source([eieio-class-tag--helm-source-multi-occur "Occur" nil (lambda nil (require (quote helm-grep)) (helm-moccur-init)) helm-candidates-in-buffer nil nil nil (keymap (left . helm-moccur-run-default-action) (right . helm-execute-persistent-action) (24 keymap (19 . helm-moccur-run-save-buffer)) (3 keymap (15 . helm-moccur-run-goto-line-of) (111 . helm-moccur-run-goto-line-ow) (63 . helm-moccur-help)) (23 . helm-yank-text-at-point) (M-up . helm-goto-precedent-file) (M-down . helm-goto-next-file) keymap (f13 lambda nil (interactive) (helm-select-nth-action 12)) (f12 lambda nil (interactive) (helm-select-nth-action 11)) (f11 lambda nil (interactive) (helm-select-nth-action 10)) (f10 lambda nil (interactive) (helm-select-nth-action 9)) (f9 lambda nil (interactive) (helm-select-nth-action 8)) (f8 lambda nil (interactive) (helm-select-nth-action 7)) (f7 lambda nil (interactive) (helm-select-nth-action 6)) (f6 lambda nil (interactive) (helm-select-nth-action 5)) (f5 lambda nil (interactive) (helm-select-nth-action 4)) (f4 lambda nil (interactive) (helm-select-nth-action 3)) (f3 lambda nil (interactive) (helm-select-nth-action 2)) (f2 lambda nil (interactive) (helm-select-nth-action 1)) (menu-bar keymap (help-menu keymap (describe keymap (describe-mode . helm-help)))) (help keymap (109 . helm-help)) (f1 lambda nil (interactive) (helm-select-nth-action 0)) (8 keymap (109 . helm-help) (104 . undefined) (8 . undefined) (4 . helm-debug-output)) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (triple-mouse-3 . ignore) (double-mouse-3 . ignore) (mouse-3 . ignore) (drag-mouse-3 . ignore) (down-mouse-3 . ignore) (triple-mouse-2 . ignore) (double-mouse-2 . ignore) (mouse-2 . ignore) (drag-mouse-2 . ignore) (down-mouse-2 . ignore) (triple-mouse-1 . ignore) (double-mouse-1 . ignore) (mouse-1 . ignore) (drag-mouse-1 . ignore) (down-mouse-1 . ignore) (67108897 . helm-toggle-suspend-update) (3 keymap (21 . helm-force-update) (6 . helm-follow-mode) (9 . helm-copy-to-buffer) (11 . helm-kill-selection-and-quit) (25 . helm-yank-selection) (4 . helm-delete-current-selection) (45 . helm-swap-windows)) (67108987 . helm-enlarge-window) (67108989 . helm-narrow-window) (19 . undefined) (18 . undefined) (23 . helm-yank-text-at-point) (24 keymap (2 . helm-resume-list-buffers-after-quit) (98 . helm-resume-previous-session-after-quit) (6 . helm-quit-and-find-file)) ...) (("Go to Line" . helm-moccur-goto-line) ("Goto line other window" . helm-moccur-goto-line-ow) ("Goto line new frame" . helm-moccur-goto-line-of)) helm-moccur-persistent-action "Go to line" nil nil 2 nil nil helm-moccur-filter-one-by-one nil nil nil nil 9999 t (identity) nil nil t nil t helm-grep-history nil helm-moccur-mode-line "C-j: Go to line (keeping session)" helm-moccur-resume-fn nil nil (helm-compile-source--candidates-in-buffer helm-compile-source--match-plugin helm-compile-source--persistent-help) t t nil nil nil nil helm-moccur-get-line (helm-mp-exact-search helm-mp-3-search helm-candidates-in-buffer-search-from-start) nil nil] helm-source-multi-occur)
  helm-make-source("Occur" helm-source-multi-occur)
  helm-occur-init-source()
  helm-occur()
  funcall-interactively(helm-occur)
  call-interactively(helm-occur nil nil)
  command-execute(helm-occur)

@thierryvolpiatto
Copy link
Member

Vitalie Spinu notifications@github.com writes:

(defun class-slot-initarg (class-name slot)
(eieio--class-slot-initarg (eieio--class-v class-name) slot))

With this I am still getting the following:

It is working, but you have to add this code on top of helm-source.el
(after the require's), delete all helm*.elc files,
start ./emacs-helm.sh from the helm directory,
and then recompile helm files and all helm related files.
Ouf.

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

thierryvolpiatto pushed a commit that referenced this issue Jan 13, 2015
* helm-source.el (helm--create-source): Use now only one arg.
(helm-make-source,
helm-make-type): call helm--create-source with one arg.
@thierryvolpiatto
Copy link
Member

Now it is fixed.
You will have to recompile ALL helm files, and this each time you change emacs-version.

@thierryvolpiatto
Copy link
Member

No more true, recompilation is now only needed when switching from emacs-25 to emacs-24, but if helm have been compiled in emacs-24, no recompilation is needed when switching to emacs-25, thanks to Stephan.

Fuco1 pushed a commit to Fuco1/helm that referenced this issue Feb 2, 2019
* helm-source.el (helm--create-source): Use now only one arg.
(helm-make-source,
helm-make-type): call helm--create-source with one arg.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants