Package: pymacs Version: 0.22-3 Severity: normal Tags: patch Hello,
first of all a greet package :-) If a give a python function as argument to an emacs function the calling does not work. I build test_pymacs.py to test: Use (pymacs-load "test_pymacs") and then (test_pymacs-pymacs-test). I get: Debugger entered--Lisp error: (error "Python: Traceback (most recent call last): File \"/usr/lib/python2.3/site-packages/Pymacs/pymacs.py\", line 95, in loop argument = eval(text) TypeError: expected string without null bytes ") signal(error ("Python: Traceback (most recent call last):\n File \"/usr/lib/python2.3/site-packages/Pymacs/pymacs.py\", line 95, in loop\n argument = eval(text)\nTypeError: expected string without null bytes\n")) error("Python: %s" "Traceback (most recent call last):\n File \"/usr/lib/python2.3/site-packages/Pymacs/pymacs.py\", line 95, in loop\n argument = eval(text)\nTypeError: expected string without null bytes\n") pymacs-serve-until-reply((pymacs-print-for-apply (quote (pymacs-python . 1)) (quote nil))) pymacs-apply((pymacs-python . 1) nil) test_pymacs-pymacs-test() eval((test_pymacs-pymacs-test)) eval-last-sexp-1(nil) eval-last-sexp(nil) call-interactively(eval-last-sexp) I think the problem is pymacs-defun require two parameter, but the python site call it only with one argument. At this site the attached patch does work. It might be also possible to declare the second argument optional in the pymacs-elisp package. Greetings Sebastian Waschik -- System Information: Debian Release: 3.1 Architecture: i386 (i686) Kernel: Linux 2.6.8-3-686 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages pymacs depends on: ii python 2.3.5-2 An interactive high-level object-o ii python2.3-pymacs 0.22-3 interface between Emacs Lisp and P -- no debconf information ===File ~/pymacs.patch====================================== diff -Nru Pymacs.old/pymacs.py Pymacs/pymacs.py --- Pymacs.old/pymacs.py 2003-05-16 20:03:07.000000000 +0200 +++ Pymacs/pymacs.py 2006-06-19 21:27:36.000000000 +0200 @@ -589,7 +589,7 @@ write("'") write(value.text) elif callable(value): - write('(pymacs-defun %d)' % allocate_python(value)) + write('(pymacs-defun %d nil)' % allocate_python(value)) else: write('(pymacs-python %d)' % allocate_python(value)) Binärdateien Pymacs.old/pymacs.pyc and Pymacs/pymacs.pyc sind verschieden. Binärdateien Pymacs.old/pymacs.pyo and Pymacs/pymacs.pyo sind verschieden. ============================================================ ===File ~/.emacs.d/pymacs/test_pymacs.py==================== import Pymacs def f(): Pymacs.lisp.insert("Test") def pymacs_test(): Pymacs.lisp.apply(f, None) pymacs_test.interaction = '' ============================================================