![]() |
Catalogue of tmfs handlers | ![]() |
This page lists the handlers of the TeXmacs file system defined in the Scheme sources of TeXmacs, with the syntax of the names they accept, the operations they implement and the module where they are defined (relative to
src/TeXmacs/progs/
). In the syntax descriptions, file stands for a file name encoded with url->tmfs-string, such as file/home/joe/paper.tm or tm/doc/main/man-manual.en.tm (see the internals).
The operations are abbreviated as follows: load, save, title, permission, master, format, wrap and autosave, after the macros tmfs-load-handler, etc. When no permission handler is listed, the documents of the class are read-only.
A handler is only available once its module has been loaded. For the classes registered in
init-texmacs.scm
with lazy-tmfs-handler (automate, grep, help, apidoc, part, db, remote-file, history, revision, git, commit and blame) this happens automatically; the other modules are loaded at startup or as a side effect of using the corresponding features.
These handlers are defined in
kernel/texmacs/tm-file-system.scm
and are always available.
A trivial example: a generic document whose body is text. Operations: load.
Auxiliary buffers used by dialogs and side tools, whose contents and masters are stored in the tables aux-buffers and aux-masters. Operations: load, title (the name), master. See auxiliary buffers and the functions aux-name, aux-set-document, aux-set-master and open-auxiliary.
The file converted from format to TeXmacs with tree-import. Used by
texmacs/texmacs/tm-files.scm
when a file is imported from a format other than its natural one. Operations: load, title.
Help pages (
doc/tmdoc.scm
, registered lazily). The type selects how the file is presented:
normal: the file is loaded as is;
book: the file and the files it refers to in its traverse branches are expanded into a single book with the style given by the preference manual style (by default tmmanual);
any other type, such as article (used by load-help-article) or plain: the file is expanded in the same way, but into a single document with the tmdoc style.
Files with suffix html and tmml are converted; a missing file yields a Broken link. page. Operations: load, title (Help - followed by the title found in the document), permission (read only). When a translated page does not exist, the English page is shown instead. The help menus generate such URLs with tmdoc-expand-help; for instance the C++ startup code (
Texmacs/Texmacs/texmacs.cpp
) opens tmfs://help/plain/tm/doc/about/changes/changes-recent.en.tm to show the recent changes.
Automatically generated documentation of Scheme symbols and modules (
doc/apidoc.scm
, registered lazily). kind is symbol or module; an empty name lists all symbols or modules. Operations: load, title, permission (always granted). See apidoc-all-symbols and apidoc-all-modules.
Search results (
doc/docgrep.scm
, registered lazily). where is one of doc (documentation in the current language), texts (files in $TEXMACS_FILE_PATH), recent (recently opened files), Scheme, Styles, C++ or All code; any other value searches the English documentation. The query is built with list->query by docgrep-in-doc, docgrep-in-src, docgrep-in-texts and docgrep-in-recent. Operations: load, title.
An automated document (
utils/automate/auto-tmfs.scm
, registered lazily), built by build-document from file with the variable bindings var1=val1,var2=val2. The document is built in safe mode when file is itself a tmfs://help/… page (see auto-load-help). Operations: load, title.
The handlers history and revision are defined in
version/version-tmfs.scm
, git and commit in
version/version-git.scm
and blame in
version/git-blame.scm
. All of them are registered lazily in
init-texmacs.scm
.
The list of revisions of file, with links to the individual revisions. Opened by version-show-history, which also sets the master of the history buffer to the file. Operations: load, title.
The contents of file at revision rev, as returned by version-revision for the version control tool in use. The URL is built by version-revision-url; when rev contains a colon, the colon is replaced by a slash and no file is appended. The functions version-revision?, version-get-revision and version-head analyze such URLs. Operations: load, title, format (the format of file).
The description of a Git commit in the repository at root: message, parents and changed files. Built by tmfs-url-commit. Operations: load, title (Commit followed by the short hash and the name of the directory), format (texmacs).
A page about the repository at root, according to which: status (the output of git status), log or log.n (the history, starting after the first n commits, for the next pages), branches, graph (the graph of the commits) or output (the output of the last Git command). Built by tmfs-url-git. Operations: load, title.
The lines of file with the commit and the author which last changed them, opened by git-show-blame (Version\(\rightarrow\)Who changed what). Operations: load, title (the name of the file followed by - Blame), format (texmacs).
A part of a document split into several files (
part/part-tmfs.scm
, registered lazily). master is the main file and file an included file, encoded relatively to the master (here/…) or absolutely; the master alone is shown if file is omitted. The functions part-master and part-file decompose the name and part-url builds it. The included file is shown with the style, references and initial environment of the master, and saving writes the changes back into file. Operations: load, save, title, master and wrap (both return file).
A view on a database (
database/db-tmfs.scm
, registered lazily), for instance tmfs://db/bib/global for the global bibliographic database. Leading components containing an equal sign are parameters (search, order, direction, limit, present). Saving stores the modified entries back into the database. Operations: load, save, title, permission (read and write). See also the database API.
The entries of the local bibliography bib attached to the document file (
database/bib-local.scm
, loaded lazily through open-biblio). Built by biblio-url. Operations: load, save, title, permission (read and write).
The comments of the open buffer file, for the comments editor (
tools/comment/comment-widgets.scm
). Operations: load, title, permission (read only).
An image or pattern from the TeXmacs artwork collection (
utils/misc/artwork.scm
, loaded at startup). The file is downloaded from https://www.texmacs.org/artwork and cached in $TEXMACS_HOME_PATH/misc; if the download fails, a thumbnail from $TEXMACS_PATH/misc is used. Operations: load, format (from the suffix).
Email messages read with the external program mmail (
utils/email/email-tmfs.scm
, loaded at startup only if mmail is found in the path). The special names mailbox and inbox list the messages. Operations: load, title.
A report on the fonts used by the characters of file and on the characters which no font has (
fonts/font-debug.scm
, opened by open-font-report). Operations: load, master (file), title (the name of the file followed by - Font report), permission (read only).
The following handlers form the client side of the TeXmacs client/server infrastructure; see collaborative editing for the protocol and the server. In these URLs, server is the name of the server, possibly followed by :port, as registered by the client when logging in.
A file stored on a server (
client/client-tmfs.scm
, registered lazily). A component time=t right after the server name designates an older version. Loading is asynchronous: the handler sends remote-file-load to the server, returns an empty document, and fills the buffer when the answer arrives. If the client is not yet connected to the server, it first logs in, asking for credentials if they are not stored in the wallet. Operations: load, save (sends remote-file-save), title (the title is fetched asynchronously), permission (always granted), autosave (in the local backup directory).
A directory on a server, shown as a file browser (
client/client-tmfs.scm
; not registered lazily). The home directory of the current user is returned by remote-home-directory. Operations: load.
The list of chat rooms and the list of resources shared with the user (
client/client-chat.scm
). Operations: load, permission (read only, and only if the client is connected to server).
A chat room (
client/client-chat.scm
). Operations: load, title, permission (read only).
The list of live documents on the server (
client/client-live.scm
). Operations: load, permission (read only, when connected).
A live document, edited simultaneously by several users (
client/client-live.scm
). Operations: load, title, permission (read and write).
The modules
client/client-chat.scm
and
client/client-live.scm
are imported by
client/client-widgets.scm
, so that their handlers are available as soon as the remote tools are used. On the server,
server/server-tmfs.scm
does not define tmfs handlers, but the services (remote-file-load, remote-file-save, remote-dir-load, …) called by the client handlers; it analyzes the names with tmfs->list and the macro with-remote-context, which also interprets the time=t component.
Identifier of a view, built by the C++ function abstract_view.
Identifier of a window, built by the C++ function create_window_id.
These are not documents and have no handlers; see the internals page and the TeXmacs server.