That was exactly what I needed on the namespaces/modules. I had tried
pieces of this but not all of them at the same time (I guess because I
was lazily dipping into the documentation instead of reading that
section all the way through). Now the Check Syntax -> control-click ->
Jump to Definition trick works across files, which is quite nice, and
I can also do other multi-file things that I didn't know how to do
previously.
I should note, however, that there's a bit of a catch 22 using this in
the situation for which I usually want it -- which is when I know the
name of a function but don't remember what arguments it takes. Check
Syntax fails and doesn't give me access to the definition if haven't
completed the expression (because I don't know the syntax) or if it is
otherwise badly malformed. I do see that it will still provide the
links if my error was just to provide the wrong number of arguments,
so that's useful.
Thanks,
-Lee
On Aug 10, 2009, at 11:23 PM, Robby Findler wrote:
> You probably want "#lang scheme" at the top of each file and "(provide
> f g h)" for exported functions and "(require "fn.ss")" to load files.
>> This setup is what works best for PLT Scheme, for a variety of
> reasons.
>> Robby
>> On Mon, Aug 10, 2009 at 9:50 PM, Lee Spector<lspector at hampshire.edu>
> wrote:
>>>> Thanks for the speedy and helpful responses.
>>>> F1, which I didn't know about previously, will help a lot. It
>> doesn't show
>> the arglist right in the programming environment, and it only helps
>> for
>> built-in definitions, but within these limits it provides pretty
>> quick
>> access to the arglist and documentation.
>>>> "cmd /" (yes, I'm on a mac) provides symbol completion -- not what
>> I had
>> asked about, but also handy.
>>>> Getting to definitions from Check Syntax -> control-click -> Jump to
>> Definition also seems to be useful, although I'm having a hard time
>> experimenting with it at the moment because I haven't yet fully
>> grokked PLT
>> namespaces, so my cross-file definitions aren't working as I
>> expect. ("#lang
>> scheme/load" makes file loading work in the way that I expect but
>> then Check
>> Syntax no longer provides the arrows/menus... I know I need to read
>> about
>> namespaces.) In any event I'll keep this in mind as I move forward.
>>>> Thanks again, and if anyone knows of a way to get more complete
>> arglist-on-space behavior (that is, in the programming environment
>> and for
>> all functions) I'd love to hear about it.
>>>> -Lee
>>>> PS Mike: glad to hear you've seen the GP stuff, some of which will
>> inevitably migrate to Scheme as I spend more time writing Scheme
>> code...
>>>>>> On Aug 10, 2009, at 8:50 PM, Robby Findler wrote:
>>>>> For the arguments, DrScheme doesn't really do that (altho, as
>>> always,
>>> patches are welcome), but th next best thing is to hit f1. That'll
>>> send you to the docs, searching for whatever is around the insertion
>>> point in the editor.
>>>>>> For the other, you have to run check syntax first and then you can
>>> jump directly to the definition of any function (no matter where
>>> it is
>>> defined-- check syntax re-uses the compiler to get its lexical
>>> information so you can be sure you're jumping precisely).
>>>>>> Robby
>>>>>> On Mon, Aug 10, 2009 at 6:19 PM, Lee Spector<lspector at hampshire.edu>
>>> wrote:
>>>>>>>> Is there any way to get "arglist-on-space" behavior in DrScheme
>>>> or any
>>>> editor working with PLT scheme? What I mean by this is that when
>>>> you type
>>>> the name of a function and then a space the argument list for the
>>>> function
>>>> appears in a mini-buffer (or anywhere -- I just want to see it).
>>>> I'd be
>>>> happy to have this functionality either in an editor (e.g. the
>>>> DrScheme
>>>> definitions pane) or listener (e.g. the DrScheme interactions
>>>> pane) or
>>>> both.
>>>>>>>> I am a DrScheme/PLT newbie, adopting it for a course I'm teaching
>>>> in the
>>>> fall, but I'm a long-time Common Lisper and this is one of things
>>>> I miss
>>>> most from my favorite CL environments. Next on my list would be a
>>>> way to
>>>> get
>>>> from a function name to the definition of the function with a
>>>> couple of
>>>> key
>>>> strokes, rather than searching in files. Both of these things
>>>> require the
>>>> runtime environment to keep information around that maybe PLT isn't
>>>> keeping
>>>> around... but I don't know.
>>>>>>>> Thanks,
>>>>>>>> -Lee
>>>>>>>> --
>>>> Lee Spector, Professor of Computer Science
>>>> School of Cognitive Science, Hampshire College
>>>> 893 West Street, Amherst, MA 01002-3359
>>>>lspector at hampshire.edu, http://hampshire.edu/lspector/>>>> Phone: 413-559-5352, Fax: 413-559-5438
>>>>>>>> Check out Genetic Programming and Evolvable Machines:
>>>>http://www.springer.com/10710 - http://gpemjournal.blogspot.com/>>>>>>>> _________________________________________________
>>>> For list-related administrative tasks:
>>>>http://list.cs.brown.edu/mailman/listinfo/plt-scheme>>>>>>>> --
>> Lee Spector, Professor of Computer Science
>> School of Cognitive Science, Hampshire College
>> 893 West Street, Amherst, MA 01002-3359
>>lspector at hampshire.edu, http://hampshire.edu/lspector/>> Phone: 413-559-5352, Fax: 413-559-5438
>>>> Check out Genetic Programming and Evolvable Machines:
>>http://www.springer.com/10710 - http://gpemjournal.blogspot.com/>>>>
--
Lee Spector, Professor of Computer Science
School of Cognitive Science, Hampshire College
893 West Street, Amherst, MA 01002-3359
lspector at hampshire.edu, http://hampshire.edu/lspector/
Phone: 413-559-5352, Fax: 413-559-5438
Check out Genetic Programming and Evolvable Machines:
http://www.springer.com/10710 - http://gpemjournal.blogspot.com/