From: Gubinelli Massimiliano <m.gubinelli@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guile-user@gnu.org
Subject: Re: Problem with modules in Guile 2.0
Date: Tue, 13 Mar 2012 02:10:51 +0100 [thread overview]
Message-ID: <657CFD3F-5D6D-41DD-930C-CE42EE4084B7@gmail.com> (raw)
In-Reply-To: <87ehsyrhyn.fsf@netris.org>
[-- Attachment #1: Type: text/plain, Size: 2864 bytes --]
Hi Mark,
I've update the svn repository and now the build process should recognize Guile 2.0. To build TeXmacs you will need the Qt framework, freetype and of course Guile. A standard
./configure --enable-qt
make
should suffice. You car run TeXmacs without installing by telling it where to find resources. Assuming you are
in the source directory, after the make the executable is to be found in TeXmacs/bin, so the followng is enough
TEXMACS_PATH=$PWD/TeXmacs TeXmacs/bin/texmacs.bin
Scheme scripts are in TeXmacs/progs.
The custom module macro is defined in kernel/boot/boot.scm
TeXmacs functions are defined via the tm-define macro defined in kernel/texmacs/tm-define.scm
An example of contextual overloading allowed by tm-define : (from kernel/math/math-edit.scm:44)
(tm-define (kbd-enter t shift?)
(:require (tree-is? t 'equation))
(go-end-of 'equation)
(insert-return))
here we redefine the function kdb-enter in the case the :require condition results #t. The new definition is simply added by the tm-define macro at the top of the previous with a conditional statement. I do not know if this can cause interferences with compilation.
General documentation about TeXmacs is written in the TeXmacs document format and you can find it in the TeXmacs help menu (Help->Scheme extensions). The documentation on the main web page (www.texmacs.org) does not contain the chapters about the scheme interface.
Maybe we should continue this discussion in private, without polluting the mailing list.
Massimiliano
On Mar 11, 2012, at 9:38 PM, Mark H Weaver wrote:
> Gubinelli Massimiliano <m.gubinelli@gmail.com> writes:
>>> Why not convert your scripts to use the standard Guile module syntax?
>>
>> TeXmacs is currently composed of 250 scheme files for \sim 60000 lines
>> of scheme.
>
> Fair enough. I see no obstacle to adapting the TeXmacs module system to
> work with Guile 2. It's just a matter of finding the cleanest way to
> implement it.
>
>> It has a slightly customized module system and features contextual
>> overloading of functions (a function can be redefined to act
>> differently is some condition is met without modifying the module
>> which implemented the base behaviour). We would like to preserve the
>> current system as much as possible.
>
> Can you provide some specific examples of this contextual overloading of
> functions, so that I might understand this feature more clearly?
> Pointers to relevant documentation would also be helpful.
>
>> With the current svn you will not be able to build TeXmacs with Guile
>> 2.0. If you are interested in that I will tell you how to do.
>
> Please do. I would like to try to build TeXmacs with Guile 2, so that I
> may better help you with the transition to Guile 2.
>
> Thanks,
> Mark
[-- Attachment #2: Type: text/html, Size: 4796 bytes --]
prev parent reply other threads:[~2012-03-13 1:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 21:48 Problem with modules in Guile 2.0 Gubinelli Massimiliano
2012-03-07 20:11 ` Mark H Weaver
2012-03-07 20:32 ` Andy Wingo
2012-03-07 22:52 ` Gubinelli Massimiliano
2012-03-08 2:01 ` Mark H Weaver
2012-03-09 0:03 ` Gubinelli Massimiliano
2012-03-09 16:29 ` Mark H Weaver
2012-03-10 0:33 ` Gubinelli Massimiliano
2012-03-11 20:38 ` Mark H Weaver
2012-03-13 1:10 ` Gubinelli Massimiliano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=657CFD3F-5D6D-41DD-930C-CE42EE4084B7@gmail.com \
--to=m.gubinelli@gmail.com \
--cc=guile-user@gnu.org \
--cc=mhw@netris.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).