Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Stata and Emacs interactively


From   Neil Shephard <nshephard@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Stata and Emacs interactively
Date   Wed, 20 Oct 2010 11:15:01 +0000

On Wed, Oct 20, 2010 at 11:07 AM, Ulrich Kohler <kohler@wzb.eu> wrote:
> Unfortunately Bill's adomode have the feature of sending commands to
> Stata "only" for Windows and the Mac. If you find a solution for Linux
> this would be great.

May depend on your Desktop Environment, but under X11 you should be
able to highlight a section of code in Emacs (or any other text
editor).  This will copy it to a buffer ring, then switch to your
running xstata (either Alt-Tab or switch desktop if its on a separate
desk-top) and use the left-right mouse simultaneous click to paste the
code into the Command dialog box of Stata and hit Return.

The only disadvantage to this that I've come across is that code
commented out within a command won't be run properly, for example...

logistic a b c /* d e f */, level(99)

...won't work if pasted.

Whole lines of commented code are not a problem though, Stata will
simply say that '/' is an invalid command and move onto the next line
(it also ignores lines that have been commented out with a '*' at the
first line).

Neil



-- 
"Our civilization would be pitifully immature without the intellectual
revolution led by Darwin" - Motoo Kimura, The Neutral Theory of
Molecular Evolution

Email - nshephard@gmail.com
Website - http://kimura-no-ip.org/
Photos - http://www.flickr.com/photos/slackline/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index