RJED

Section: User Manuals (1)
Updated: 2002-07-21


 

Index

NAME
SYNOPSIS
DESCRIPTION
USAGE
WARNING
OPTIONS
ENVIRONMENT VARIABLES
FILES
ADDITIONAL INFORMATION
VERSION INFORMATION
AUTHOR
BUGS
COPYRIGHT
SEE ALSO

 

NAME

rjed - Remote JED Control

 

SYNOPSIS

rjed [ OPTION... ] [ JED_COMMAND... ] [ -j JED_OPTIONS ]

 

DESCRIPTION

rjed is a small, flexible and reliable jed(1) and xjed remote control (from now on, JED is used indifferently to refer us to jed(1) or xjed). rjed can be used to launch JED or to interact with several already running JED processes.

 

USAGE

The main purpose of rjed is to make JED able to accept and run commands from a command line, without running more than one JED process. This is very useful if you want to use JED as an external editor of some programs (e.g, it has been successfully used as an external editor of source-navigator, an excellent development environment). All you'll have to do is to configure your program to make it use rjed (see your program documentation to learn how to do it).

Moreover, rjed has a unique feature that lets you associate a tagname to a JED process. Subsequent calls to rjed with the same tagname will interact only with that (and only that) JED process, so different JED scenarios won't interfere with each other.

On startup, rjed will try to communicate with the JED process associated to the tagname used. If rjed cannot find that process, a new one will be started. Otherwise, rjed will try to interact with the process found.

In the first case, JED_OPTIONS are passed to (and are only used by) JED. By default, rjed will launch jed(1). You can force rjed to start xjed by using the -x option (see below). Once JED has been started using its own JED_OPTIONS, rjed will start to pass all commands specified with the -c option to that JED process.

In the second case, the JED process associated with the tagname used is found, rjed will proceed to send all commands specified with the -c option to the process found.

Once all commands have been successfully sent to a JED process, rjed will exit returning 0. If a command returns an error, rjed will return its value and will print a message on stderr (see also -c option below).

rjed won't interact with JED processes that have been started as usual, that is, with those processes started using jed(1) or xjed.

 

WARNING

Not all versions of JED can be used with rjed, only those versions that have been previously patched, recompiled and installed according with the rjed Installation Instructions.

 

OPTIONS

The following options are supported:

-i
--ignore-errors
By default, if you specify several commands with the -c option and one of them returns an error, the rest of commands are ignored. This flags changes this behavior. Use it carefully.

-n
--just-print
Don't actually run any commands, just print them. Useful for debugging purposes.

-t tagname
--tag=tagname
Assigns a tagname to a specific JED process. Subsequent calls to rjed with the same tagname will operate on the same JED process. Without this option, the tag default is used, i.e.

   rjed

and

   rjed -t default

commands will both interact with the same JED process.

Tags can be up to 64 characters long and can contain only letters (lowercase and uppercase), digits, '-', '_' or '.'. The name of the default tag can be changed with the environment variable RJED_TAG (see below).

-x
--xjed
Attempts to use xjed. This option is only taken into account if there is no any JED process associated with the tagname used (see also -t tagname option).

This option has no meaning (and will be ignored) if there is a JED process associated with the tagname used.

If xjed cannot be started, rjed will try to use JED.

-v
--verbose
Explain what is beign done.

-w
--debug
Print debug information.

-?
--help
Output a brief help message.

-V
--version
Print program version.

Several JED_COMMANDS can be passed on a single rjed invocation, and they will be executed by JED in the same order they appear. If a command returns an error, the rest of the commands are ignored, unless you specify the -i option.

The following JED_COMMANDS are supported:

-c filename
--close=filename
Closes the file filename. Returns an error if there is no buffer associated to filename.

-e slang
--eval=slang
Evaluates slang code, as if it were entered using the internal function "evaluate_cmd" of JED. Returns an error if the evaluated code returns an error.

-g { line | line,column }
--goto={ line | line,column }
Moves the cursor to the specified position in the current buffer. line and column must be positive integers.

If line is greater than the number of lines in the current buffer, the cursor will be placed at the end of the buffer.

