Comment 2 for bug 920079

Revision history for this message
yagnesh (yagnesh) wrote :

scratch above fix

seems main place to fix is py-choose-shell

Here is the diff

***************
*** 7563,7577 ****

  With \\[universal-argument]) user is prompted to specify a reachable Python version."
    (interactive "P")
! (let ((erg (cond ((eq 4 (prefix-numeric-value arg))
! (read-from-minibuffer "Python Shell: " py-shell-name))
! (py-use-local-default
! (if (not (string= "" py-shell-local-path))
! (expand-file-name py-shell-local-path)
! (message "Abort: `py-use-local-default' is set to `t' but `py-shell-local-path' is empty. Maybe call `py-toggle-local-default-use'")))
! ((py-choose-shell-by-shebang))
! ((py-choose-shell-by-import))
! (t py-shell-name))))
      (when (interactive-p) (message "%s" erg))
      (setq py-shell-name erg)
      erg))
--- 7564,7580 ----

  With \\[universal-argument]) user is prompted to specify a reachable Python version."
    (interactive "P")
! (let ((erg (cond
! (py-shell-name py-shell-name)
! ((eq 4 (prefix-numeric-value arg))
! (read-from-minibuffer "Python Shell: " py-shell-name))
! (py-use-local-default
! (if (not (string= "" py-shell-local-path))
! (expand-file-name py-shell-local-path)
! (message "Abort: `py-use-local-default' is set to `t' but `py-shell-local-path' is empty. Maybe call `py-toggle-local-default-use'")))
! ((py-choose-shell-by-shebang))
! ((py-choose-shell-by-import))
! (t nil))))
      (when (interactive-p) (message "%s" erg))
      (setq py-shell-name erg)
      erg))