ergoemacs / ergoemacs-mode

ergoemacs-mode
ergoemacs.github.io/
GNU General Public License v3.0
293 stars 35 forks source link

(void-variable form) #287

Closed brabalan closed 10 years ago

brabalan commented 10 years ago

After updating ergoemacs I no longer can start it. I get the following backtrace (the top of it):

Debugger entered--Lisp error: (void-variable form)
  (list (quote let) (quote ((ergoemacs-run-mode-hooks t) (ergoemacs-is-user-defined-map-change-p t))) form)
  (\` (let ((ergoemacs-run-mode-hooks t) (ergoemacs-is-user-defined-map-change-p t)) (\, form)))
  (lambda nil (\` (let ((ergoemacs-run-mode-hooks t) (ergoemacs-is-user-defined-map-change-p t)) (\, form))))()
  funcall((lambda nil (\` (let ((ergoemacs-run-mode-hooks t) (ergoemacs-is-user-defined-map-change-p t)) (\, form)))))
  eval((funcall (quote (lambda nil (\` (let ((ergoemacs-run-mode-hooks t) (ergoemacs-is-user-defined-map-change-p t)) (\, form)))))))
  mapc(eval ((funcall (quote (lambda nil (\` (let ((ergoemacs-run-mode-hooks t) (ergoemacs-is-user-defined-map-change-p t)) (\, form))))))))

I tried deleting the .elc files but it does not change anything.

brabalan commented 10 years ago

To start emacs with no error, I had to remove ergoemacs. It seems the error happens in the package loading phase, even before ergoemacs-mode is started.

mattfidler commented 10 years ago

Thanks. . That back-trace is useful. I think it is the same as #286. I will fix it tomorrow when I get a hold of a computer On Aug 17, 2014 10:08 AM, "Alan Schmitt" notifications@github.com wrote:

After updating ergoemacs I no longer can start it. I get the following backtrace (the top of it):

Debugger entered--Lisp error: (void-variable form) (list (quote let) (quote ((ergoemacs-run-mode-hooks t) (ergoemacs-is-user-defined-map-change-p t))) form) ((let ((ergoemacs-run-mode-hooks t) (ergoemacs-is-user-defined-map-change-p t)) (\, form))) (lambda nil ( (let ((ergoemacs-run-mode-hooks t) (ergoemacs-is-user-defined-map-change-p t)) (\, form))))() funcall((lambda nil ((let ((ergoemacs-run-mode-hooks t) (ergoemacs-is-user-defined-map-change-p t)) (\, form))))) eval((funcall (quote (lambda nil ( (let ((ergoemacs-run-mode-hooks t) (ergoemacs-is-user-defined-map-change-p t)) (\, form))))))) mapc(eval ((funcall (quote (lambda nil (` (let ((ergoemacs-run-mode-hooks t) (ergoemacs-is-user-defined-map-change-p t)) (\, form))))))))

I tried deleting the .elc files but it does not change anything.

— Reply to this email directly or view it on GitHub https://github.com/ergoemacs/ergoemacs-mode/issues/287.

mattfidler commented 10 years ago

I'm not sure exactly how to reproduce your issue. However, the back trace led me to the function that had an extra backquote. This could fix it. Hovewer, I could not reproduce the issue even with the typo.

Let me know. Also please include an eval-after-load to allow me to test.

brabalan commented 10 years ago

Things are better, I can now start ergoemacs-mode. However, I cannot load theme components (see below).

Also please include an eval-after-load to allow me to test.

I'm sorry, but I don't understand what you mean by this.

