From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sayth Renshaw Newsgroups: gmane.emacs.help Subject: Re: select a section of text and run it into another process? Date: Wed, 1 Apr 2015 04:16:28 -0700 (PDT) Message-ID: <84f3539d-ac50-4217-be7f-48d42b22e6a5@googlegroups.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1427887254 403 80.91.229.3 (1 Apr 2015 11:20:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Apr 2015 11:20:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 01 13:20:41 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 1YdGhM-00049Z-88 for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Apr 2015 13:20:40 +0200 Original-Received: from localhost ([::1]:51088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdGhK-0002tw-2T for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Apr 2015 07:20:38 -0400 X-Received: by 10.66.236.74 with SMTP id us10mr48880246pac.28.1427886989450; Wed, 01 Apr 2015 04:16:29 -0700 (PDT) X-Received: by 10.50.85.17 with SMTP id d17mr179733igz.7.1427886989409; Wed, 01 Apr 2015 04:16:29 -0700 (PDT) Original-Path: usenet.stanford.edu!l13no226839iga.0!news-out.google.com!q14ni5033ign.0!nntp.google.com!l13no226831iga.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=110.146.153.253; posting-account=5Cd8QAoAAAC6AxpkrISTgUBJ9ktgwNBm Original-NNTP-Posting-Host: 110.146.153.253 User-Agent: G2/1.0 Injection-Date: Wed, 01 Apr 2015 11:16:29 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:211195 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:103477 Archived-At: On Tuesday, 31 March 2015 22:16:00 UTC+11, Sayth Renshaw wrote: > My emacs is going well, but something I would like to be able to do is ru= n a section of code in a file and send it to an eshell process of python/ip= ython to evaluated. >=20 > How do I do this, I am not sure how to select the text without using the = mouse, there are a lot of people guessing on this SO question (http://stack= overflow.com/questions/657672/how-to-select-or-highlight-a-block-in-emacs) = but can anyone provide a solid answer?=20 >=20 > In the emacs manual it shows this article for sending to process http://w= ww.gnu.org/software/emacs/manual/html_node/elisp/Input-to-Processes.html >=20 > which means I assume I could make a keybinding adaption if this >=20 > (process-send-string "shell<1>" "ls\n") >=20 > (process-send-string "eshell" "some version of selected text") >=20 > Any ideas or is there a plugin that already does this? I would like to be= able to do this with multiple file types but python is where I am starting= . >=20 > Thanks >=20 > Sayth Actually think I found a solution there a some modes python.el already has= an implementation. There is isend-mode http://showterm.io/2b2a4b6759004598de4ee#slow which can= be configured for any language. https://github.com/ffevotte/isend-mode.el