mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] questions about sessions


Chronological Thread 
  • From: Joris van der Hoeven <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] questions about sessions
  • Date: Tue, 17 Jul 2012 22:26:14 +0200

On Tue, Jul 17, 2012 at 04:07:57PM +0800, Michael Lachmann wrote:
> 1. I'd like to be able to have configurable options for the session.

You might want to use the 'define-preferences' scheme macro.

> (For example, what counts as a prompt....).
> I could store this in an external file, and read it in, or it could be
> handled by TeXmacs (or by R, or all of the above...). So, my question
> is:
> How do I send input to the session right after it loaded?
> The :launch attribute gives a shell command to execute.
> The :initialize attribute is used before the session starts, I think.
> So, how can I send something right after the session starts?

I am afraid that nothing has really been implemented for that.
But you can use the first input to send something to the system.
Alternatively, you can use different boot commands for
different types of sessions.

> 2. A related question is what is the best way to send a command to my
> interface. TeXmacs defines the COMMAND code,
> \020, which is used with tab completion. What is the best way to send
> my own command with that code?

You can send it in whatever form you like,
as long as your plug-in accepts it on input.

> 3. I really like working with several R sessions at once. For example,
> they can be on different machines, or when
> I want different data to be loaded in different sessions. I added a
> flag to my program that specifies the session name, which is then
> added
> to the prompt, like this, for example
> [1] >
> If the session name is "1".
>
> Currently I start different sessions with make-session, like this:
> (kbd-map ("R 3 ."
> (make-session "r" "default3")))
>
>
> (kbd-map ("R 2 ."
> (make-session "r" "default2")))
>
> Can the 2nd argument to make-session reach the :launcher, so that it
> can be added to the command argument?
> Or, maybe there's a much better way to achieve the same?

The 'plugin-configure' macro is 'unquotable';
see what the Maxima plug-in does in order to launch Maxima
with different boot options.

> 4. Is there any way to ask TeXmacs how many characters fit into the
> current page with the current font? I'm using
> a fixed size font in R, and I'd like to tell R what the page width is...

You cannot really do that, I am afraid. Anyway, the user might dynamically
stage this kind of settings. It is actually a bad thing if R does
text formatting; if possible, a more structured format should be used.

Best wishes, --Joris



Archive powered by MHonArc 2.6.19.

Top of page