IBM
Contents Index Previous Next



Emacs Commands


This section lists and describes the Emacs commands and key bindings associated with the integration with SDL Suite and TTCN Suite. Both new commands and the affected ordinary (existing) commands are described.

Text Document Handling

New Commands

Connect

M-x sdtemacs-connect connects to SDL Suite and TTCN Suite. Automatic connection can be performed when starting Emacs by providing the UNIX command switch post (emacs -post). This is done when SDL Suite and TTCN Suite starts Emacs.

Disconnect

M-x sdtemacs-disconnect disconnects from SDL Suite and TTCN Suite. All buffers taking part in the interaction will be unloaded after asking about saving modified buffers. Exiting Emacs will disconnect from SDL Suite and TTCN Suite.

Show Organizer

M-x sdtemacs-show-organizer opens or raises the Organizer Main window.

Show SDT Reference

M-x sdtemacs-show-reference shows an SDT reference in an appropriate editor. This requires that the reference text is selected or that the point is placed inside it.

Affected Ordinary Commands

Exit Emacs (C-x C-c)

Disconnects from SDL Suite and TTCN Suite before exiting.

New File (C-x b <new buffer>, C-x C-f <new file>)

The new buffer is notified to SDL Suite and TTCN Suite and takes part in the interaction with SDL Suite and TTCN Suite.

Open File (C-x C-f <filename>)

The loaded buffer is notified to SDL Suite and TTCN Suite and takes part in the interaction with SDL Suite and TTCN Suite.

Save (C-x C-s) and Save As (C-x C-w <filename>)

The buffer is notified as saved to SDL Suite and TTCN Suite.

Close File (C-x k)

The buffer is notified as unloaded to SDL Suite and TTCN Suite.

First Modification of Buffer Text

The buffer is notified as modified to SDL Suite and TTCN Suite.

Link Handling

The minor mode SDTlinks, which implements the link handling commands, requires that Emacs is connected to SDL Suite and TTCN Suite, and will try to connect when switched on if this is not the case. All buffers loaded when connected will automatically have this mode active.

New Commands

SDT Links Mode

M-x sdtlinks-mode toggles the minor mode SDTlinks. This is useful if performing editing operations that cannot be done without unintentionally deleting endpoints, e.g. moving (Cut and Paste) a region of text containing endpoints.

Caution!

When SDTlinks is inactive:

Do not alter any text representing endpoints (described in Link Handling).

Do not duplicate text containing endpoints since this will yield unpredictable results as each endpoint is uniquely identified in a file.

Create Endpoint

M-x sdtlinks-create-endpoint (C-c C-c) creates a new endpoint that will be marked with a special type face in the text (see Type Faces for Endpoints) and notified to SDL Suite and TTCN Suite. This command requires that the region of text to convert to an endpoint is selected, i.e. both mark and point must be set. Endpoints are not allowed to overlap and must consist of at least one character.

Delete Endpoint

M-x sdtlinks-delete-endpoint (C-c C-d) deletes an endpoint. The endpoint text will be converted to plain text and the deletion will be notified to SDL Suite and TTCN Suite. All links associated with the endpoint will be cleared. This command requires that point is placed inside the endpoint text.

Follow Link

M-x sdtlinks-follow-link (C-c C-f) follows one of the links associated with the selected endpoint. This results in displaying the endpoint on the other end of the link in an appropriate editor. If only one link is associated with the endpoint, this link is followed. Otherwise, a choice between the associated links is offered in a popup menu:

Figure 127 Choose link to follow

Each menu item, representing a link, is of the format:

<Link name>(<Direction>), <Other endpoint>(<Type>), <File>

where:

<Link name> 	 	 = The name of the link
<Direction> = The direction of the link: `in' or `out'
<Other endpoint> = The name of the other endpoint of the link
<Type> = The type of the other endpoint of the link
<File> = The name of the file (including the path)
	 	   in which the other endpoint resides

This command requires that point is placed inside the text of an endpoint marked as having associated links, see Type Faces for Endpoints.

Show Endpoint in Link Manager

M-x sdtlinks-show-endpoint-in-link-manager (C-c C-s) opens the Link Manager and shows the selected endpoint. This requires that point is placed inside the endpoint text.

Affected Ordinary Commands

Modification of Endpoint Text

The endpoint is notified as modified to SDL Suite and TTCN Suite. When point is placed directly after the endpoint text, added characters will become part of the endpoint text.

Cut/Clear (C-w, C-k, M-k and many more)

For all endpoints within the region, Delete Endpoint (see Delete Endpoint) is executed.

Copy Region (M-w)

Endpoints in the copy of the region is represented as plain text.

Insert File (C-x i <filename>)

For all endpoints in the inserted file, Create Endpoint (see Create Endpoint) is executed. Associated links are not handled.

If point is within an endpoint and the file to insert have endpoints, the operation will fail since overlapping endpoints are not allowed.

Undo (C-x u, C--_)

No undo information is recorded for the link handling commands. Consequently, these commands cannot be undone.

Command Summary

Command Description

M-x sdtemacs-connect

Connect

M-x sdtemacs-disconnect

Disconnect

M-x sdtemacs-show-organizer

Show Organizer

M-x sdtemacs-show-reference

Show SDT Reference

M-x sdtlinks-mode

SDT Links Mode

M-x sdtlinks-create-endpoint (C-c C-c)

Create Endpoint

M-x sdtlinks-delete-endpoint (C-c C-d)

Delete Endpoint

M-x sdtlinks-follow-link
(C-c C-f)

Follow Link

M-x sdtlinks-show-endpoint-in-link-manager (C-c C-s)

Show Endpoint in Link Manager


http://www.ibm.com/rational
Contents Index Previous Next