0

I have this error when loading emacs ( in terminal ) using mac. It seems to be some errors with the byte code when compiling:

Debugger entered--Lisp error: (void-variable mouse-wheel-mode)    
byte-code("\304 ^X\305^H\306\307#\210\305^H\310\311#\210\305^H\312\311#\210\305^H\313\314#\210  \203?^@\315\316\317\n!\317^K!\317\320\nD!\317\320^KD!\317\321\nD!\317\321^KD!\257^F\"\210\305^H\322\323#\210\305^H\324\325#\210\305^H\326\323#\210\305^H\327\325#\210^H)\207"$
      (defvar ccm-map (byte-code "\304 ^X\305^H\306\307#\210\305^H\310\311#\210\305^H\312\311#\210\305^H\313\314#\210 \203?^@\315\316\317\n!\317^K!\317\320\nD!\317\320^KD!\317\321\nD!\317\321^KD!\257^F\"\210\305^H\322\323#\210\305^H\324\325#\210\305^H\326\323#\210\305^H\327\$
      require(centered-cursor-mode)                                                                                                                                                                                                                                                 
      eval-buffer(#<buffer  *load*> nil "/Users/nXqd/.emacs.d/init.el" nil t)  ; Reading at buffer position 1732                                                                                                                                                                    
      load-with-code-conversion("/Users/nXqd/.emacs.d/init.el" "/Users/nXqd/.emacs.d/init.el" t t)                                                                                                                                                                                  
      load("/Users/nXqd/.emacs.d/init" t t)                                                                                                                                                                                                                                         
      #[0 "^H\205\262^@ \306=\203^Q^@\307^H\310Q\202;^@ \311=\204^^^@\307^H\312Q\202;^@\313\307\314\315#\203*^@\316\202;^@\313\307\314\317#\203:^@\320\nB^R\321\202;^@\316\322^S\323^A\322\211#\210^K\322=\203a^@\324\325\326\307^H\327Q!\"\323^A\322\211#\210^K\322=\203`^@^A^S\21$
      command-line()                                                                                                                                                                                                                                                                
      normal-top-level() 

how to fix this kind of problem ?

Dzung Nguyen
  • 9,152
  • 14
  • 65
  • 104
  • 1
    It looks like the top lines of the error message are missing. – legoscia Nov 05 '14 at 10:51
  • @legoscia thanks ! I've fixed my post with the line. I'm stupid enough to no search for that keyword. I have found my answer. Thanks – Dzung Nguyen Nov 05 '14 at 12:29
  • 1
    possible duplicate of [How can I get mouse selection to work in emacs and iTerm2 on Mac?](http://stackoverflow.com/questions/5710334/how-can-i-get-mouse-selection-to-work-in-emacs-and-iterm2-on-mac) – Dzung Nguyen Nov 05 '14 at 12:32

1 Answers1

1

It looks like centered-cursor-mode inspects the variable mouse-wheel-mode without first requiring mwheel. If you're running in graphical mode, this mode will be turned on automatically during startup and thus the variable is loaded, but apparently the mwheel library isn't loaded at all in terminal mode.

Try adding this to your .emacs.d/init.el, before loading centered-cursor-mode:

(require 'mwheel)
legoscia
  • 39,593
  • 22
  • 116
  • 167