UNIXworkcode

1 # $Id: xnc.pod,v 1.7 2005/03/03 14:49:37 edg Exp $ 2 =pod 3 4 =head1 NAME 5 6 xnc - Client program for XNEdit text editor 7 8 =head1 SYNOPSYS 9 10 xnc [B<-read>] [B<-create>] [B<-line> I<n> | B<+>I<n>] [B<-do> I<command>] 11 [B<-ask>] [B<-noask>] [B<-svrname> I<name>] [B<-svrcmd> I<command>] 12 [B<-lm> I<languagemode>] 13 [B<-geometry> I<geometry> | B<-g> I<geometry>] [B<-icon> | B<-iconic>] 14 [B<-display> I<[host]:server[.screen]>] 15 [B<-timeout> I<seconds>] [B<-wait>] [B<-xrm> I<resourcestring>] 16 [B<-tabbed>] [B<-untabbed>] [B<-group>] 17 [B<-V> | B<-version>] [B<-h> | B<-help>] [B<-->] [file...] 18 19 =head1 DESCRIPTION 20 21 B<xnc> is the client interface to the XNEdit text editor. A server can be started 22 explicitly by running XNEdit in server mode: 23 24 xnedit -server 25 26 If no server is running, B<xnc> will start one unless configured otherwise. 27 Client/server mode is useful for integrating XNEdit with software development 28 environments, mailers, and other programs; or just as a quick way to open files 29 from the shell command line without starting a new XNEdit session. 30 31 =head1 OPTIONS 32 33 =over 34 35 =item B<-read> 36 37 Open the file read-only regardless of the actual file protection. 38 39 =item B<-create> 40 41 Don't warn about file creation when a file doesn't exist. 42 43 =item B<-line> I<n>, B<+>I<n> 44 45 Go to line number I<n>. 46 47 =item B<-do> I<command> 48 49 Execute an XNEdit macro or action on the file following the -do argument on the 50 command line. 51 52 If you use this command without a filename, B<xnc> would randomly choose one 53 window to focus and execute the macro in. 54 55 =item B<-ask>, B<-noask> 56 57 Instructs B<xnc> whether to automatically start a server if one is not 58 available. This overrides the X resource `nc.autoStart'. 59 60 61 =item B<-svrname> I<name> 62 63 Explicitly instructs B<xnc> which server to connect to, an instance of 64 L<xnedit(1)> with a corresponding B<-svrname> argument. By naming servers, you 65 can run several simultaneously, and direct files and commands specifically to 66 any one. 67 68 =item B<-svrcmd> I<command> 69 70 The command which B<xnc> uses to start an XNEdit server. It is also settable via 71 the X resource `nc.serverCommand', by default, I<"xnedit -server">. 72 73 =item B<-lm> I<languagemode> 74 75 Initial language mode used for editing succeeding files. 76 77 =item B<-geometry> I<geometry>, B<-g> I<geometry> 78 79 The initial size and/or location of editor windows. The argument geometry has 80 the form: 81 82 [<width>x<height>][+|-][<xoffset>[+|-]<yoffset>] 83 84 where `<width>' and `<height>' are the desired width and 85 height of the window, and `<xoffset>' and `<yoffset>' are the 86 distance from the edge of the screen to the window, + for top or left, - for 87 bottom or right. B<-geometry> can be specified for individual files on the 88 command line. 89 90 =item B<-icon>, B<-iconic> 91 92 Initial window state for succeeding files. 93 94 =item B<-display> I<[host]:server[.screen]> 95 96 The name of the X server to use. host specifies the machine, server specifies 97 the display server number, and screen specifies the screen number. host or 98 screen can be omitted and default to the local machine, and screen 0. 99 100 =item B<-timeout> I<seconds> 101 102 Basic time-out period (in seconds) used in communication with an XNEdit server. 103 Default: 10 seconds. Also settable via the X resource `nc.timeOut'. 104 105 Under rare conditions (such as a slow connection), it may be necessary to 106 increase the time-out period. In most cases, the default is fine. 107 108 =item B<-wait> 109 110 Instructs B<nc> not to return to the shell until all files given 111 are closed. 112 113 Normally, B<xnc> returns once the files given in its command line 114 are opened by the server. When this option is given, xnc returns 115 only after the last file given in this call is closed. 116 Note that this option affects all files, not only the ones 117 following this option in the command line. 118 119 120 =item B<-xrm> I<resourcestring> 121 122 Set the value of an X resource to override a default value. 123 124 =item B<-tabbed> 125 126 Open all subsequent files in new tabs. Resets B<-group> option. 127 128 =item B<-untabbed> 129 130 Open all subsequent files in new windows. Resets B<-group> option. 131 132 =item B<-group> 133 134 Open all subsequent files as tabs in a new window. 135 136 137 =item B<-V>, B<-version> 138 139 Prints version and build information, to be mentioned when reporting bugs and 140 problems. 141 142 =item B<-h>, B<-help> 143 144 Prints the command line help and then exits. 145 146 =item B<--> 147 148 Treats all subsequent arguments as file names, even if they start with a dash. 149 This is so XNEdit can access files that begin with the dash character. 150 151 152 =back 153 154 =head1 ENVIRONMENT 155 156 =over 157 158 =item DISPLAY 159 160 XNEdit requires an X-based workstation or X-Terminal. If you have used B<telnet> 161 or B<rlogin> to access the host Unix system, set the Unix environment variable 162 for your display: 163 164 % setenv DISPLAY devicename:0 165 166 =back 167 168 =head1 NOTES 169 170 Communication between L<xnc(1)> and L<xnedit(1)> is through the X display. So as 171 long as X windows is set up and working properly, B<xnc> will work properly 172 as well. B<xnc> uses the `DISPLAY' environment variable, the machine name and 173 your user name to find the appropriate server, meaning, if you have several 174 machines sharing a common file system, B<xnc> will not be able to find a server 175 that is running on a machine with a different host name, even though it may be 176 perfectly appropriate for editing a given file. 177 178 In typical Unix style, arguments affect the files which follow them on the 179 command line, for example: 180 181 =over 182 183 =item incorrect: 184 185 xnc file.c -line 25 186 187 =item correct: 188 189 xnc -line 25 file.c 190 191 =back 192 193 For more information see XNEdit's online help, or I<xnedit.txt> in the NEdit 194 distribution kit. 195 196 =head1 SEE ALSO 197 198 xnedit(1), X(1), mwm(1), ctags(1), etags(1) 199 200 =head1 AUTHORS 201 202 XNEdit was written by Olaf Winterman, Mark Edel, Joy Kyriakopulos, Christopher 203 Conrad, Jim Clark, Arnulfo Zepeda-Navratil, Suresh Ravoor, Tony Balinski, Max 204 Vohlken, Yunliang Yu, Donna Reid, Arne Forlie, Eddy De Greef, Steve LoBasso, 205 Alexander Mai, Scott Tringali, Thorsten Haude, Steve Haehn, Andrew Hood, 206 Nathaniel Gray and TK Soh. 207 208 =head1 COPYRIGHT 209 210 This program is free software; you can redistribute it and/or modify it under 211 the terms of the GNU General Public License as published by the Free Software 212 Foundation; either version 2 of the License, or (at your option) any later 213 version. 214 215 In addition, as a special exception to the GNU GPL, the copyright holders give 216 permission to link the code of this program with the Motif and Open Motif 217 libraries (or with modified versions of these that use the same license), and 218 distribute linked combinations including the two. You must obey the GNU General 219 Public License in all respects for all of the code used other than linking with 220 Motif/Open Motif. If you modify this file, you may extend this exception to your 221 version of the file, but you are not obligated to do so. If you do not wish to 222 do so, delete this exception statement from your version. 223 224 This program is distributed in the hope that it will be useful, but WITHOUT ANY 225 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 226 PARTICULAR PURPOSE. See the GNU General Public License in the Help section 227 "Distribution Policy" for more details. 228 229 =cut 230