GNU TeXmacsUser manualReferenceAboutEnglish·Français·Deutsch·Español·Italiano·Português
Creating sessions

A session can be started from the Insert\(\rightarrow\)Session menu. Since TeXmacs is based on the Scheme language, it is always possible to start a Scheme session using Insert\(\rightarrow\)Session\(\rightarrow\)Scheme. On Unix systems, it is usually also possible to start Bash shell sessions using Insert\(\rightarrow\)Session\(\rightarrow\)Shell. The remainder of the items in the Insert\(\rightarrow\)Session menu depend on the plug-ins which are installed on your system. Insert\(\rightarrow\)Session\(\rightarrow\)AI starts conversations with chatbots (ChatGPT, Claude, Gemini…), which are described in Artificial intelligence tools inside TeXmacs.

Insert\(\rightarrow\)Session\(\rightarrow\)Preferences sets the options of the plug-ins (such as the keys and the models of the chatbots), and Insert\(\rightarrow\)Session\(\rightarrow\)Redetect looks again for the plug-ins which are installed, for instance after installing a program.

A session consists of a sequence of input and output fields and possible text between them. When pressing ↩ inside an input field of a session, the text inside the environment is evaluated and the result is displayed in an output field.

When entering a command in a session, the application attempts to execute it. Several commands may be launched concurrently in the same document, but the output will only be active in the session where the cursor is and at the place of the cursor. Therefore, we recommend to use different buffers for parallel executions.

For each type of extern application, one may choose between sharing a single process by different sessions, or launching a separate process for each different session. More precisely, when inserting a session using Insert\(\rightarrow\)Session\(\rightarrow\)Other, you may specify both a “session type” (Shell, Pari, Maxima, etc.) and a “session name” (the default name is “default”). Sessions with different names correspond to different processes and sessions with the same name share a common process.

In order to finish the process which underlies a given session, you may use Session\(\rightarrow\)Close session. When pressing ↩ in the input of a non-connected system, the system will be restarted automatically. You may also use Session\(\rightarrow\)Interrupt execution in order to interrupt the execution of a command. However, several applications do not support this feature.

In order to evaluate all fields of e.g. a previously created session, you may use Session\(\rightarrow\)Evaluate\(\rightarrow\)Evaluate all. Similarly, Session\(\rightarrow\)Evaluate\(\rightarrow\)Evaluate above and Session\(\rightarrow\)Evaluate\(\rightarrow\)Evaluate below allow you to evaluate all field above or below the current field.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".