Hi, Andreas.
Opening ~/entretien/pymacs/Pymacs.py fails with this traceback (I merely
M-C-x'ed a few functions from source so the traceback becomes useful).
Comments follow.
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("/home/pinard/bureautique/emacs/_/python-mode/Pymacs" nil)
(let* ((pyshell ...) (path ...) (pymacs-installed-p ...)) (unless pymacs-installed-p (setenv "PYTHONPATH" ...)) (if (or ... ...) (error "`py-install-directory' not set, see INSTALL") (load ... nil t) (setenv "PYMACS_PYTHON" ...) (autoload ... "pymacs") (autoload ... "pymacs") (autoload ... "pymacs") (autoload ... "pymacs") (autoload ... "pymacs") (require ...)) (unwind-protect (progn ... ...)) (kill-buffer "pycomplete.el"))
py-load-pymacs()
(progn (py-load-pymacs) (unwind-protect (progn ... ...)) (kill-buffer "pycomplete.el"))
(if py-load-pymacs-p (progn (py-load-pymacs) (unwind-protect ...) (kill-buffer "pycomplete.el")))
(when py-load-pymacs-p (py-load-pymacs) (unwind-protect (progn ... ...)) (kill-buffer "pycomplete.el"))
(let ((delay-mode-hooks t)) (kill-all-local-variables) (setq major-mode (quote python-mode)) (setq mode-name "Python") nil (use-local-map python-mode-map) (set-syntax-table python-mode-syntax-table) (setq local-abbrev-table python-mode-abbrev-table) (set (make-local-variable ...) (quote ...)) (set (make-local-variable ...) t) (set (make-local-variable ...) t) (set (make-local-variable ...) "# ") (set (make-local-variable ...) "^[ ]*#+ *") (set (make-local-variable ...) 40) (set (make-local-variable ...) (function py-comment-indent-function)) (set (make-local-variable ...) (quote py-indent-region)) (set (make-local-variable ...) (quote py-indent-line)) (add-to-list (quote hs-special-modes-alist) (list ... ... nil "#" ... nil)) (set (make-local-variable ...) ":\\s-*\n") (set (make-local-variable ...) (function python-outline-level)) (set (make-local-variable ...) nil) (set (make-local-variable ...) (concat ... ...)) (set (make-local-variable ...) (quote py-current-defun)) (set (make-local-variable ...) "\\s-*$") (set (make-local-variable ...) (quote py-fill-paragraph)) (set (make-local-variable ...) mode-require-final-newline) (make-local-variable (quote python-saved-check-command)) (set (make-local-variable ...) (quote py-beginning-of-def-or-class)) (set (make-local-variable ...) (quote py-end-of-def-or-class)) (add-hook (quote which-func-functions) (quote python-which-func) nil t) (when (and imenu-create-index-p ...) (setq imenu-create-index-function ...) (setq imenu-generic-expression py-imenu-generic-expression) (when ... ... ...)) (set (make-local-variable ...) (function python-eldoc-function)) (add-hook (quote eldoc-mode-hook) (lambda nil ...) nil t) (add-hook (quote completion-at-point-functions) py-complete-function nil (quote local)) (set (make-local-variable ...) (quote ...)) (set (make-local-variable ...) py-indent-offset) (when py-smart-indentation (if ... ... ...)) (when (null py-shell-name) (py-toggle-shells ...)) (when py-load-pymacs-p (py-load-pymacs) (unwind-protect ...) (kill-buffer "pycomplete.el")) (define-key inferior-python-mode-map (kbd "<tab>") (quote python-shell-completion-complete-or-indent)) (if py-menu (easy-menu-add py-menu)) (when py-hide-show-minor-mode-p (hs-minor-mode 1)) (run-mode-hooks (if python-mode-hook ... ...)) (when py-start-run-py-shell (window-configuration-to-register 213465879) (unless ... ...) (jump-to-register 213465879)) (when py-outline-minor-mode-p (outline-minor-mode 1)) (when (interactive-p) (message "python-mode loaded from: %s" "python-mode.el")))
(progn (make-local-variable (quote delay-mode-hooks)) (let (...) (kill-all-local-variables) (setq major-mode ...) (setq mode-name "Python") nil (use-local-map python-mode-map) (set-syntax-table python-mode-syntax-table) (setq local-abbrev-table python-mode-abbrev-table) (set ... ...) (set ... t) (set ... t) (set ... "# ") (set ... "^[ ]*#+ *") (set ... 40) (set ... ...) (set ... ...) (set ... ...) (add-to-list ... ...) (set ... ":\\s-*\n") (set ... ...) (set ... nil) (set ... ...) (set ... ...) (set ... "\\s-*$") (set ... ...) (set ... mode-require-final-newline) (make-local-variable ...) (set ... ...) (set ... ...) (add-hook ... ... nil t) (when ... ... ... ...) (set ... ...) (add-hook ... ... nil t) (add-hook ... py-complete-function nil ...) (set ... ...) (set ... py-indent-offset) (when py-smart-indentation ...) (when ... ...) (when py-load-pymacs-p ... ... ...) (define-key inferior-python-mode-map ... ...) (if py-menu ...) (when py-hide-show-minor-mode-p ...) (run-mode-hooks ...) (when py-start-run-py-shell ... ... ...) (when py-outline-minor-mode-p ...) (when ... ...)))
(delay-mode-hooks (kill-all-local-variables) (setq major-mode (quote python-mode)) (setq mode-name "Python") nil (use-local-map python-mode-map) (set-syntax-table python-mode-syntax-table) (setq local-abbrev-table python-mode-abbrev-table) (set (make-local-variable ...) (quote ...)) (set (make-local-variable ...) t) (set (make-local-variable ...) t) (set (make-local-variable ...) "# ") (set (make-local-variable ...) "^[ ]*#+ *") (set (make-local-variable ...) 40) (set (make-local-variable ...) (function py-comment-indent-function)) (set (make-local-variable ...) (quote py-indent-region)) (set (make-local-variable ...) (quote py-indent-line)) (add-to-list (quote hs-special-modes-alist) (list ... ... nil "#" ... nil)) (set (make-local-variable ...) ":\\s-*\n") (set (make-local-variable ...) (function python-outline-level)) (set (make-local-variable ...) nil) (set (make-local-variable ...) (concat ... ...)) (set (make-local-variable ...) (quote py-current-defun)) (set (make-local-variable ...) "\\s-*$") (set (make-local-variable ...) (quote py-fill-paragraph)) (set (make-local-variable ...) mode-require-final-newline) (make-local-variable (quote python-saved-check-command)) (set (make-local-variable ...) (quote py-beginning-of-def-or-class)) (set (make-local-variable ...) (quote py-end-of-def-or-class)) (add-hook (quote which-func-functions) (quote python-which-func) nil t) (when (and imenu-create-index-p ...) (setq imenu-create-index-function ...) (setq imenu-generic-expression py-imenu-generic-expression) (when ... ... ...)) (set (make-local-variable ...) (function python-eldoc-function)) (add-hook (quote eldoc-mode-hook) (lambda nil ...) nil t) (add-hook (quote completion-at-point-functions) py-complete-function nil (quote local)) (set (make-local-variable ...) (quote ...)) (set (make-local-variable ...) py-indent-offset) (when py-smart-indentation (if ... ... ...)) (when (null py-shell-name) (py-toggle-shells ...)) (when py-load-pymacs-p (py-load-pymacs) (unwind-protect ...) (kill-buffer "pycomplete.el")) (define-key inferior-python-mode-map (kbd "<tab>") (quote python-shell-completion-complete-or-indent)) (if py-menu (easy-menu-add py-menu)) (when py-hide-show-minor-mode-p (hs-minor-mode 1)) (run-mode-hooks (if python-mode-hook ... ...)) (when py-start-run-py-shell (window-configuration-to-register 213465879) (unless ... ...) (jump-to-register 213465879)) (when py-outline-minor-mode-p (outline-minor-mode 1)) (when (interactive-p) (message "python-mode loaded from: %s" "python-mode.el")))
python-mode()
funcall(python-mode)
(progn (funcall mode) mode)
(if mode (progn (funcall mode) mode))
(when mode (funcall mode) mode)
(if (and keep-mode-if-same (eq ... ...)) nil (when mode (funcall mode) mode))
(unless (and keep-mode-if-same (eq ... ...)) (when mode (funcall mode) mode))
set-auto-mode-0(python-mode nil)
set-auto-mode()
(progn (set-auto-mode))
(if debug-on-error (progn (set-auto-mode)) (condition-case err (progn ...) (error ...)))
(report-errors "File mode specification error: %s" (set-auto-mode))
(let ((enable-local-variables ...)) (report-errors "File mode specification error: %s" (set-auto-mode)) (report-errors "File local-variables error: %s" (hack-local-variables)))
normal-mode(t)
after-find-file(nil t)
find-file-noselect-1(#<buffer Pymacs.py> "~/entretien/pymacs/Pymacs.py" nil nil "~/entretien/pymacs/Pymacs.py" (402705 2053))
find-file-noselect("Pymacs.py" nil nil nil)
find-file("Pymacs.py" nil)
find-alternate-file("Pymacs.py")
ido-file-internal(alt-file find-alternate-file nil "Find alternate file: ")
ido-find-alternate-file()
call-interactively(ido-find-alternate-file nil nil)
I would seem that PYTHONPATH ought to be defined in the environment? I
do not see why it should. Checking both README and INSTALL (by the way,
that's really one too much, given the smallish size of these files!), I
see nothing to that effect.
While looking at this problem, may I suggest that you fetch the latest
Pymacs.py and pymacs.el from the Pymacs site and use those, getting rid
of the Pymacs directory? I made this simplification especially to ease
(or start easing!) packaging in python-mode.
François
Hi François,
can't reproduce that kind of error.
Maybe send the output of M-x report-emacs-bug, should it still happen.
As for the PYTHONPATH mentioned, don't see it's related to the error messages shown.
Fetched your latest Pymacs files, thanks. Unfortunately with new pymacs.el get the error "Pymacs didn't start...".
So won't change the tweaked inline Pymacs for the moment as it seems to work.
Should we get some Pymacs related bug report, being able to reproduce, that will change it...
So far,
Andreas