Re: Scheme interface for the graphical mode

Massimiliano Gubinelli <[email protected]>
Newsgroups gmane.editors.texmacs.devel
Message-ID <[email protected]>
Giovanni,
 You can always force a module to load, by something like

(load-module '(name of module))

or something similar, now I do not remember. Look around in the scheme code, it is used once in a while.

Apriori also tm-define-macro macros should be visible. But again, I'm not sure right now. It could be that for some strange reason texmacs macros are not available at the REPL.

HTH,
Max


> On 25. Nov 2020, at 00:39, Giovanni Piredda <[email protected]> wrote:
> 
> Hi Max,
> 
> thanks for the answer. I will continue the post with the code I wrote, which is simple and does what I want although it may make graphical lists redundant and difficult to read.
> 
> For the visibility: does tm-define-macro also define globally-visible macros? As I find that using define-graphics, which is defined in progs/graphics/graphics-markup.scm with tm-define-macro, gives Unbound variable: define-graphics.
> 
> Or maybe it is the whole of graphics-markup.scm which is never loaded by TeXmacs?
> 
> At any rate the answer is that one should not yet use the built-in Scheme functions for graphics manipulation (which look like a good system of functions to me), so for the post I will use the few functions I wrote and say that in TeXmacs a comprehensive set of functions has been sketched and partly implemented and documented but it is not yet ready.
> 
> G.
> 
> On 25.11.20 00:02, Massimiliano Gubinelli wrote:
>> Dear Giovanni,
>>  procedures declared with tm-define are visible globally, while procedures declared with define are only visible within the module. I think this answers your question.
>> 
>> Of course in the future it is possible to imagine to enhance the module with additional procedures, useful for graphic programming, but for the moment I think would be better to experiment with code external to the main code-base.
>> 
>> 
>> Max
>> 
>> 
>> 
>>> On 24. Nov 2020, at 23:47, Giovanni Piredda <[email protected]> wrote:
>>> 
>>> Dear all,
>>> 
>>> I am writing a small blog post for modular graphics and I realized that two out of the three functions that I wrote for that already exist in TeXmacs (and maybe the third too ... but I do not know).
>>> 
>>> To orient myself better: what is the status of the functions in progs/graphics/? Is one expected to be able to use them from Scheme?
>>> 
>>> I tested a few in a Scheme session. Some work ((stree->tree '(rectangle (point 0 0) (point 1 1))) draws a square), some don't (example: Unbound variable: enhanced-tree-property-set!), some work differently from how I expect them to.
>>> 
>>> Example for the last case: (enhanced-tree->radical '(with "color" "red" (gr-group (point 1 0) (point 1 1)))) outputs (with "color" "red" (gr-group (point 1 0) (point 1 1)))
>>> 
>>> A short explanation of the status would help me to rewrite what I have already written (or to put it in the context of what already exists).
>>> 
>>> As far as I can see, the whole documentation for these functions is in Help→Scheme extensions→Scheme interface for the graphical mode.
>>> 
>>> Looking forward to some info.
>>> 
>>> Giovanni
>>> 
>>> 
>>> _______________________________________________
>>> Texmacs-dev mailing list
>>> [email protected]
>>> https://lists.gnu.org/mailman/listinfo/texmacs-dev
>> 
>> _______________________________________________
>> Texmacs-dev mailing list
>> [email protected]
>> https://lists.gnu.org/mailman/listinfo/texmacs-dev
> 
> _______________________________________________
> Texmacs-dev mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/texmacs-dev


_______________________________________________
Texmacs-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/texmacs-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.