emacs python-mode bug #1021885

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marcio Rosa da Silva

    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':



    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

    #2
    Re: emacs python-mode bug #1021885

    Marcio Rosa da Silva wrote:[color=blue]
    > 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"[/color]

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

    Comment

    • kaba

      #3
      Re: emacs python-mode bug #1021885

      Marcio Rosa da Silva wrote:
      [color=blue]
      > 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[/color]

      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

      Comment

      • Torsten Marek

        #4
        Re: emacs python-mode bug #1021885

        kaba schrieb:[color=blue]
        > Marcio Rosa da Silva wrote:
        >[color=green]
        >> 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[/color]
        >
        >
        > 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
        >[/color]
        Thank you very much!

        greetings

        Torsten

        Comment

        Working...