[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
select a section of text and run it into another process?
From: |
Sayth Renshaw |
Subject: |
select a section of text and run it into another process? |
Date: |
Tue, 31 Mar 2015 04:15:52 -0700 (PDT) |
User-agent: |
G2/1.0 |
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?
In the emacs manual it shows this article for sending to process
http://www.gnu.org/software/emacs/manual/html_node/elisp/Input-to-Processes.html
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
- select a section of text and run it into another process?,
Sayth Renshaw <=