pinard/Pymacs

Error (setting-constant enable-multibyte-characters) when loading pymacs

Closed this issue · 4 comments

Hi,

I just started to configure pymacs, rope, ropemacs and when emacs executes (pymacs-load "ropemacs", "rope-") it stops with an error.
Here is te section that produces the error:

;; pymacs rope ropemacs
(add-to-list 'load-path "~/.emacs.d/vendor/pymacs")
(setenv "PYMACS_PYTHON" "~/.emacs.d/vendor/python/usr/bin/python")

(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-exec "pymacs" nil t)
(autoload 'pymacs-load "pymacs" nil t)

(require 'pymacs)

;; Load ropemacs, which depends on Pymacs (see above).

(pymacs-load "ropemacs" "rope-")
(setq ropemacs-enable-autoimport t)

And here the backtrace:

Debugger entered--Lisp error: (setting-constant enable-multibyte-characters)
  pymacs-set-buffer-multibyte(nil)
  pymacs-start-services()
  pymacs-serve-until-reply("eval" (pymacs-print-for-apply (quote "pymacs_load_helper") (quote ("ropemacs" "rope-"))))
  pymacs-call("pymacs_load_helper" "ropemacs" "rope-")
  pymacs-load("ropemacs" "rope-")
  eval-buffer(#<buffer  *load*<2>> nil "/home/jcn/.emacs.d/oggers/python.el" nil t)  ; Reading at buffer position 1891
  load-with-code-conversion("/home/jcn/.emacs.d/oggers/python.el" "/home/jcn/.emacs.d/oggers/python.el" nil nil)
  load("~/.emacs.d/oggers/python")
  eval-buffer(#<buffer  *load*> nil "/home/jcn/.emacs.d/init.el" nil t)  ; Reading at buffer position 574
  load-with-code-conversion("/home/jcn/.emacs.d/init.el" "/home/jcn/.emacs.d/init.el" t t)
  load("/home/jcn/.emacs.d/init" t t)
  #[0 "�\205\262

I'm using emacs 24.0.90.1.

Thanks.

I can confirm this as well. I'm using GNU Emacs 23.2.1.

Hi, there.

I see bug#5981: 24.0.50; Attempt to set a constant symbol: enable-multibyte-ch http://lists.gnu.org/archive/html/bug-gnu-emacs/2010-04/msg00520.html

So it seems setting this variable is kind of deprecated. However, for those Emacs having the set-buffer-multibyte function, the problem is something else. Pymacs was mistakenly using boundp instead of fboundp to check it. I'm committing this small correction. Hopefully, it will correct your problem. Tell me if it does, and I'll close this issue.

The correction might not be sufficient for some people using Emacs on non-Linux systems, however, according to other notes I have. I'll address this separately.

Work beautifully for me. Thanks for the quick response.

Fine, now it works.
Thank you, for this fast fix.