emacs python-mode bug #1021885

  • Thread starter Marcio Rosa da Silva
  • Start date
D

Davor Beuc

K

kaba

Marcio said:
Hi!

I am having some problem with python-emacs mode. I found a bug related
to it at sf.net:

bug #1021885 shell gets set to 'cpython':

http://sourceforge.net/tracker/?group_id=86916&atid=581349&func=detail&aid=1021885


The problem is that when I try to run the script using C-c C-c, I get
the following message:

"Wrong type argument: sequencep, cpython"

My question is if there is anyone that found a workaround to this problem?

Thanks!

Marcio

Hi Marcio,
the bug is in 'py-execute-region'
the patch below should fix it.

***************
*** 1679,1686 ****
(insert-buffer-substring cur start end)
;; Set the shell either to the #! line command, or to the
;; py-which-shell buffer local variable.
! (setq shell (or (py-choose-shell-by-shebang)
! (py-choose-shell-by-import)
py-which-shell))))
(cond
;; always run the code in its own asynchronous subprocess
--- 1679,1686 ----
(insert-buffer-substring cur start end)
;; Set the shell either to the #! line command, or to the
;; py-which-shell buffer local variable.
! (setq shell (or (car (rassoc (quote (py-choose-shell-by-shebang))
py-shell-alist))
! (car (rassoc (quote (py-choose-shell-by-import)) py-shell-alist))
py-which-shell))))
(cond
;; always run the code in its own asynchronous subprocess
 
T

Torsten Marek

kaba said:
Hi Marcio,
the bug is in 'py-execute-region'
the patch below should fix it.

***************
*** 1679,1686 ****
(insert-buffer-substring cur start end)
;; Set the shell either to the #! line command, or to the
;; py-which-shell buffer local variable.
! (setq shell (or (py-choose-shell-by-shebang)
! (py-choose-shell-by-import)
py-which-shell))))
(cond
;; always run the code in its own asynchronous subprocess
--- 1679,1686 ----
(insert-buffer-substring cur start end)
;; Set the shell either to the #! line command, or to the
;; py-which-shell buffer local variable.
! (setq shell (or (car (rassoc (quote (py-choose-shell-by-shebang))
py-shell-alist))
! (car (rassoc (quote (py-choose-shell-by-import))
py-shell-alist))
py-which-shell))))
(cond
;; always run the code in its own asynchronous subprocess
Thank you very much!

greetings

Torsten
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top