From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri D'Elia Newsgroups: gmane.emacs.help Subject: Evaluating python code blocks in python-mode Date: Sat, 20 Jun 2015 12:50:39 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1434797734 30277 80.91.229.3 (20 Jun 2015 10:55:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Jun 2015 10:55:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 20 12:55:26 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z6GQl-0002M7-NK for geh-help-gnu-emacs@m.gmane.org; Sat, 20 Jun 2015 12:55:23 +0200 Original-Received: from localhost ([::1]:32930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6GQl-0003Lb-4V for geh-help-gnu-emacs@m.gmane.org; Sat, 20 Jun 2015 06:55:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6GQZ-0003LR-UQ for help-gnu-emacs@gnu.org; Sat, 20 Jun 2015 06:55:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z6GQW-00087a-NL for help-gnu-emacs@gnu.org; Sat, 20 Jun 2015 06:55:11 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:54586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6GQW-00084Z-GT for help-gnu-emacs@gnu.org; Sat, 20 Jun 2015 06:55:08 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Z6GQR-00020Z-88 for help-gnu-emacs@gnu.org; Sat, 20 Jun 2015 12:55:03 +0200 Original-Received: from 151.95.1.30 ([151.95.1.30]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Jun 2015 12:55:03 +0200 Original-Received: from wavexx by 151.95.1.30 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Jun 2015 12:55:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 23 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 151.95.1.30 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105053 Archived-At: Hi everyone, I'd like some advice about using python-mode with a python subprocess. I always preferred to use emacs+file+external process as opposed to use an ipython's notebook-like interface: it's just more convenient, especially when debugging existing code. I often use the same setup when doing some analysis, and this is when an inotebook-like interface is more convenient for evaluation: I'd like to evaluate code not line-by-line, or by defun, but by my custom-defined blocks. I realized I was continuously selecting a region, and using py-send-region over and over. Right now I narrow to the region I'm editing, and use py-send-buffer instead. It's ok-eish, but narrow/widen narrow/widen, while less common, is still inconvenient. I've seen people using org-mode for this kind of setup instead. Which might be ok, but I'd like to know what other choices I could have as well. I was thinking of defining a custom region using comments, and defining my own py-send-custom-block using comment markers as boundaries. Surely, something like this must already exists.