unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Barry Margolin <barmar@alum.mit.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: select a section of text and run it into another process?
Date: Tue, 31 Mar 2015 12:02:07 -0400	[thread overview]
Message-ID: <barmar-5C2BC5.12020731032015@88-209-239-213.giganet.hu> (raw)
In-Reply-To: c3ad0973-0926-4449-a7c8-d1076a6c8ec2@googlegroups.com

In article <c3ad0973-0926-4449-a7c8-d1076a6c8ec2@googlegroups.com>,
 Sayth Renshaw <flebber.crue@gmail.com> 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 
> (http://stackoverflow.com/questions/657672/how-to-select-or-highlight-a-block-
> in-emacs) but can anyone provide a solid answer? 

That question is confusing because the question wasn't very clear that 
it was talking about rectangular regions, not ordinary regions. Some of 
the answers recognized this, some didn't.

The built-in Emacs tutorial explains how to mark a region, although it 
doesn't really go into detail or use that term, it just describes the 
process as part of the method of killing the region:

You can also kill any part of the text with one uniform method.  Move
to one end of that part, and type C-@ or C-<SPC> (either one).  (<SPC>
is the Space bar.)  Move to the other end of that part, and type C-w.
That kills all the text between the two positions.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


  parent reply	other threads:[~2015-03-31 16:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31 11:15 select a section of text and run it into another process? Sayth Renshaw
2015-03-31 12:10 ` Eli Zaretskii
2015-03-31 16:02 ` Barry Margolin [this message]
2015-04-01  8:15   ` Sayth Renshaw
2015-04-01 14:30     ` Eli Zaretskii
2015-04-01  8:20   ` Sayth Renshaw
2015-04-01 11:16 ` Sayth Renshaw
2015-04-01 12:08   ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=barmar-5C2BC5.12020731032015@88-209-239-213.giganet.hu \
    --to=barmar@alum.mit.edu \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).