help-gnu-emacs
[Top][All Lists]
Advanced

[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: Eli Zaretskii
Subject: Re: select a section of text and run it into another process?
Date: Tue, 31 Mar 2015 15:10:28 +0300

> Date: Tue, 31 Mar 2015 04:15:52 -0700 (PDT)
> From: Sayth Renshaw <address@hidden>
> 
> 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.

To send a portion of text to a process (not eshell, but a program that
Emacs will invoke), select the text and then type "M-|".  Emacs will
prompt for the command to invoke on this text.

> 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://stackoverflow.com/questions/657672/how-to-select-or-highlight-a-block-in-emacs)
>  but can anyone provide a solid answer? 

Type "C-SPC" on one edge of the text, then move to the other.  That's
all; the text between those two points is now selected.



reply via email to

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