From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-15?Q?Andreas_R=F6hler?= Subject: Re: [PATCH] session with python-mode.el complains of void py-toggle-shells Date: Wed, 23 Jan 2013 19:02:01 +0100 Message-ID: <51002599.6000404@online.de> References: <87ham8y5rw.fsf@gmail.com> <3314.1358914289@alphaville> <87fw1sxe15.fsf@gmail.com> <87pq0w2gq6.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty4en-0007uw-TS for Emacs-orgmode@gnu.org; Wed, 23 Jan 2013 13:02:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ty4ef-0006MP-Pe for Emacs-orgmode@gnu.org; Wed, 23 Jan 2013 13:02:41 -0500 Received: from moutng.kundenserver.de ([212.227.126.186]:58696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty4ef-0006M4-Eh for Emacs-orgmode@gnu.org; Wed, 23 Jan 2013 13:02:33 -0500 In-Reply-To: <87pq0w2gq6.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: Myles English , Emacs-orgmode , nicholas.dokos@hp.com Am 23.01.2013 14:04, schrieb Bastien: > Hi Myles, > > thanks for digging into this. > > I'm copying Andreas as the maintainer of python-mode.el. > > Myles English 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)) > Hi Bastien, > If this function's name changed, there should be an alias in > python-mode.el. > right >> (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, > Okay, I'll dig into. For the moment: assume this code should not be needed, python-mode.el should act that all. But let me have a closer look, Cheers, Andreas