emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: Myles English <mylesenglish@gmail.com>
Cc: andreas <andreas.roehler@online.de>,
	nicholas.dokos@hp.com, Emacs-orgmode <Emacs-orgmode@gnu.org>
Subject: Re: [PATCH] session with python-mode.el complains of void py-toggle-shells
Date: Wed, 23 Jan 2013 14:04:17 +0100	[thread overview]
Message-ID: <87pq0w2gq6.fsf@bzg.ath.cx> (raw)
In-Reply-To: <87fw1sxe15.fsf@gmail.com> (Myles English's message of "Wed, 23 Jan 2013 12:46:46 +0000")

Hi Myles,

thanks for digging into this.  

I'm copying Andreas as the maintainer of python-mode.el.

Myles English <mylesenglish@gmail.com> writes:

> --- lisp/ob-python.el
> +++ lisp/ob-python.el
> @@ -32,7 +32,7 @@
>  
>  (declare-function org-remove-indentation "org" )
>  (declare-function py-shell "ext:python-mode" (&optional argprompt))
> -(declare-function py-toggle-shells "ext:python-mode" (arg))
> +(declare-function py-toggle-shell "ext:python-mode" (arg))

If this function's name changed, there should be an alias in
python-mode.el.

>  (declare-function run-python "ext:python" (&optional cmd noshow new))
>  
>  (defvar org-babel-tangle-lang-exts)
> @@ -162,16 +162,17 @@ then create.  Return the initialized session."
>         ;; Make sure that py-which-bufname is initialized, as otherwise
>         ;; it will be overwritten the first time a Python buffer is
>         ;; created.
> -       (py-toggle-shells py-default-interpreter)
> +       (py-toggle-shell py-default-interpreter)
>         ;; `py-shell' creates a buffer whose name is the value of
>         ;; `py-which-bufname' with '*'s at the beginning and end
>         (let* ((bufname (if (and python-buffer (buffer-live-p python-buffer))
>                             (replace-regexp-in-string ;; zap surrounding *
>                              "^\\*\\([^*]+\\)\\*$" "\\1" python-buffer)
>                           (concat "Python-" (symbol-name session))))
> -              (py-which-bufname bufname))
> -         (py-shell)
> -         (setq python-buffer (concat "*" bufname "*"))))
> +              (py-buffer-name bufname))
> +         (setq python-buffer (concat "*" bufname "*"))
> +         (py-shell nil nil nil nil nil python-buffer)
> +         ))

The docstring of py-shell doesn't say much about why python-buffer
would be needed as an argument here.  Is it so?

If yes, we need to make this compatible with previous versions of 
python-mode.el.  

(The argument PY-BUFFER-NAME is not documented in latest
python-mode.el)

Andreas, can you help sorting this out?

Thanks,

-- 
 Bastien

  reply	other threads:[~2013-01-23 13:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23  2:47 session with python-mode.el complains of void py-toggle-shells Myles English
2013-01-23  4:11 ` Nick Dokos
2013-01-23 12:46   ` [PATCH] " Myles English
2013-01-23 13:04     ` Bastien [this message]
2013-01-23 18:02       ` Andreas Röhler
2013-01-24 14:10         ` Bastien
2013-02-21 20:08           ` Andreas Röhler
2013-02-22  8:25           ` Andreas Röhler
2013-02-23  9:29             ` Bastien
2013-01-23 13:00   ` Bastien
  -- strict thread matches above, loose matches on Subject: below --
2011-10-28  1:23 [odt] equation labels Myles English
2011-10-30 22:11 ` Jambunathan K
2011-10-31 11:54   ` Myles English
2011-11-01 11:17     ` Myles English
2011-11-01 19:39     ` Jambunathan K
2011-11-01 19:49       ` Jambunathan K
2011-11-02 13:18       ` Myles English
     [not found]         ` <mylesenglish@gmail.com>
2011-11-02 13:38           ` Nick Dokos
2011-11-02 14:49             ` Myles English
2011-11-02 14:52           ` Nick Dokos
2011-11-02 18:21             ` Jambunathan K
2011-11-02 21:33               ` Myles English

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pq0w2gq6.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=Emacs-orgmode@gnu.org \
    --cc=andreas.roehler@online.de \
    --cc=mylesenglish@gmail.com \
    --cc=nicholas.dokos@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).