From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: Org + Elpy Python + IPython Date: Tue, 20 May 2014 16:23:12 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmqZG-0005Xi-2S for emacs-orgmode@gnu.org; Tue, 20 May 2014 16:23:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WmqZB-00067u-H5 for emacs-orgmode@gnu.org; Tue, 20 May 2014 16:23:22 -0400 Received: from mail-ig0-x22c.google.com ([2607:f8b0:4001:c05::22c]:51538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmqZB-00067k-DY for emacs-orgmode@gnu.org; Tue, 20 May 2014 16:23:17 -0400 Received: by mail-ig0-f172.google.com with SMTP id uy17so5366972igb.5 for ; Tue, 20 May 2014 13:23:16 -0700 (PDT) Received: from gorgonzola (173-163-102-58-cpennsylvania.hfc.comcastbusiness.net. [173.163.102.58]) by mx.google.com with ESMTPSA id y7sm31408889igl.13.2014.05.20.13.23.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 May 2014 13:23:15 -0700 (PDT) In-reply-to: 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: Org-mode mailing list And with a bit more work (and help from others) I have it working. IPython, Org, Elpy, session or no-session. Still cannot set (elpy-use-ipython) which makes the IPython sessions a bit less awesome (no popup help, for example). But everything else appears to work. (setq org-babel-python-command "ipython --pylab=osx --pdb --nosep --classic --no-banner --no-confirm-exit") ;; https://github.com/jorgenschaefer/elpy/issues/191 ;; https://lists.gnu.org/archive/html/emacs-orgmode/2014-03/msg00405.html ;; make IPython work w/ Org (defadvice org-babel-python-evaluate (around org-python-use-cpaste (session body &optional result-type result-params preamble) activate) "Add a %cpaste and '--' to the body, so that ipython does the right thing." (setq body (concat "%cpaste -q\n" body "\n--\n")) ad-do-it (if (stringp ad-return-value) (setq ad-return-value (replace-regexp-in-string "\\(^Pasting code; enter '--' alone on the line to stop or use Ctrl-D\.[\r\n]:*\\)" "" ad-return-value)))) -k.