If column is greater than the number of columns in the line line, the cursor will be placed at the end of the line.

Returns no error.

-o filename
--open=filename
Attemps to open the given filename.

If filename exists and it can be opened, its associated buffer will become the current buffer of JED.

If filname exists but can't be opened, an error will be returned.

If filename doen't exists, a new buffer will be created and its buffer will become the current one.

If filename is already opened, its buffer will become the current one.

-s [ filename ]
--save [ =filename ]
Saves the buffer associated to filename. Returns an error if there is no such buffer.

Without options, all buffers are saved and no error is returned.

Additionally, you can specify several JED options:

-j JED_OPTIONS
--jed JED_OPTIONS

JED_OPTIONS are jed(1) or xjed specific options. They are used only in the case that rjed starts a new JED process. Otherwise, rjed will interact with an already running JED process, so these options are simply ignored.

Be sure to include appropiate options for jed(1) or xjed. Remember that rjed will launch jed(1) or xjed depending on command line options and evironment variables.

Its syntax, usage and interpretation depends exclusively of JED. See also jed(1) and the local documentation of JED.

WARNING: be sure that '-j JED_OPTIONS' is the last argument. All strings after -j will be taken as a JED_OPTION.

 

ENVIRONMENT VARIABLES

RJED_JED
If RJED_JED is set, rjed will use it as the name of the program to be launched instead of jed(1). Its value should be an absolute path + filename.

If the specified program cannot be found or RJED_JED is not set, rjed will launch the jed(1) program found in your PATH.

This variable can be useful if, for some reason, you have several versions of JED installed on your system.

RJED_XJED
The same as RJED_JED, but for xjed.

RJED_RTFILE
If RJED_RTFILE is set, its value is used as the name of the file in which to store run-time information.

Change it carefully, before issuing any rjed command or in your startup shell files, or you won't be able to interact with already running JED processes.

RJED_TAG
If RJED_TAG is set, rjed uses it as the value of the default tagname (see also -t tagname option).

If it contains an invalid tagname, it is simply ignored.

 

FILES

$HOME/.rjedrt
Run-time information. Can be changed using the environment variable RJED_RTFILE (see above).

Don't put this file on a temporary disk space.

Don't edit this file unless you know what you are doing.

 

ADDITIONAL INFORMATION

Some of these references seem to be unmantained or under heavy development.

rjed home page

http://rjed.sf.net

JED home page
"JED is a freely available text editor for Unix, VMS, MSDOS, OS/2, BeOS, QNX, and win9X/NT platforms":

http://www.jedsoft.org/jed

S-Lang home page
"S-Lang is a multi-platform programmer's library designed to allow a developer to create robust multi-platform software. It provides facilities required by interactive applications such as display/screen management, keyboard input, keymaps, and so on":

http://www.s-lang.org

Jed Modes Repository
"This sourceforge project is used to share, maintain, release and document SLang programs (or modes) for JED, a powerful text editor written by John E. Davis":

http://jedmodes.sf.net

jedcolors
"JED color scheme repository and tools for creating such schemes":

http://sourceforge.net/projects/jedcolors

jed-rpms
"JED is an extremely powerful little editor that's written and maintained by John E. Davis. This sourceforge project is used to create cutting edge JED rpms as new upstream versions are released by John":

http://sourceforge.net/projects/jed-rpms

jedState
"The jedstate program is some sort of extended mind for John E. Davis' splendid text editor jed. Using jedstate, jed "remembers" the cursor position for all visited files and will automagically jump to that position again when the files are revisited":

http://sourceforge.net/projects/jedstate

 

VERSION INFORMATION

This man page documents rjed version 0.8.5.

 

AUTHOR

Francesc Rocher <f.rocher@computer.org>

Feel free to send comments, report bugs, make suggestions or send improvements to the author.

 

BUGS

Email bugs to Francesc Rocher <rocher@users.sf.net>.

jed(1) crashes frequently when used with several JED commands.

 

COPYRIGHT

Copyright © 2002 Francesc Rocher.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

SEE ALSO

jed(1), xjed.


This document was created by man2html, using the manual pages.
Time: 20:43:43 GMT, July 29, 2002