emacs python-mode bug #1021885

Discussion in 'Python' started by Marcio Rosa da Silva, Sep 27, 2004.

  1. 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
    Marcio Rosa da Silva, Sep 27, 2004
    #1
    1. Advertising

  2. Marcio Rosa da Silva

    Davor Beuc Guest

    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/?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"


    If you first start the interpreter with C-c !, the execute-buffer
    function will work.
    Davor Beuc, Sep 27, 2004
    #2
    1. Advertising

  3. Marcio Rosa da Silva

    kaba Guest

    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/?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
    kaba, Sep 29, 2004
    #3
  4. 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/?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
    >

    Thank you very much!

    greetings

    Torsten
    Torsten Marek, Oct 2, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John J Lee
    Replies:
    3
    Views:
    470
    bruno at modulix
    Dec 1, 2005
  2. Jeffrey Moss

    eruby mode emacs with mmm-mode

    Jeffrey Moss, Jul 6, 2005, in forum: Ruby
    Replies:
    1
    Views:
    145
    Alan Chen
    Jul 6, 2005
  3. PerlFAQ Server
    Replies:
    1
    Views:
    190
    Marc Girod
    Jan 8, 2011
  4. PerlFAQ Server
    Replies:
    0
    Views:
    163
    PerlFAQ Server
    Apr 12, 2011
  5. Frank Stutzman

    Emacs python-mode.el bug #1207470

    Frank Stutzman, Feb 14, 2014, in forum: Python
    Replies:
    3
    Views:
    52
    Frank Stutzman
    Feb 15, 2014
Loading...

Share This Page