Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   emacs python-mode bug #1021885 (http://www.velocityreviews.com/forums/t336250-emacs-python-mode-bug-1021885-a.html)

Marcio Rosa da Silva 09-27-2004 07:48 AM

emacs python-mode bug #1021885
 
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/?grou...il&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

Davor Beuc 09-27-2004 10:55 AM

Re: emacs python-mode bug #1021885
 
Marcio Rosa da Silva wrote:
> 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/?grou...il&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"


If you first start the interpreter with C-c !, the execute-buffer
function will work.

kaba 09-29-2004 07:16 PM

Re: emacs python-mode bug #1021885
 
Marcio Rosa da Silva wrote:

> 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/?grou...il&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


Torsten Marek 10-02-2004 05:19 PM

Re: emacs python-mode bug #1021885
 
kaba schrieb:
> Marcio Rosa da Silva wrote:
>
>> 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/?grou...il&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
>

Thank you very much!

greetings

Torsten


All times are GMT. The time now is 07:21 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.