mailing-list for TeXmacs Users

Text archives Help


questions from an envious user


Chronological Thread 
  • From: "Michael Lachmann" <address@hidden>
  • To: address@hidden
  • Subject: questions from an envious user
  • Date: Tue, 4 Mar 2008 21:00:48 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=nYslYkN3BBwgYEVLvxMyFgZhmNfAxcYja2hg5fy6miAsxXiMQPsuJIHmNe5dD0kM6L6RB3s1WCHRIBKi2Xb/ufHt1y/UewfmNvGL+D0s0GpAwNilPfKqxEL2uVXy5ro2SyThMWqfkaNvpdI19dvTG9fyXvwllogy+krXw5tIYKs=

Today someone showed me the R interface in textmate, an editor for OS X.

It seems textmate is quite a nice editor - maybe TeXmacs could copy
some of its features...
Of course the main aim of these two programs are very different. But
that doesn't mean that we can't learn from them...

The first observation was that it seems that interfacing from textmate
to external programs is easier in textmate than it is in TeXmacs. But
this I inferred only from the fact that there are so many interfaces
written for texmate and that my demonstrator commented that it is very
easy to interface with textmate.
It could be (I actually think that is true) that interfacing in
TeXmacs is just as easy, it just isn't made clear how easy it is. Thus
I think it is trivial in textmate to say "send this text to this and
this command, get the reply back, and interpret it as html (or just
insert it as text)". I think TeXmacs is perfectly capable of doing
something like this, but it just isn't made clear exactly how easy it
is, or how to do it.

Anyway, for the R interface to TeXmacs, the following features would help:

First is syntax highlighting. It seems that to add syntax highlighting
to textmate, you just need to define a couple of regular expressions,
that say what a certain expression is (i.e. comment, function, string,
etc.)

Second, paren matching. Is it hard to implement paren-matching in TeXmacs?

Third is pop-ups. Is it possible to popup a menu to get a user response?
The way it was used in textmate was that you type an R function. Then
you press a key (something like tab completion), and the interface
pops up a menu of the possible arguments to the function. R has a
function called "args". Calling this function on another function
gives you the possible arguments, like so:
> args(matrix)
function (data = NA, nrow = 1, ncol = 1, byrow = FALSE, dimnames = NULL)
This can then be used to show a popup menu that lets you chose one of
these arguments (i.e. data,nrow, ncol, etc.)
Is something like this possible in TeXmacs? Can I ask teXmacs to open
a popup menu?

Finally, I just have an almost unrelated bug/comment. I actually wrote
a tab-completion module for the R interface in TeXmacs. It works
sometimes, but sometimes has problems.
My main problem is, however, that whenever there is some bug in the
tab-completion, TeXmacs gets stuck. In that case you can not click on
"stop", or "interrupt" among the icons in TeXmacs. It seeems TeXmacs
is waiting for a reply from the program, the program probably sent
something wrong, and now nothing will ever come back. Is it possible
to make the tab-completion interface more interruptable? This way it
will be more forgiving to errors.

thanks!



Archive powered by MHonArc 2.6.19.

Top of page