[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19645: 25.0.50; Recent EIEIO changes broke helm: Lisp error: (cl-no-

From: Thierry Volpiatto
Subject: bug#19645: 25.0.50; Recent EIEIO changes broke helm: Lisp error: (cl-no-next-method helm--setup-source...
Date: Fri, 23 Jan 2015 08:08:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> I'm still wondering why you'd use a :before method when there's no
> primary method.

To ensure this method run BEFORE the other same methods that run for
other classes:

--8<---------------cut here---------------start------------->8---
(defclass helm-test-class (helm-source-sync helm-type-file)
  ((candidates :initform (lambda () ("foo" "bar" "baz")))))

(helm-make-source "test" 'helm-test-class)

1) With helm-type-file `helm--setup-source' method is :before
((name . "test")
 (candidates lambda nil ("foo" "bar" "baz"))
 (action ("Find file" . helm-find-many-files)
         ("Find file as root" . helm-find-file-as-root)
         ("Find file other window" . find-file-other-window)
         ("Find file other frame" . find-file-other-frame)
 (persistent-help . "Show this file")
 (match helm-mp-exact-match helm-mp-3-match)
 (header-line . "C-j: Show this file (keeping session)")
 (dont-plug helm-compile-source--match-plugin 

2) With helm-type-file `helm--setup-source' method is only :primary
((name . "test")
 (candidates lambda nil ("foo" "bar" "baz"))
 (action . identity)
 (match helm-mp-exact-match helm-mp-3-match)
 (dont-plug helm-compile-source--match-plugin 
--8<---------------cut here---------------end--------------->8---

As you can see when the helm--setup-source method of helm-type-file is
not :before, the default slots (common to both class) of helm-source-sync
take precedence. 
The helm-test-class have to inherit from two classes, and
the helm-type-file class should overhide the default slot of the
helm-source-sync class.

Maybe there is another way to achieve this ?

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]