$Id: scwm-faq,v 1.6 1999/11/23 20:41:42 gjb Exp $ Scwm Frequently Asked Questions ------------------------------- Last Updated 12-Nov-1999 * How can I find out more about Scwm? Web Page: http://scwm.mit.edu/ Mailing list: scwm-discuss-request@mit.edu, body (not subject) of "subscribe" scwm-discuss@mit.edu to post to the list Mailing list Archived at: http://scwm.mit.edu/scwm-discuss.1998/ http://scwm.mit.edu/scwm-discuss.1999/ Documentation: http://www.cs.washington.edu/homes/gjb/scwm-doc/ Q: How do you pronounce Scwm? A: Some spell it out: "Ess See Double-you Emm", others pronounce it as an acronym "squim" or "skwim" rhyming with "whim" starting with the "squ" as in "squat". Q: How can I convert by .fvwm2rc to a .scwmrc? A: Unfortunately, right now there are no automatic tools for doing the conversion (we'd love to see someone contribute such a thing). A more complete answer is that you probably do not want to directly convert your .fvwm2rc to a .scwmrc because Scwm permits so much greater abstraction and programmability that a simple conversion is likely to not be a very good .scwmrc. We recommend that you take one of the existing .scwmrc files from the sample.scwmrc/ directory, and modify it to suit your needs. We are working for easier-to-use GUI configuration tools, but they are not yet in place. Q: What's the difference between: (menuitem "A&bout Scwm" #:image-left "mini-exclam.xpm" #:action (thunk scwm-about-message)) and (menuitem "A&bout Scwm" #:image-left "mini-exclam.xpm" #:action scwm-about-message) A: To understand this, you need to understand what the `thunk' macro does: (defmacro-public thunk (proc) `(lambda args (apply ,proc args))) This means that: (thunk scwm-about-message) expands into an #:action of (lambda args (apply scwm-about-message args)) The second menuitem you mention above has an action of just `scwm-about-message'. The big difference between these two ways of specifying an action procedure is which scwm-about-message procedure is invoked when the menuitem is selected. In the first case (with the thunk), each time the menuitem is clicked the currently visible binding for the symbol `scwm-about-message' will be invoked. In the second case, whatever binding `scwm-about-message' has when the menuitem is created will be used. Often (and in normal use, really), the two possibilities above coincide. There are two primary cases where they differ: 1) in the second case (w/o the thunk), the symbol scwm-about-message *must* be bound when the menuitem object is created. That is, the definition of scwm-about-message must precede the creation of the menuitem. In the first case w/ the thunk, the lambda that the thunk expands into avoids this dependency since the symbol evaluation is deferred until execution of the menuitem's action; so with the thunk, the procedure definition can come after the menuitem definition. 2) If scwm-about-message is rebound (e.g., you change it's definition, or edit the module in which it is defined and re-load the module), then the first version (using thunk) always gets the current binding (for better or worse), while the second version always executes the same old procedure (though any of the procedures called by that procedure are looked up freshly; note that the lambda generated by the thunk macro just adds a level of indirection so the top level procedure is one of those called procedures). Q: What's the difference between `define' and `define-public' A: The only time it matters is when you consider the Guile module system. A define-public makes a definition that's part of the interface of a module, whereas a define makes a definition that's local. In your startup files it makes little difference, but once you start writing modules, you need to be sure to use define-public or define*-public when you want other modules to have access to that procedure's functionality. Q: Where can I learn more about Scheme? A: See Greg's Scheme lecture notes at: http://www.cs.washington.edu/education/courses/341/99su/lectures/scheme/ Q: How do I change the SCWM_LOAD_PATH after Scwm has been started, say in my .scwmrc startup file? A: The SCWM_LOAD_PATH environment variable is only used at startup time to initialize the %load-path Guile variable. You should edit this directly using, e.g., (set! %load-path (cons (string-append (getenv "HOME") "/.scwm/modules") %load-path)) or (append! %load-path (list (string-append (getenv "HOME") "/.scwm/modules")))