When I try to load the following theme component

  (ergoemacs-theme-component as/switch-map ()
    "Alan's switch-map component"
    :layout "dv" ; Since <menu> keys change based on layout, allow
                 ; others to use the same layout.
    (global-set-key (kbd "<menu> f") 'as/switch-map))

I get this backtrace

Debugger entered--Lisp error: (invalid-slot-type ergoemacs-variable-map translation-regexp string nil)
  signal(invalid-slot-type (ergoemacs-variable-map translation-regexp string nil))
  eieio-validate-slot-value(ergoemacs-variable-map 5 nil translation-regexp)
  eieio-oset([object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil] translation-regexp nil)
  ergoemacs-variable-map([object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil] "<menu> f" as/switch-map nil)
  apply(ergoemacs-variable-map ([object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil] "<menu> f" as/switch-map nil))
  eieio-generic-call-primary-only(ergoemacs-define-map--cmd-list ([object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil] "<menu> f" as/switch-map nil))
  ergoemacs-define-map--cmd-list([object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil] "<menu> f" as/switch-map nil)
  ergoemacs-variable-map([object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil] [menu 102] as/switch-map nil)
  apply(ergoemacs-variable-map ([object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil] [menu 102] as/switch-map nil))
  eieio-generic-call-primary-only(ergoemacs-define-map ([object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil] [menu 102] as/switch-map nil))
  ergoemacs-define-map([object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil] [menu 102] as/switch-map nil)
  ergoemacs-composite-map([object ergoemacs-composite-map "as/switch-map" t "\\(?:^\\|<\\)\\(?:<\\(?:\\(?:apps\\|menu\\)>\\)\\|M-\\)" "" "dv" nil unbound nil nil nil unbound unbound [object ergoemacs-fixed-map "as/switch-map" unbound t (keymap) nil (keymap) (keymap) (keymap) (keymap) nil nil nil nil nil nil unbound nil nil nil unbound unbound nil] #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) [object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil]] [menu 102] as/switch-map)
  apply(ergoemacs-composite-map ([object ergoemacs-composite-map "as/switch-map" t "\\(?:^\\|<\\)\\(?:<\\(?:\\(?:apps\\|menu\\)>\\)\\|M-\\)" "" "dv" nil unbound nil nil nil unbound unbound [object ergoemacs-fixed-map "as/switch-map" unbound t (keymap) nil (keymap) (keymap) (keymap) (keymap) nil nil nil nil nil nil unbound nil nil nil unbound unbound nil] #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) [object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil]] [menu 102] as/switch-map))
  eieio-generic-call-primary-only(ergoemacs-define-map ([object ergoemacs-composite-map "as/switch-map" t "\\(?:^\\|<\\)\\(?:<\\(?:\\(?:apps\\|menu\\)>\\)\\|M-\\)" "" "dv" nil unbound nil nil nil unbound unbound [object ergoemacs-fixed-map "as/switch-map" unbound t (keymap) nil (keymap) (keymap) (keymap) (keymap) nil nil nil nil nil nil unbound nil nil nil unbound unbound nil] #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) [object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil]] [menu 102] as/switch-map))
  ergoemacs-define-map([object ergoemacs-composite-map "as/switch-map" t "\\(?:^\\|<\\)\\(?:<\\(?:\\(?:apps\\|menu\\)>\\)\\|M-\\)" "" "dv" nil unbound nil nil nil unbound unbound [object ergoemacs-fixed-map "as/switch-map" unbound t (keymap) nil (keymap) (keymap) (keymap) (keymap) nil nil nil nil nil nil unbound nil nil nil unbound unbound nil] #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) [object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil]] [menu 102] as/switch-map)
  ergoemacs-theme-component-maps([object ergoemacs-theme-component-maps "as/switch-map" "\\(?:^\\|<\\)\\(?:<\\(?:\\(?:apps\\|menu\\)>\\)\\|M-\\)" "Alan's switch-map component" "" "dv" [object ergoemacs-composite-map "as/switch-map" t "\\(?:^\\|<\\)\\(?:<\\(?:\\(?:apps\\|menu\\)>\\)\\|M-\\)" "" "dv" nil unbound nil nil nil unbound unbound [object ergoemacs-fixed-map "as/switch-map" unbound t (keymap) nil (keymap) (keymap) (keymap) (keymap) nil nil nil nil nil nil unbound nil nil nil unbound unbound nil] #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) [object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil]] #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil "" nil] global-map [menu 102] as/switch-map)
  apply(ergoemacs-theme-component-maps ([object ergoemacs-theme-component-maps "as/switch-map" "\\(?:^\\|<\\)\\(?:<\\(?:\\(?:apps\\|menu\\)>\\)\\|M-\\)" "Alan's switch-map component" "" "dv" [object ergoemacs-composite-map "as/switch-map" t "\\(?:^\\|<\\)\\(?:<\\(?:\\(?:apps\\|menu\\)>\\)\\|M-\\)" "" "dv" nil unbound nil nil nil unbound unbound [object ergoemacs-fixed-map "as/switch-map" unbound t (keymap) nil (keymap) (keymap) (keymap) (keymap) nil nil nil nil nil nil unbound nil nil nil unbound unbound nil] #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) [object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil]] #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil "" nil] global-map [menu 102] as/switch-map))
  eieio-generic-call-primary-only(ergoemacs-define-map ([object ergoemacs-theme-component-maps "as/switch-map" "\\(?:^\\|<\\)\\(?:<\\(?:\\(?:apps\\|menu\\)>\\)\\|M-\\)" "Alan's switch-map component" "" "dv" [object ergoemacs-composite-map "as/switch-map" t "\\(?:^\\|<\\)\\(?:<\\(?:\\(?:apps\\|menu\\)>\\)\\|M-\\)" "" "dv" nil unbound nil nil nil unbound unbound [object ergoemacs-fixed-map "as/switch-map" unbound t (keymap) nil (keymap) (keymap) (keymap) (keymap) nil nil nil nil nil nil unbound nil nil nil unbound unbound nil] #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) [object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil]] #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil "" nil] global-map [menu 102] as/switch-map))
  ergoemacs-define-map([object ergoemacs-theme-component-maps "as/switch-map" "\\(?:^\\|<\\)\\(?:<\\(?:\\(?:apps\\|menu\\)>\\)\\|M-\\)" "Alan's switch-map component" "" "dv" [object ergoemacs-composite-map "as/switch-map" t "\\(?:^\\|<\\)\\(?:<\\(?:\\(?:apps\\|menu\\)>\\)\\|M-\\)" "" "dv" nil unbound nil nil nil unbound unbound [object ergoemacs-fixed-map "as/switch-map" unbound t (keymap) nil (keymap) (keymap) (keymap) (keymap) nil nil nil nil nil nil unbound nil nil nil unbound unbound nil] #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) [object ergoemacs-variable-map "as/switch-map" t "dv" "" nil "" nil #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil unbound nil nil unbound unbound nil]] #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ( ...)) #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) nil "" nil] global-map [menu 102] as/switch-map)
  ergoemacs-define-key(global-map [menu 102] as/switch-map)
  (lambda nil (ergoemacs-define-key (quote global-map) (kbd "<menu> f") (quote as/switch-map)))()
  ergoemacs-theme-component--create-component((:name "as/switch-map" :description "Alan's switch-map component" :layout "dv") (lambda nil (ergoemacs-define-key (quote global-map) (kbd "<menu> f") (quote as/switch-map))))
  (lambda nil "Alan's switch-map component" (ergoemacs-theme-component--create-component (quote (:name "as/switch-map" :description "Alan's switch-map component" :layout "dv")) (quote (lambda nil (ergoemacs-define-key (quote global-map) (kbd "<menu> f") (quote as/switch-map))))))()
  ergoemacs-theme-get-component(as/switch-map nil)
mattfidler commented 10 years ago

Do you have your configuration posted somewhere?

mattfidler commented 10 years ago

(I couldn't reproduce the error)

brabalan commented 10 years ago

I've been able to reproduce the error with the following minimal config

(add-to-list 'load-path "~/src/ergoemacs-mode")
(require 'ergoemacs-mode)
(setq ergoemacs-theme nil)
(setq ergoemacs-keyboard-layout "bepo")
(setq ergoemacs-mode-line 'no-layout)
(ergoemacs-mode 1)
(setq ergoemacs-smart-paste t)
(setq ergoemacs-handle-ctl-c-or-ctl-x 'only-C-c-and-C-x)

  (ergoemacs-theme-component as/switch-map ()
    "Alan's switch-map component"
    :layout "bepo" ; Since <menu> keys change based on layout, allow
                   ; others to use the same layout.
    (global-set-key (kbd "<menu> j") 'as/switch-map))

 (ergoemacs-require 'as/switch-map)
mattfidler commented 10 years ago

This should be fixed.

Check to make sure that menu j works on bepo

brabalan commented 10 years ago

I'm seeing the same backtrace as I try to activate the theme component (with just the config file as above).

In addition, it seems that cmd-c (in bépo, it's cmd-h in qwerty) goes one character left instead of going to the beginning of line.

mattfidler commented 10 years ago

This appears to be a lexical scoping issue. I think I have fixed it, though.

brabalan commented 10 years ago

Thanks, I confirm this is working.