Sometimes while investigating TeXmacs Scheme code, I want to temporarily alter or test functions and variables in modules that have not been globally defined (via define
, not tm-define
).
For example, the file TeXmacs/progs/kernel/logic/logic-rules.scm
contains a hash table logic-rules-table
, which is local to the module. If you do logic-rules-table
in a Scheme session, you will get unbound variable logic-rules-table
.
However, you can do the following:
(with-module (resolve-module '(kernel logic logic-rules)) logic-rules-table)
This will execute your command in the desired module.
Hope this may be useful to some. Let me know your tips for Scheme coding!