🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.smalltalk.bug
Article #1

Need help taking advantage of st.el's interactive support

#1
From: Steve Byrne
Date: Tue, 27 Oct 1992 07:16
48 lines
2522 bytes
Emmett McLean writes:
 > Does anyone have  supplemental documentation on how to
 > use the interactive smalltalk commands such as
 > smalltalk-doit, smalltalk-compile, and smalltalk-snapshot?
 > 
 > My path set up so st.el finds mst and
 > when I type "M-x mst" I get the desired two window 
 > set up. If anyone is really ambitous they might
 > I instruct mst to evaluate the last 10 lines of code
 > below.
 > 
 > Your help is greatly appreciated. By helping me you are
 > also helping about 10 other students who find this of interest.

Hi -- sorry to take so long to reply.  Let's see...you want to understand how
to work the Emacs "browser".  There is some description of this facility in the
mst.textinfo file that you should have in the 1.1.1 distribution.  Basically,
if you are evaluating some code for immediate execution, put the cursor
somewhere in the code and type C-c d (control-c d).  This will send the
expression to Smalltalk (invoking a session if there isn't one).  In the case
of the last 10 lines of the code, you've defeated the heuristic for the
smalltalk-doit Emacs function: you need to indent the code (even by one space)
for c-c d to work.  

|m l o count|
    l_ GraphNode new.
    m_ GraphNode new.
    o_ GraphNode new.
    l addNeighbor: m.
    l addNeighbor: o.
    count_0.
    (l doWithNeighbors: [count_count+1]).
    count printNl
!

I'd also recomment strongly putting in spaces around the assignment and the 
+ operators.  

Now, even for the code you have, you can force evaluation of particular areas
of code with the c-c e command (smalltalk-eval-region).  Put a mark at one end
of the expression (region) to be evaluated, and move the point (cursor) to the
other, then type c-c e.  

To compile individual methods, put the cursor somewhere inside the body and
type c-c c.  To compile whole sections of your program, use c-c e around the
entire set of method definitions (including the "methodsFor:" part).

Steve
Technical Details
Message-ID: <9210270716.AA07906@laplace.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!eng.SUn.COM!Steven.Byrne
References: <1992Oct3.070113.9436@csus.edu>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.smalltalk.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!eng.SUn.COM!Steven.Byrne
From: Steven.Byrne@eng.SUn.COM (Steve Byrne)
Subject: Need help taking advantage of st.el's interactive support
Message-ID: <9210270716.AA07906@laplace.Eng.Sun.COM>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
References: <1992Oct3.070113.9436@csus.edu>
Distribution: gnu
Date: Tue, 27 Oct 1992 07:16:40 GMT
Approved: bug-smalltalk@prep.ai.mit.edu
Lines: 49