[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: select a section of text and run it into another process?

From: Eric Abrahamsen
Subject: Re: select a section of text and run it into another process?
Date: Wed, 01 Apr 2015 20:08:45 +0800
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Sayth Renshaw <address@hidden> writes:

> 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 run a 
>> section of code in a file and send it to an eshell process of python/ipython 
>> to evaluated.
>> 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
>> (
>> but can anyone provide a solid answer?
>> In the emacs manual it shows this article for sending to process 
>> which means I assume I could make a keybinding adaption if this
>> (process-send-string "shell<1>" "ls\n")
>> (process-send-string "eshell<ipython>" "some version of selected text")
>> 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.
>> Thanks
>> Sayth
> Actually  think I found a solution there a some modes python.el already has 
> an implementation.
> There is isend-mode which can 
> be configured for any language.

Somebody ought to mention Org, which can take arbitrary chunks of
text/code and run them through external interpreters and "do things"
with the results. See the "Working with source code" section of the Org


reply via email to

[Prev in Thread] Current Thread [Next in Thread]