python-mode-6.0.4 is broken. Upon loading, emacs issues the error: Cannot open load file" "highlight-indentation" Observations: o The problem goes away with python-mode-5.2.0. o Apparently, 5.2.0 does not need highlight-indentation.el o 6.0.4 needs it. Using the latest version from https://github.com/antonj/Highlight-Indentation-for-Emacs makes the error go away and produces some source highlighting but results in a different error. Reproducible: Always
python.el of python-mode-6.0.3 had the conditional: (when (featurep 'xemacs) (require 'highlight-indentation)) whereas in 6.0.4 it was changed to: (unless (featurep 'xemacs) (require 'highlight-indentation)) The problem should be fixed in 6.0.4-r1, please test.
6.0.4-r1 is still broken. I get a different error : File mode specification error: (void-variable py-mode-map) 6.0.3-r1 works fine.
(In reply to comment #2) > 6.0.4-r1 is still broken. > > I get a different error : > File mode specification error: (void-variable py-mode-map) I cannot reproduce this error here. Are you using python-mode together with other packages, like app-emacs/doctest-mode or app-emacs/pymacs (and if yes, what version?). Anyway, I've bumped python-mode to version 6.0.5, please try if the issues are fixed there.
I am not using app-emacs/doctest-mode or app-emacs/pymacs I do use ipython. Will try 6.0.5 later today.
(In reply to comment #4) > I am not using > > app-emacs/doctest-mode or app-emacs/pymacs > > I do use ipython. > > Will try 6.0.5 later today. Unfortunately 6.0.5 is still broken. Emacs gives me the error: File mode specification error: (void-variable py-mode-map) I am not 100% sure, but the issue seems to be related to ipython (which is not an obscure package). In any case, 6.0.3-r1 works. I am no elisp expert, but I note that when the ebuild compiles 6.0.5 there are a fair number of warnings. .... * Compiling GNU Emacs Elisp files ... Wrote /var/tmp/portage/app-emacs/python-mode-6.0.5/work/python-mode.el-6.0.5/column-marker.elc In highlight-indentation: python-mode.el:917:43:Warning: reference to free variable `highlight-indent-offset' python-mode.el:941:28:Warning: assignment to free variable `highlight-indent-offset' In py-indent-line-intern: python-mode.el:2810:68:Warning: reference to free variable `cui' python-mode.el:2811:37:Warning: reference to free variable `col' In py-line-backward-maybe: python-mode.el:4282:11:Warning: assignment to free variable `line' In py-set-shell-completion-environment: python-mode.el:6496:59:Warning: assignment to free variable `ipython-version' python-mode.el:6496:59:Warning: reference to free variable `ipython-version' python-mode.el:6496:79:Warning: reference to free variable `ipython0.10-completion-command-string' python-mode.el:6496:117:Warning: reference to free variable `ipython0.11-completion-command-string' python-mode.el:6496:18:Warning: assignment to free variable `ipython-completion-command-string' In py-set-ipython-completion-command-string: python-mode.el:6510:74:Warning: reference to free variable `ipython0.10-completion-command-string' python-mode.el:6510:112:Warning: reference to free variable `ipython0.11-completion-command-string' python-mode.el:6511:7:Warning: assignment to free variable `ipython-completion-command-string' python-mode.el:6511:7:Warning: reference to free variable `ipython-completion-command-string' In python-switch: python-mode.el:6718:34:Warning: reference to free variable `switch' In ipython-switch: python-mode.el:6726:35:Warning: reference to free variable `switch' In python3-switch: python-mode.el:6734:35:Warning: reference to free variable `switch' In python2-switch: python-mode.el:6742:35:Warning: reference to free variable `switch' In python2.7-switch: python-mode.el:6750:37:Warning: reference to free variable `switch' In jython-switch: python-mode.el:6758:34:Warning: reference to free variable `switch' In python3.2-switch: python-mode.el:6766:37:Warning: reference to free variable `switch' In py-execute-intern: python-mode.el:6993:13:Warning: reference to free variable `wholebuf' python-mode.el:7007:55:Warning: reference to free variable `pec' python-mode.el:7009:25:Warning: reference to free variable `switch' python-mode.el:7014:36:Warning: reference to free variable `regbuf' In ipython-get-indenting-buffer: python-mode.el:7138:33:Warning: reference to free variable `ipython-indenting-buffer-name' In py-execute-region-in-shell: python-mode.el:7200:15:Warning: `save-excursion' defeated by `set-buffer' python-mode.el:7232:36:Warning: `save-excursion' defeated by `set-buffer' In py-qualified-module-name: python-mode.el:7379:35:Warning: reference to free variable `rec' In py-execute-defun: python-mode.el:7502:8:Warning: function `py-execute-defun' defined multiple times in this file In py-process-file: python-mode.el:7508:8:Warning: function `py-process-file' defined multiple times in this file In py-exec-execfile-region: python-mode.el:7524:48:Warning: reference to free variable `arg' In py-execute-file: python-mode.el:7685:22:Warning: `insert-file' used from Lisp code That command is designed for interactive use only python-mode.el:7702:11:Warning: assignment to free variable `erg' python-mode.el:7701:12:Warning: reference to free variable `erg' In py-execute-file-base: python-mode.el:7720:11:Warning: `save-excursion' defeated by `set-buffer' In py-postprocess-output-buffer: python-mode.el:7748:15:Warning: `save-excursion' defeated by `set-buffer' In py-pdbtrack-get-source-buffer: python-mode.el:8006:20:Warning: `save-excursion' defeated by `set-buffer' In py-pdbtrack-grub-for-buffer: python-mode.el:8024:44:Warning: `save-excursion' defeated by `set-buffer' python-mode.el:8028:42:Warning: `save-excursion' defeated by `set-buffer' In py-match-paren: python-mode.el:8706:8:Warning: function py-match-paren used to take 0+ arguments, now takes 0 python-mode.el:8706:8:Warning: function `py-match-paren' defined multiple times in this file In py-imenu-create-index-new-intern: python-mode.el:8987:108:Warning: reference to free variable `end' python-mode.el:9000:21:Warning: reference to free variable `index-alist' python-mode.el:9000:21:Warning: assignment to free variable `index-alist' In py-switch-shells: python-mode.el:9186:18:Warning: assignment to free variable `msg' python-mode.el:9210:14:Warning: reference to free variable `msg' In python-mode: python-mode.el:9416:65:Warning: assignment to free variable `hs-hide-comments-when-hiding-all' python-mode.el:9440:30:Warning: assignment to free variable `outline-heading-end-regexp' In py-version: python-mode.el:9658:45:Warning: function py-version used to take 0+ arguments, now takes 0 python-mode.el:9658:45:Warning: function `py-version' defined multiple times in this file In py-install-local-shells: python-mode.el:9736:47:Warning: assignment to free variable `curexe' python-mode.el:9725:34:Warning: assignment to free variable `aktpath' python-mode.el:9725:34:Warning: reference to free variable `aktpath' python-mode.el:9738:38:Warning: reference to free variable `curexe' python-mode.el:10578:10:Warning: `make-variable-buffer-local' should be called at toplevel python-mode.el:10622:9:Warning: `make-variable-buffer-local' should be called at toplevel python-mode.el:10602:38:Warning: `make-variable-buffer-local' should be called at toplevel python-mode.el:10599:17:Warning: `save-excursion' defeated by `set-buffer' In ipython-complete: python-mode.el:10799:66:Warning: Function `position' from cl package called at runtime In py-else: python-mode.el:10881:19:Warning: function `py-else' defined multiple times in this file In py-def: python-mode.el:10919:18:Warning: function py-def used to take 0+ arguments, now takes 0-2 python-mode.el:10919:18:Warning: function `py-def' defined multiple times in this file In py-class: python-mode.el:10926:18:Warning: function py-class used to take 0+ arguments, now takes 0-2 python-mode.el:10926:18:Warning: function `py-class' defined multiple times in this file python-mode.el:10960:9:Warning: assignment to free variable `virtualenv-workon-home' python-mode.el:10962:7:Warning: assignment to free variable `virtualenv-name' In virtualenv-current: python-mode.el:10991:12:Warning: reference to free variable `virtualenv-name' In virtualenv-activate: python-mode.el:10998:9:Warning: reference to free variable `virtualenv-name' python-mode.el:11002:9:Warning: assignment to free variable `virtualenv-old-path' python-mode.el:11003:9:Warning: assignment to free variable `virtualenv-old-exec-path' python-mode.el:11011:35:Warning: assignment to free variable `virtualenv-name' In virtualenv-deactivate: python-mode.el:11018:18:Warning: reference to free variable `virtualenv-old-path' python-mode.el:11019:19:Warning: reference to free variable `virtualenv-old-exec-path' python-mode.el:11021:35:Warning: reference to free variable `virtualenv-name' python-mode.el:11023:9:Warning: assignment to free variable `virtualenv-name' In virtualenv-workon-complete: python-mode.el:11033:35:Warning: reference to free variable `virtualenv-workon-home' In end of data: python-mode.el:13197:1:Warning: the following functions are not known to be defined: py-beginning-of-buffer-position, py-end-of-buffer-position, ar-in-parentized-p-atpt, ar-in-braced-p-atpt, ar-in-bracketed-p-atpt, py-beginning-of-list, py-end-of-list, ar-parentized-end-atpt, ar-parentized-beginning-atpt, ar-bracketed-end-atpt, ar-bracketed-beginning-atpt, ar-braced-end-atpt, ar-braced-beginning-atpt, py-beginning-of-partial-expression-p, ar-bounds-of-word-atpt, string-strip, py-shell-redirect-send-command-to-process, py-shell-dynamic-simple-complete Wrote /var/tmp/portage/app-emacs/python-mode-6.0.5/work/python-mode.el-6.0.5/python-mode.elc [ ok ] >>> Source compiled. >>> Test phase [not enabled]: app-emacs/python-mode-6.0.5
(In reply to comment #5) > Unfortunately 6.0.5 is still broken. Emacs gives me the error: > File mode specification error: (void-variable py-mode-map) > I am not 100% sure, but the issue seems to be related > to ipython (which is not an obscure package). Right, ipython.el assumes that there is a variable py-mode-map which does no longer exist in new versions of python-mode.el. But this is a separate problem which has nothing to do with the subject of this bug, and we shouldn't mix different issues in one bug report. Therefore I'm closing this now. Could you please file a new bug report for the python-mode/ipython incompatibility?
Done. Bug 407715.