Can't load pymacs.el

Asked by Richard Stanton

Running python-mode 6.0.4 in Emacs 23.4 under OS X, when I set py-load-pymacs-p to t, I get the following error when I try to open a Python file. It looks like it's due to an extra "/" being added to the end of my py-install-directory, which already ends in a "/" as suggested in the INSTALL file.

Debugger entered--Lisp error: (file-error "Cannot open load file" "/pymacs/pymacs.el")
  load("/Applications/Emacs.app/Contents/Resources/site-lisp/python-mode.el-6.04//pymacs/pymacs.el" nil t)
  (if (or (not ...) (not ...)) (error "`py-install-directory' not set, see INSTALL") (load (concat py-install-directory "/pymacs/pymacs.el") nil t) (add-to-list (quote load-path) (concat py-install-directory "/pymacs/pymacs.el")) (setenv "PYMACS_PYTHON" "python2.7") (autoload (quote pymacs-apply) "pymacs") (autoload (quote pymacs-call) "pymacs") (autoload (quote pymacs-eval) "pymacs") (autoload (quote pymacs-exec) "pymacs") (autoload (quote pymacs-load) "pymacs") (require (quote pymacs)))
  py-load-pymacs()
  (progn (py-load-pymacs) (find-file (concat py-install-directory "/completion/pycomplete.el")) (eval-buffer) (kill-buffer "pycomplete.el"))
  (if py-load-pymacs-p (progn (py-load-pymacs) (find-file ...) (eval-buffer) (kill-buffer "pycomplete.el")))
  (when py-load-pymacs-p (py-load-pymacs) (find-file (concat py-install-directory "/completion/pycomplete.el")) (eval-buffer) (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 ...) 8) (when py-smart-indentation (if ... ... ...)) (when (/= tab-width py-indent-offset) (setq indent-tabs-mode nil)) (when (null py-shell-name) (py-toggle-shells ...)) (when py-load-pymacs-p (py-load-pymacs) (find-file ...) (eval-buffer) (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 ... 8) (when py-smart-indentation ...) (when ... ...) (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 ...) 8) (when py-smart-indentation (if ... ... ...)) (when (/= tab-width py-indent-offset) (setq indent-tabs-mode nil)) (when (null py-shell-name) (py-toggle-shells ...)) (when py-load-pymacs-p (py-load-pymacs) (find-file ...) (eval-buffer) (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()
  set-auto-mode-0(python-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer BlackScholes.py> "~/projects/RHSlib/python/RHS/finance/BlackScholes.py" nil nil "~/projects/RHSlib/python/RHS/finance/BlackScholes.py" (109173234 234881029))
  find-file-noselect("/Users/stanton/projects/RHSlib/python/RHS/finance/BlackScholes.py" nil nil nil)
  find-file("/Users/stanton/projects/RHSlib/python/RHS/finance/BlackScholes.py")
  steve-ido-choose-from-recentf()
  call-interactively(steve-ido-choose-from-recentf nil nil)

Question information

Language:
English Edit question
Status:
Answered
For:
python-mode.el Edit question
Assignee:
Andreas Roehler Edit question
Last query:
Last reply:
Revision history for this message
Andreas Roehler (a-roehler) said :
#1

handling of file-path-separator fixed in trunk, upcoming release 6.0.5

Can you help with this problem?

Provide an answer of your own, or ask Richard Stanton for more information if necessary.

To post a message you must log in.