home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / util / jade-3.0.lha / Jade / doc / jade.info-1 < prev    next >
Encoding:
GNU Info File  |  1994-04-20  |  49.4 KB  |  1,488 lines

  1. This is Info file jade.info, produced by Makeinfo-1.55 from the input
  2. file jade.texi.
  3.  
  4.    This is Edition 1, last updated 19 April 1994, of `The Jade Manual',
  5. for Jade, Version 3.0.
  6.  
  7.    Jade is a text editor for Unix (with X11) and the Amiga.
  8.  
  9.    Copyright 1993, 1994 John Harper.
  10.  
  11.    Permission is granted to make and distribute verbatim copies of this
  12. manual provided the copyright notice and this permission notice are
  13. preserved on all copies.
  14.  
  15.    Permission is granted to copy and distribute modified versions of
  16. this manual under the conditions for verbatim copying, provided that
  17. the entire resulting derived work is distributed under the terms of a
  18. permission notice identical to this one.
  19.  
  20.    This is so that jade doesn't try to eval the example use.
  21. ::jade-code::
  22. ::end::
  23.  
  24. 
  25. File: jade.info,  Node: Top,  Next: Copying,  Prev: (dir),  Up: (dir)
  26.  
  27. Jade
  28. ****
  29.  
  30.    Jade is a highly flexible text editor for the Unix (with X11) and
  31. Amiga operating systems.
  32.  
  33.    This is Edition 1 of its documentation, last updated 19 April 1994
  34. for Jade version 3.0.
  35.  
  36. * Menu:
  37.  
  38. * Copying::            Distribution conditions
  39. * Introduction::        Brief introduction to Jade
  40. * Systems Supported::        The Operating Systems Jade supports
  41. * Editor Concepts::        Some key ideas you should understand
  42. * Key Definitions::        How keys are described in this manual
  43. * Starting Jade::        How to start the editor
  44. * Using Jade::            Instructions for using the editor
  45. * Programming Jade::        How to extend Jade -- its Lisp system
  46. * Reporting Bugs::        How to contact me
  47.  
  48. * Function Index::        Menu of all documented functions
  49. * Variable Index::        All variables which have been mentioned
  50. * Key Index::            Menu of all key bindings
  51. * Concept Index::        Main index, references to all sections
  52.  
  53. 
  54. File: jade.info,  Node: Copying,  Next: Introduction,  Prev: Top,  Up: Top
  55.  
  56. Copying
  57. *******
  58.  
  59.    Jade is distributed under the terms of the GNU General Public
  60. License, this basically means that you can give it to anyone for any
  61. price as long as full source code is included. For the actual legalese
  62. see the file `COPYING' in the distribution. I reserve the right to use
  63. a different license in future releases.
  64.  
  65.    The only parts of Jade which are not my own work are the regexp
  66. code, this is by Henry Spencer (though I have made some small
  67. modifications) and is distributed under his conditions, and the ARexx
  68. interface in the Amiga version which is based on `MinRexx' by Radical
  69. Eye Software.
  70.  
  71.    Be aware that there is absolutely NO WARRANTY for this program, you
  72. use it at your own risk. Obviously I hope there are no bugs, but I make
  73. no promises reguarding the reliability of this software.
  74.  
  75. 
  76. File: jade.info,  Node: Introduction,  Next: Systems Supported,  Prev: Copying,  Up: Top
  77.  
  78. Introduction
  79. ************
  80.  
  81.    Jade is a text editor primarily designed for programmers. It is
  82. easily customised through a Lisp-style extension language and can be
  83. tailored to the user's own requirements.
  84.  
  85.    Jade is designed to run under a graphical windowing system, systems
  86. currently supported are the Commodore Amiga and the X Window System
  87. version 11 (but only under Unix).
  88.  
  89.    It is the successor to the editor `Jed 2.10' which I released for the
  90. Amiga in early 1993. I have decided to rename it now that I have made a
  91. Unix version since there is already an editor called `Jed' available
  92. (there is no connection between the two, I haven't even looked at the
  93. other one). "Jade" is an anagram of "A Jed", if you want an acronym you
  94. could use "Just Another Damn Editor", if you can think of anything
  95. better please tell me.
  96.  
  97.    Jade is compatible with GNU Emacs in terms of keystrokes and command
  98. names to a certain extent but it is not intended as a simple copy of
  99. Emacs (indeed, when I started this I had never actually used Emacs!). I
  100. have tried to take my favourite aspects of all the editors I have used
  101. as well as adding features that I have not found elsewhere.
  102. Consequently, it is very much the editor that *I* want -- you may not
  103. find it so appealing.
  104.  
  105.    The feature that the most people will dislike is that it doesn't
  106. support "proper" tabs. By this I mean that it expands all tabs to a
  107. sequence of spaces when loading a file, they are not converted back to
  108. tabs until the file is saved back to disk (though this is optional).
  109.  
  110. 
  111. File: jade.info,  Node: Systems Supported,  Next: Editor Concepts,  Prev: Introduction,  Up: Top
  112.  
  113. Requirements
  114. ************
  115.  
  116.    Jade will only run on certain operating systems, this chapter
  117. details just what it needs as well as some notes relevant to each
  118. system.
  119.  
  120. * Menu:
  121.  
  122. * Amiga Jade::
  123. * Unix and X11 Jade ::
  124.  
  125. 
  126. File: jade.info,  Node: Amiga Jade,  Next: Unix and X11 Jade,  Up: Systems Supported
  127.  
  128. Amiga Jade
  129. ==========
  130.  
  131.    The only real requirement for Jade running on an Amiga is that it
  132. must run an operating system revision of at least V37 (thats V2.04) and
  133. have about 300K free memory available.
  134.  
  135.    It also needs more stack than the average Amiga application. For
  136. normal use 20K should be okay. If you want to use the Lisp compiler 50K
  137. would be a better bet.
  138.  
  139.    It assumes that its directory is pointed to by the `JADE:'
  140. assignment.  This means that the main Lisp files are stored in
  141. `JADE:lisp/' and the file of doc-strings is `JADE:DOC-strings'.
  142.  
  143. 
  144. File: jade.info,  Node: Unix and X11 Jade,  Prev: Amiga Jade,  Up: Systems Supported
  145.  
  146. Unix and X11 Jade
  147. =================
  148.  
  149.    Jade will only run on version 11 of X, it has absolutely no support
  150. for character terminals or different windowing systems. As long as it
  151. compiles it should work on your system.
  152.  
  153.    One problem you might find is that the BackSpace and Delete keys
  154. don't work properly. As far as I have been able to find out, most X
  155. terminals map both the BackSpace (normally at the top-right of the
  156. alpha-keyboard) and the Delete (normally somewhere above the cursor
  157. keys) keys to the `Delete' keysym. Obviously, since I want these keys
  158. to have different effects (1) this is no good. What I decided to do
  159. about this was two things,
  160.  
  161.   1. Use `xmodmap' to map the Delete key to the `BackSpace' keysym.
  162.      This may sound backwards but most programs seem to use the
  163.      `Delete' keysym as what I call `BackSpace' so mapping as I
  164.      described doesn't break this.
  165.  
  166.      To do this, I have the following in my `.Xmodmap' file
  167.  
  168.           keycode 107 = BackSpace
  169.  
  170.      Note that the `107' is the Delete key's keycode on *my* keyboard,
  171.      your keyboard may, and probably will, be different.
  172.  
  173.   2. In the function which binds descriptions of keystrokes to Lisp
  174.      forms, swap the meanings of the `BackSpace' and `Delete' keysyms.
  175.  
  176.    This means that everything works okay! You can bind to Delete key
  177. and it will work properly.
  178.  
  179.    ---------- Footnotes ----------
  180.  
  181.    (1)  BackSpace should rub out the key before the cursor and Delete
  182. should delete the character under the cursor
  183.  
  184. 
  185. File: jade.info,  Node: Editor Concepts,  Next: Key Definitions,  Prev: Systems Supported,  Up: Top
  186.  
  187. Editor Concepts
  188. ***************
  189.  
  190.    Before I describe the editor in detail there are several concepts
  191. which you should be familiar with. Some will be explained in more
  192. detail later.
  193.  
  194. "buffer"
  195.      Buffers are used by the editor to store the text that you are
  196.      editing.  Broadly speaking, each buffer holds the contents of one
  197.      text-file loaded into the editor (it is not necessary for each
  198.      buffer to be associated with a file, some buffers exist for other
  199.      purposes for example the `*jade*' buffer is used to interact with
  200.      the Lisp system.
  201.  
  202. "current buffer"
  203.      The buffer being edited in the current window (see below), most
  204.      editor commands work on this buffer unless told otherwise.
  205.  
  206. "window"
  207.      Corresponds to a window in the window-system. Each window can
  208.      display one buffer at a single time (although a buffer may be
  209.      displayed in more than one window at once).
  210.  
  211. "current window"
  212.      Jade always keeps track of which one of its windows is active. It
  213.      is called the current window. Whenever you type a key or press a
  214.      mouse button in one of Jade's windows, that window automatically
  215.      becomes the current window.  Amongst other things, all messages
  216.      from the editor are displayed in the status line of the current
  217.      window.
  218.  
  219. "cursor"
  220.      The cursor marks your current position in the current buffer (see
  221.      above), when you type something it is inserted into the buffer
  222.      between the cursor and the character preceding it (unless you type
  223.      a command).
  224.  
  225. "status line"
  226.      One line in a window is devoted to displaying messages from the
  227.      editor, *Note Using Windows::.
  228.  
  229. "Lisp"
  230.      The programming language which Jade uses, although the internals
  231.      of the editor are written in C, all commands are written in a
  232.      dialect of Lisp (even if the command only calls a C function).
  233.      Jade contains an interpreter, compiler and debugger for this
  234.      language. *Note Programming Jade::.
  235.  
  236. "variable"
  237.      Variables are used to store Lisp values, each variable has a
  238.      unique name.  Note that unlike many programming languages
  239.      variables in Lisp are *not* typed, the data values themselves have
  240.      a type associated with them.
  241.  
  242. "form"
  243.      A form is a single Lisp expression. For example, all of these are
  244.      forms:
  245.  
  246.           foo
  247.           42
  248.           "hello"
  249.           (setq foo 200)
  250.  
  251. "command"
  252.      A command is a sequence of Lisp forms which may be called
  253.      interactively (ie, from the keyboard). It may be a key sequence
  254.      (such as `Ctrl-x Ctrl-f') or a Lisp function to evaluate (such as
  255.      `ESC x find-file').
  256.  
  257. "regular expression"
  258.      A regular expression is a string which is used to match against
  259.      other strings.  It has a special syntax which allows you to form a
  260.      kind of template against which the other strings can be matched.
  261.      They are used extensively by the editor, but you -- the user --
  262.      will mainly encounter them when searching and replacing strings in
  263.      buffers.
  264.  
  265. 
  266. File: jade.info,  Node: Key Definitions,  Next: Starting Jade,  Prev: Editor Concepts,  Up: Top
  267.  
  268. Key Definitions
  269. ***************
  270.  
  271.    In this manual I have adopted a consistent notation for all
  272. keypresses, since most editor commands are invoked via a typed
  273. key-sequence it is very important that you can decipher this notation.
  274.  
  275.    Every keypress has a set of "modifiers"; these are the keys such as
  276. "Shift" or "Control" which don't actually produce a character when
  277. typed, they only effect the rest of the keyboard. Each key, then, can
  278. have one or more modifiers.
  279.  
  280.    The actual key definition consists of zero or more hyphen-separated
  281. modifiers, followed by a hyphen and the name of the actual key (or
  282. event).
  283.  
  284.    Some commands are triggered by a sequence of one or more of these key
  285. definitions, press each key definition in turn to invoke the command.
  286.  
  287.    Note that the case of modifiers is not important, however some of
  288. the keys *are*, so you should always specify them in their correct case.
  289.  
  290. * Menu:
  291.  
  292. * Modifiers::            Names of modifier keys
  293. * Keys::            Names of actual keys
  294. * Example Keys::        Some examples and what they mean
  295.  
  296. 
  297. File: jade.info,  Node: Modifiers,  Next: Keys,  Up: Key Definitions
  298.  
  299. Modifiers
  300. =========
  301.  
  302. "Shift"
  303. "SFT"
  304.      The shift key.
  305.  
  306. "Ctrl"
  307. "CTL"
  308.      The control key, or its equivalent.
  309.  
  310. "Meta"
  311.      This depends on the window-system, on X11 it is the "Mod1"
  312.      modifier, on the Amiga the "Alt" key.
  313.  
  314. "LMB"
  315.      The left mouse button.
  316.  
  317. "MMB"
  318.      The middle mouse button.
  319.  
  320. "RMB"
  321.      The right mouse button.
  322.  
  323.    As well as these, there are also some others, "Mod1" to "Mod2"
  324. represent the X11 modifiers of the same name. "Button1" to "Button5"
  325. also correspond to their X11 conterparts (Button1 to Button3 are LMB to
  326. RMB). For Amiga users, "Amiga" corresponds to the Amiga key (this is
  327. the same as Mod2).
  328.  
  329. 
  330. File: jade.info,  Node: Keys,  Next: Example Keys,  Prev: Modifiers,  Up: Key Definitions
  331.  
  332. Keys
  333. ====
  334.  
  335.    As far as possible each single character key-definition corresponds
  336. to where that character is on the keyboard (a is `a', etc...).
  337.  
  338.    When using an Amiga this should be true for *all* keys since the
  339. Amiga's "keymap.library" makes it easy to look up what key a character
  340. belongs to.  However, this is not so easy on X11. All of the standard
  341. ASCII character set should be okay, but the more esoteric characters
  342. may have to be specified by the names of their X11 keysym (without the
  343. `XK_' prefix). Look in the <X11/keysymdef.h> include file for all
  344. keysyms, for example `XK_question' would have to be used for `?' if the
  345. editor didn't treat it, and many others, specially.
  346.  
  347.    Some keys which don't follow this pattern are
  348.  
  349. "Space"
  350. "SPC"
  351. "SpaceBar"
  352.      The space bar.
  353.  
  354. "TAB"
  355.      The tab key.
  356.  
  357. "RET"
  358. "Return"
  359.      The return key.
  360.  
  361. "ESC"
  362. "Escape"
  363.      The escape key.
  364.  
  365. "BS"
  366. "BackSpace"
  367.      The backspace key.
  368.  
  369. "DEL"
  370. "Delete"
  371.      The delete key.
  372.  
  373. "HELP"
  374.      The help key, not all keyboards have this.
  375.  
  376. "UP"
  377.      The cursor up key.
  378.  
  379. "DOWN"
  380.      The cursor down key
  381.  
  382. "LEFT"
  383.      The cursor left key.
  384.  
  385. "RIGHT"
  386.      The cursor right key.
  387.  
  388. "KP_Enter"
  389. "KP_Multiply"
  390. "KP_Divide"
  391. "KP_Minus"
  392. "KP_Add"
  393. "KP_Decimal"
  394. "KP_N"
  395.      Keys on the numeric keypad. For KP_N, N is a digit.
  396.  
  397. "Click1"
  398.      Single clicking a mouse button.
  399.  
  400. "Click2"
  401.      Double clicking a mouse button.
  402.  
  403. "Off"
  404.      Releasing a mouse button.
  405.  
  406. "Move"
  407.      Moving the mouse. This doesn't work on X11 yet.
  408.  
  409. 
  410. File: jade.info,  Node: Example Keys,  Prev: Keys,  Up: Key Definitions
  411.  
  412. Example Keys
  413. ============
  414.  
  415.    Some examples of proper key definitions are,
  416.  
  417. `Ctrl-x'
  418.      Hold down Control, type x.
  419.  
  420. `Meta-Shift-RET'
  421.      Hold down Meta and Shift, then type the Return key.
  422.  
  423. `LMB-Click1'
  424.      Click the left mouse button once.
  425.  
  426. `Meta-RMB-Click1'
  427.      Hold down Meta then click the right mouse button once.
  428.  
  429. 
  430. File: jade.info,  Node: Starting Jade,  Next: Using Jade,  Prev: Key Definitions,  Up: Top
  431.  
  432. Starting Jade
  433. *************
  434.  
  435.    This chapter describes Jade's initialisation process. This includes
  436. how to start it, what options it will accept and what it actually does
  437. after being started.
  438.  
  439. * Menu:
  440.  
  441. * Invocation::            How to start the editor
  442. * Startup Options::        Arguments specified on the command line
  443. * Startup Procedure::        What happens on startup
  444.  
  445. 
  446. File: jade.info,  Node: Invocation,  Next: Startup Options,  Up: Starting Jade
  447.  
  448. Invocation
  449. ==========
  450.  
  451.    Since Jade supports two vastly different operating systems they both
  452. need to be covered separately.
  453.  
  454.    * Amiga
  455.  
  456.      The normal way to start Jade on the Amiga is to type its name at
  457.      the Shell (or CLI) together with any options (*note Startup
  458.      Options::.) you want. Note that these options are in the
  459.      traditional Unix style, a dash followed by the option name and any
  460.      arguments, not the standard AmigaDOS method.
  461.  
  462.      It is also possible to invoke the editor from the Workbench,
  463.      simply double clicking on its icon will cause Jade to open its
  464.      initial window. Unfortunately there is no support for passing
  465.      arguments via Tool Types, nor is there any way to create icons
  466.      with saved files. This is largely due to the fact that I rarely
  467.      use the Workbench -- if enough people complain about this I will
  468.      probably fix it. Jade doesn't have an icon yet, you'll have to
  469.      make one yourself.
  470.  
  471.    * Unix with X11
  472.  
  473.      Jade should be started like most other Unix programs, type its
  474.      name and any arguments to a shell. It must be able to connect to
  475.      an X server (preferably the one controlling your terminal), the
  476.      `-display' option can be used if needed.
  477.  
  478. 
  479. File: jade.info,  Node: Startup Options,  Next: Startup Procedure,  Prev: Invocation,  Up: Starting Jade
  480.  
  481. Startup Options
  482. ===============
  483.  
  484.    The acceptable options can be split into three classes. Note that
  485. they must be specified on the command line in order of their class.
  486. This means that, for example, the `-rc' option must be after the `-font'
  487. option.
  488.  
  489.    So, the general usage pattern is
  490.  
  491.      jade [SYSTEM-DEPENDANT-OPTIONS] [STANDARD-OPTIONS] [LISP-OPTIONS]
  492.  
  493.    Note that the LISP-OPTIONS may include files to be loaded.
  494.  
  495.   1. System dependant options.
  496.  
  497.         * Options for the Amiga system.
  498.  
  499.          `-pubscreen SCREEN-NAME'
  500.                Defines the name of the public screen on which the first
  501.                window is opened. By default (or if SCREEN-NAME doesn't
  502.                exits) the `Workbench' screen is used.
  503.  
  504.          `-font FONT-STRING'
  505.                Defines the font used in the first window. FONT-STRING
  506.                is the font to use, it is the name of the font (for
  507.                example, `topaz.font'), followed by a hyphen and the
  508.                point size to use. For example, a FONT-STRING of
  509.                `topaz.font-8' gives 8-point topaz. This is the default.
  510.  
  511.         * Options for X11.
  512.  
  513.           There are two types of options to the X11 version of the
  514.           editor, those specified on the command line and those defined
  515.           in the resource database (ie, in your `.Xdefaults' file).
  516.           Resources are looked for under two names, firstly the name
  517.           under which the editor was invoked (normally `jade'), if this
  518.           fails it tries again with the name `Jade'. Naturally, options
  519.           specified on the command line overide those in the resource
  520.           database.
  521.  
  522.          `-display DISPLAY-NAME'
  523.                Defines the name of X display to open, by default the
  524.                contents of the environment variable `DISPLAY'. It is a
  525.                string of the form `hostname:number.screen_number'.
  526.  
  527.          `-name NAME'
  528.                The name to use when looking up resource values, this
  529.                replaces the base name of the executable (normally
  530.                `jade').
  531.  
  532.          `-geometry GEOM-SPEC'
  533.                Specifies where to place the first window on the screen.
  534.                This is a standard X style geometry specification.
  535.  
  536.          `-fg FOREGROUND-COLOUR'
  537.          `fg: FOREGROUND-COLOUR' *RESOURCE*
  538.                The colour of the window's foreground (ie, the text).
  539.  
  540.          `-bg BACKGROUND-COLOUR'
  541.          `bg: BACKGROUND-COLOUR' *RESOURCE*
  542.                The background colour of the window.
  543.  
  544.          `-font FONT-NAME'
  545.          `font: FONT-NAME' *RESOURCE*
  546.                The name of the font used for all text in the initial
  547.                window.
  548.  
  549.   2. Standard options.
  550.  
  551.     `-rc LISP-FILE'
  552.           Load the Lisp script LISP-FILE instead of the normal
  553.           initialisation script (`init'). Warning: the editor depends
  554.           heavily on the normal file, if you change this without due
  555.           care the editor could be unusable -- no keys will be bound
  556.           and many standard functions won't exist.
  557.  
  558.     `-v'
  559.           Print the version and revision numbers of this copy of the
  560.           editor then quit.
  561.  
  562.     `-log-msgs'
  563.           This option makes all messages which are displayed in the
  564.           status line also be written to the standard error stream.
  565.           This is sometimes useful for debugging purposes.
  566.  
  567.   3. All other options are passed to the Lisp initialisation process in
  568.      the variable `command-line-args', these are available to any Lisp
  569.      packages loaded in the initialisation script. Any left after that
  570.      are scanned for the following options,
  571.  
  572.     `-f FUNCTION'
  573.           Call the Lisp function FUNCTION.
  574.  
  575.     `-l FILE'
  576.           Load the Lisp file FILE.
  577.  
  578.     `-q'
  579.           Quit cleanly.
  580.  
  581.     `FILE'
  582.           Load the file of text FILE into a new buffer.
  583.  
  584.    An example command line for starting Jade from a Unix shell could be
  585.  
  586.      $ jade -fg white -bg black -log-msgs foo.c bar.jl
  587.  
  588.    This means white text, black background, save messages and load the
  589. files `foo.c' and `bar.jl'.
  590.  
  591. 
  592. File: jade.info,  Node: Startup Procedure,  Prev: Startup Options,  Up: Starting Jade
  593.  
  594. Startup Procedure
  595. =================
  596.  
  597.    This is a description of what happens when the editor initialises
  598. itself.
  599.  
  600.   1. Firstly lots of internal data structures are created, memory
  601.      pools, symbols and their symbol-table (including all the primitive
  602.      Lisp functions).
  603.  
  604.   2. The window-system is initialised (parse the system-dependant
  605.      options, and the xrdb resources if in X).
  606.  
  607.   3. Parse the standard options.
  608.  
  609.   4. Create the initial window and the first buffer to display in it
  610.      (this is the buffer called `*jade*').
  611.  
  612.   5. Load the initialisation script, this is either the Lisp file
  613.      called `init' or whatever was given to the `-rc' command line
  614.      option.
  615.  
  616.      Some selected highlights of what the standard file does are,
  617.  
  618.         * Load lots of Lisp files, some notable ones are
  619.  
  620.          `loadsyms'
  621.                Initialise the autoload stubs.
  622.  
  623.          `loadkeys'
  624.                Creates the standard keymaps and keybindings.
  625.  
  626.         * Try to find the user's personal startup file, this is
  627.           normally the file `.jaderc' in their home directory (1).
  628.  
  629.         * Load any files which were specified on the command line.
  630.  
  631.   6. Start the top-level recursive edit, this doesn't exit until the
  632.      editor does.
  633.  
  634.    ---------- Footnotes ----------
  635.  
  636.    (1)  The Amiga has no notion of a user's home directory, Jade uses
  637. the contents of the environment variable `HOME', or if this doesn't
  638. exist the `SYS:' assignment.
  639.  
  640. 
  641. File: jade.info,  Node: Using Jade,  Next: Programming Jade,  Prev: Starting Jade,  Up: Top
  642.  
  643. Using Jade
  644. **********
  645.  
  646.    This chapter of the manual is meant to teach you to *use* the editor,
  647. because of this I have attempted to reduce references to the Lisp
  648. extension language to an absolute minimum. The only things that you
  649. need to know about at this time are how to set or reference Lisp
  650. variables and how to invoke Lisp commands.
  651.  
  652.    Luckily, it is very easy to do this by typing one of the following
  653. sequences to the editor,
  654.  
  655. `ESC x FUN'
  656.      Calls the command called FUN and displays its result in the status
  657.      line.
  658.  
  659. `ESC x set-variable RET FOO RET BAR'
  660.      This sets the Lisp variable FOO to the value BAR.
  661.  
  662. `ESC x show-variable RET FOO'
  663.      This displays the value of the variable FOO in the status line.
  664.  
  665.    Note that throughout this manual it is assumed that you press the RET
  666. (return) key after each `ESC x' command. For example, to invoke the
  667. command `ESC x find-file' you would actually type the following (but
  668. not the spaces -- they are for readability).
  669.  
  670.      `ESC x f i n d - f i l e RET'
  671.  
  672. * Menu:
  673.  
  674. * The Help System::        Online help facilities
  675. * Loading and Saving Files::    Manipulating files into buffers
  676. * Editing Buffers::        Simple editing commands
  677. * Moving Around Buffers::    Commands for moving the cursor
  678. * Using Blocks::        Highlighting regions to manipulate
  679. * Cutting And Pasting::        How to insert text from the clipboard
  680. * Searching and Replacing::    Searching the buffer for a regexp
  681. * Editing Modes::        Editing different types of files
  682. * Using Buffers::        Selecting & deleting buffers
  683. * Using Windows::        Opening new windows
  684. * Using the Prompt::        Entering strings and completion
  685. * Using Marks::            Recording positions in files
  686. * Compiling Programs::        Help for developing programs
  687. * Simple Customisation::    Configuring Jade
  688.  
  689. 
  690. File: jade.info,  Node: The Help System,  Next: Loading and Saving Files,  Up: Using Jade
  691.  
  692. The Help System
  693. ===============
  694.  
  695.    To invoke the help system type the key sequence `Ctrl-h' or if your
  696. keyboard has it the `HELP' key.
  697.  
  698.    A prompt will be displayed in the status line showing you which keys
  699. you can press next to enter one of the main options of the help system
  700. explained below. Alternatively, you can type either `Ctrl-h' or `HELP'
  701. again to display some text telling you more about the help system and
  702. how to use it.
  703.  
  704.    The help system is exited after successfully invoking one of the
  705. commands described below or typing anything which is not a recognised
  706. command to the help system.
  707.  
  708. `a'
  709.      To list all function names matching REGEXP, type `a REGEXP RET'
  710.      when in the help system.
  711.  
  712. `e'
  713.      Similarly, to list all variable names matching REGEXP, type `e
  714.      REGEXP RET' when in the help system.
  715.  
  716. `f'
  717.      Displays the online documentation for a function. After invoking
  718.      this option type the name of the function.
  719.  
  720. `h'
  721.      Shows some helpful text describing how to use the help system.
  722.  
  723. `i'
  724.      Enters the Info viewer. This allows you to browse through files
  725.      written in the Info hypertext format. For more information see
  726.      *Note Info-mode::, for more information on Info files in general
  727.      see *Note Info: (info)Top.
  728.  
  729. `m'
  730.      Display the current editing modes documentation.
  731.  
  732. `v'
  733.      Displays the online documentation and current value of a variable.
  734.      Type the name of the variable after invoking this option.
  735.  
  736. 
  737. File: jade.info,  Node: Loading and Saving Files,  Next: Editing Buffers,  Prev: The Help System,  Up: Using Jade
  738.  
  739. Loading and Saving Files
  740. ========================
  741.  
  742.    Since `jade' is a text editor its main function is to edit files of
  743. text.  This means that you must be able to read the text contained in a
  744. file into one of the editor's buffers, then save it back to disk when
  745. you have finished editing it. That is what this section deals with.
  746.  
  747. * Menu:
  748.  
  749. * Commands To Load Files::    Keystrokes to load files
  750. * Commands To Save Files::    How to save a buffer
  751. * Backup Files::        Making backups
  752. * Auto-Saving Files::        Files can be saved periodically
  753. * Loading and Saving Tabs::    How tabs are handled
  754. * Automatic Mode Selection::    File suffixes can select editing modes
  755. * Embedding Lisp In Files::    Lisp to evaluate when a file is loaded
  756.  
  757. 
  758. File: jade.info,  Node: Commands To Load Files,  Next: Commands To Save Files,  Up: Loading and Saving Files
  759.  
  760. Commands To Load Files
  761. ----------------------
  762.  
  763.    There are several commands used to load files into buffers, these
  764. are,
  765.  
  766. `Ctrl-x Ctrl-f'
  767.      Prompts for the name of a file (using file-completion) and display
  768.      the buffer containing that file. If the file has not already been
  769.      loaded it will be read into a new buffer.
  770.  
  771. `Ctrl-x Ctrl-v'
  772.      Prompts for the name of a file, the current buffer is killed and
  773.      the buffer in which the prompted-for file is being edited is
  774.      displayed. As in `find-file' it will be read into a new buffer if
  775.      it is not already in memory.
  776.  
  777. `Ctrl-x Ctrl-r'
  778.      Similar to `find-file' except that the buffer is marked as being
  779.      read-only. This means that no modifications can be made to the
  780.      buffer.
  781.  
  782. `Ctrl-x i'
  783.      Prompts for a file, then inserts it into the current buffer at the
  784.      cursor position.
  785.  
  786.    You can use the prompt's completion feature to expand abbreviated
  787. filenames typed to the prompt, for more information see *Note The
  788. Buffer Prompt::.
  789.  
  790. 
  791. File: jade.info,  Node: Commands To Save Files,  Next: Backup Files,  Prev: Commands To Load Files,  Up: Loading and Saving Files
  792.  
  793. Commands To Save Files
  794. ----------------------
  795.  
  796.    These are the commands used to save buffers and the keystrokes
  797. associated with them,
  798.  
  799. `Ctrl-x Ctrl-s'
  800.      Saves the current buffer to the file that it is associated with
  801.      (this is either the file that it was loaded from or something else
  802.      set by the function `set-file-name'). If no modifications have
  803.      been made to the file since it was loaded it won't be saved (a
  804.      message will be displayed warning you of this).
  805.  
  806. `Ctrl-x Ctrl-w'
  807.      Prompts for a name to save the file as. The file associated with
  808.      this buffer is renamed and the file is saved as its new name.
  809.  
  810. `Ctrl-x s'
  811.      For each buffer which has been modified since it was loaded, ask
  812.      the user if it should be saved or not. If so, the command
  813.      `save-file' is used to save the file
  814.  
  815. 
  816. File: jade.info,  Node: Backup Files,  Next: Auto-Saving Files,  Prev: Commands To Save Files,  Up: Loading and Saving Files
  817.  
  818. Backup Files
  819. ------------
  820.  
  821.    The editor can optionally preserve the previous contents of a file
  822. when they are about to be overwritten by saving a buffer. It does this
  823. by renaming the old file, `foo' as `foo~' (the original name plus a
  824. tilde appended to it).
  825.  
  826.  - Variable: make-backup-files
  827.      This variable controls whether or not backups are made of files
  828.      about to overwritten by the function `write-buffer' (ie, the
  829.      commands `save-file' and `save-file-as'). When non-nil the old
  830.      instance of the file is renamed so that it has a tilde appended to
  831.      its old name.
  832.  
  833.  - Variable: backup-by-copying
  834.      When non-nil all backups are made by copying the original file
  835.      instead of renaming it as the backup file. This is slower but less
  836.      destructive.
  837.  
  838.    If `backup-by-copying' is nil and renaming the original file as its
  839. backup would be damaging (ie, changing the ownership of the file or
  840. breaking a link) no backup will be made.
  841.  
  842. 
  843. File: jade.info,  Node: Auto-Saving Files,  Next: Loading and Saving Tabs,  Prev: Backup Files,  Up: Loading and Saving Files
  844.  
  845. Auto-Saving Files
  846. -----------------
  847.  
  848.    Jade is able to save snapshots of a buffer's contents at set time
  849. intervals.  When this time interval expires and the buffer has been
  850. modified since it was last (auto-) saved to disk (and the editor is
  851. idle) the buffer is saved to a special file (usually the base component
  852. of the file's name surrounded by `#' characters in the file's
  853. directory).
  854.  
  855.  - Variable: auto-save-p
  856.      When non-nil this makes the function `open-file' (and therefore the
  857.      commands `find-file', etc) flag that the file it just read should
  858.      be auto saved regularly.
  859.  
  860.  - Variable: default-auto-save-interval
  861.      This is the default number of seconds between each auto save. This
  862.      variable is only referenced when each file is opened.
  863.  
  864.      Its standard value is 120 seconds.
  865.  
  866.  - Variable: auto-save-interval
  867.      This buffer-local variable controls the number of seconds between
  868.      each auto-save of the buffer it belongs to. A value of zero means
  869.      never auto-save.
  870.  
  871.    When the buffer is saved properly (ie, with `save-file' and friends)
  872. its auto-save file is deleted. Note that this doesn't happen when you
  873. kill a buffer and an auto-save file exists (in case you didn't mean to
  874. kill the buffer).
  875.  
  876.    If you want to change the format of the name of auto-saved files
  877. look at the function `make-auto-save-name' and its documentation.
  878.  
  879. 
  880. File: jade.info,  Node: Loading and Saving Tabs,  Next: Automatic Mode Selection,  Prev: Auto-Saving Files,  Up: Loading and Saving Files
  881.  
  882. Tab Expansion
  883. -------------
  884.  
  885.    The editor does not leave tab characters (ASCII 9) as they are. They
  886. are expanded into one or more spaces when the file is read into its
  887. buffer. The size of the expansion depends upon the column number at
  888. which the tab has occured and the value of the variable `disk-tab'.
  889.  
  890.  - Variable: disk-tab
  891.      This buffer-local variable determines the size of tab stops used
  892.      when a file is read from disk (by the `read-buffer' function) into
  893.      a buffer.
  894.  
  895.    It is desirable that the files which the editor produces have tabs
  896. in them though, so something has to be done.
  897.  
  898.    The variable `save-tabs' controls exactly how files are saved (in
  899. respect to saving tab characters).
  900.  
  901.  - Variable: save-tabs
  902.      The value of this buffer-local variable is used to decide exactly
  903.      which sequences of spaces are changed to tab characters when a
  904.      buffer is saved to disk (with the `write-buffer' and
  905.      `write-buffer-area' functions).  There are three possible options
  906.      (all of which are Lisp symbols):
  907.  
  908.     `nil'
  909.           *No* tabs are saved at all. All whitespace is left untouched,
  910.           this may be necessary with some types of file whose format is
  911.           strongly defined.
  912.  
  913.     `leading'
  914.           Any whitespace at the start of each line is translated into
  915.           tabs and spaces such that the first non-whitespace character
  916.           in the line is at the same logical position as it was in the
  917.           buffer.
  918.  
  919.     `all'
  920.           Any sequence of two or more space characters is translated
  921.           into tab characters when the logical structure of the line
  922.           would be unaltered by doing so. *No* translations take place
  923.           after the first quote character (ie, `'', ``' or `"') in the
  924.           line (this is to try and prevent errors).
  925.  
  926. 
  927. File: jade.info,  Node: Automatic Mode Selection,  Next: Embedding Lisp In Files,  Prev: Loading and Saving Tabs,  Up: Loading and Saving Files
  928.  
  929. Automatic Mode Selection
  930. ------------------------
  931.  
  932.    As described elsewhere in this manual, each buffer can have an
  933. editing mode associated with it (ie, `c-mode' for editing buffers of C
  934. source code).
  935.  
  936.    Since it would be extremely tedious to have to invoke the mode's
  937. initialisation function manually whenever a new file is loaded the
  938. editor can initialise the mode automatically. It does this by scanning
  939. an association list called `mode-alist' for a regular expression
  940. matching the name of the file (or the string in the buffer-local
  941. variable `mode-name' if it is non-nil). If a match is found the function
  942. associated with the matching regular expression is called, thereby
  943. initialising the mode.
  944.  
  945.    If you don't understand this, don't worry -- it works.
  946.  
  947.    For example, the mode-alist contains this fragment as one of its
  948. elements:
  949.  
  950.      ("\\.[ch]$" . c-mode)
  951.  
  952. which means call the function `c-mode' for any file ending in `.c' or
  953. `.h'.
  954.  
  955.  - Variable: mode-alist
  956.      A list of elements of `(MATCH-REGEXP . MODE-FUN)'. When a file is
  957.      loaded each MATCH-REGEXP is compared with the name of the file in
  958.      question (or it's `mode-name' value). When a match is found the
  959.      corresponding MODE-FUN function is called.
  960.  
  961. 
  962. File: jade.info,  Node: Embedding Lisp In Files,  Prev: Automatic Mode Selection,  Up: Loading and Saving Files
  963.  
  964. Embedding Lisp In Files
  965. -----------------------
  966.  
  967.    It is possible to include Lisp commands in the text of a file so
  968. that they will be read and evaluated when that file is loaded into a
  969. buffer.
  970.  
  971.    This is normally used to set buffer-local options which are specific
  972. to one particular file, ie, to set the name of the editing mode, or the
  973. size of tab characters in this file.
  974.  
  975.    The way to do this is to include a section of text of the form in
  976. the file:
  977.  
  978.      ...
  979.      XXX ::jade-code::
  980.      XXX Lisp Line1
  981.      XXX Lisp Line2
  982.      XXX ...
  983.      XXX Lisp LineN
  984.      XXX ::end::
  985.      ...
  986.  
  987.    The `XXX' just means that any text to the left of the column in which
  988. the `jade-code' begins is ignored (This is mainly to allow for any
  989. comments needed to make sure that the Lisp text is not used by whatever
  990. uses the file).
  991.  
  992.    Only one block such as this is allowed per file, it is not evaluated
  993. until the whole of the file has been read.
  994.  
  995.    Some examples uses of this could be,
  996.  
  997.    In a lisp file:
  998.      ;;; ::jade-code::
  999.      ;;; (setq lisp-mode-tab 4)
  1000.      ;;; (setq mode-name "lisp-mode")
  1001.      ;;; ::end::
  1002.  
  1003.    Or in a C source file:
  1004.      /* ::jade-code::
  1005.       * (setq c-mode-tab 4)
  1006.       * (setq mode-name "c-mode")
  1007.       */::end::
  1008.  
  1009.    It is also possible to prohibit the evaluation of these special
  1010. sections.
  1011.  
  1012.  - Variable: no-file-code-p
  1013.      When non-nil the section of a file marked for auto-evaluation
  1014.      (with the `::jade-code::' marker) is *not* evaluated.
  1015.  
  1016. 
  1017. File: jade.info,  Node: Editing Buffers,  Next: Moving Around Buffers,  Prev: Loading and Saving Files,  Up: Using Jade
  1018.  
  1019. Editing Buffers
  1020. ===============
  1021.  
  1022.    The majority of keys when typed will simply insert themselves into
  1023. the buffer (this is not always true but it's a good assumption) since
  1024. they have not been bound. Typically this includes all normal characters
  1025. (ie, alphanumeric, puntuation, etc) as well as any of the more obtuse
  1026. key-sequences which have not been bound to a function (`Ctrl-l' is one
  1027. of the more useful of these).
  1028.  
  1029.    The behaviour of the TAB key is different to many other editors -- it
  1030. doesn't insert anything (unless a specific editing mode has bound it to
  1031. something else, like `c-mode' for example), generally it just moves the
  1032. cursor to the next tab stop. This is partly because Jade doesn't use
  1033. "proper" tabs and partly because it makes it easier to move around a
  1034. line (because the keystroke `Shift-TAB' moves to the previous tab stop).
  1035.  
  1036.    Some miscellaneous editing commands are,
  1037.  
  1038. `RET'
  1039.      This generally splits the line into two at the position of the
  1040.      cursor, some editing modes may provide an option which
  1041.      automatically indents the line after it's split.
  1042.  
  1043. `BS'
  1044.      Deletes the character before the cursor.
  1045.  
  1046. `DEL'
  1047.      Deletes the character under the cursor.
  1048.  
  1049. `Shift-BS'
  1050.      Kills the characters between the start of the line and the cursor.
  1051.  
  1052. `Shift-DEL'
  1053. `Ctrl-d'
  1054.      Kills the characters from the cursor to the end of the line.
  1055.  
  1056. `Ctrl-DEL'
  1057.      Kills the whole line.
  1058.  
  1059. `Ctrl-o'
  1060.      Splits the line in two at the cursor, but leaves the cursor in its
  1061.      original position.
  1062.  
  1063. `ESC d'
  1064. `ESC DEL'
  1065.      Kills from the cursor to the end of the current word.
  1066.  
  1067. `ESC i'
  1068.      Inserts spaces to fill from the cursor to the next tab stop.
  1069.  
  1070. `ESC l'
  1071.      Makes the characters from the cursor to the end of the word lower
  1072.      case.
  1073.  
  1074. `ESC u'
  1075.      Upper cases the characters from the cursor to the end of the word.
  1076.  
  1077. `ESC BS'
  1078.      Kills from the cursor to the beginning of the word.
  1079.  
  1080. 
  1081. File: jade.info,  Node: Moving Around Buffers,  Next: Cutting And Pasting,  Prev: Editing Buffers,  Up: Using Jade
  1082.  
  1083. Moving Around Buffers
  1084. =====================
  1085.  
  1086.    These are the commands which are used to move the cursor around the
  1087. current buffer,
  1088.  
  1089. `UP'
  1090. `Ctrl-p'
  1091.      Move one line up.
  1092.  
  1093. `DOWN'
  1094. `Ctrl-n'
  1095.      Move one line down.
  1096.  
  1097. `LEFT'
  1098.      Move one column to the left, stopping at the first column.
  1099.  
  1100. `Ctrl-b'
  1101.      Move to the previous character, at the beginning of the line moves
  1102.      to the end of the previous line.
  1103.  
  1104. `RIGHT'
  1105.      Move one column to the right. This keeps moving past the end of
  1106.      the line.
  1107.  
  1108. `Ctrl-f'
  1109.      Move to the next character, at the end of a line moves to the
  1110.      start of the next line.
  1111.  
  1112. `Shift-UP'
  1113.      Move to the first line in the buffer.
  1114.  
  1115. `Shift-DOWN'
  1116.      Move to the last line in the buffer.
  1117.  
  1118. `ESC <'
  1119.      Move to the first character in the buffer.
  1120.  
  1121. `ESC >'
  1122.      Move to the last character in the buffer.
  1123.  
  1124. `Shift-LEFT'
  1125. `Ctrl-a'
  1126.      Move to the beginning of the current line.
  1127.  
  1128. `Shift-RIGHT'
  1129. `Ctrl-e'
  1130.      Move to the last character in the current line.
  1131.  
  1132. `Ctrl-UP'
  1133. `ESC v'
  1134.      Move to the previous screenful of text.
  1135.  
  1136. `Ctrl-DOWN'
  1137. `Ctrl-v'
  1138.      Move to the next screenful of text.
  1139.  
  1140. `Meta-LEFT'
  1141. `ESC b'
  1142.      Move to the previous word.
  1143.  
  1144. `Meta-RIGHT'
  1145. `ESC f'
  1146.      Move to the next word.
  1147.  
  1148. `Meta-UP'
  1149. `ESC ['
  1150.      Move to the start of the previous paragraph.
  1151.  
  1152. `Meta-DOWN'
  1153. `ESC ]'
  1154.      Move to the start of the next paragraph.
  1155.  
  1156. `TAB'
  1157. `ESC TAB'
  1158.      Move to the next tab position. Note that some editing modes
  1159.      redefine TAB to make it indent the current line.
  1160.  
  1161. `Shift-TAB'
  1162.      Move to the position of the previous tab.
  1163.  
  1164. `Ctrl-TAB'
  1165. `ESC i'
  1166.      Insert a tab (ie, enough spaces to move to the next tab position).
  1167.  
  1168. `Ctrl-j'
  1169. `ESC x goto-line'
  1170.      Prompt for a line number and go to it.
  1171.  
  1172. `ESC m'
  1173.      Move to the first non-space character in the current line.
  1174.  
  1175.    There are several variables which affect the commands described
  1176. above, these are,
  1177.  
  1178.  - Variable: screen-tab
  1179.      This buffer-local variable controls the size of tab characters in
  1180.      a buffer.  Its standard value is 8. This variable does not affect
  1181.      the size of tabs in files read into the buffer, that is controlled
  1182.      by `disk-tab'.
  1183.  
  1184.  - Variable: y-scroll-step-ratio
  1185.      A window-local variable which controls what happens when you move
  1186.      the cursor off the top or bottom of the window. A value of zero
  1187.      means move as much as needed to get the cursor back into view, for
  1188.      example, if you move down one line, it will scroll the window one
  1189.      line only. If the value is not zero the screen is moved by the
  1190.      number of rows in the window divided by the value. For example, a
  1191.      value of 2 means scroll the window in chunks half the size of the
  1192.      window -- this is useful for when you are working with a slow
  1193.      updating display.
  1194.  
  1195.  - Variable: x-scroll-step-ratio
  1196.      Similar to `y-scroll-step-ratio' except for horizontal movement.
  1197.  
  1198. 
  1199. File: jade.info,  Node: Cutting And Pasting,  Next: Using Blocks,  Prev: Moving Around Buffers,  Up: Using Jade
  1200.  
  1201. Cutting And Pasting
  1202. ===================
  1203.  
  1204.    One of the main functions of any editor is to allow you to move
  1205. around chunks of text, jade makes this very easy.
  1206.  
  1207.    Generally, to paste down some text you have to get the text to be
  1208. inserted into the window-system's clipboard (1). If the text you wish
  1209. to paste is in one of the editor's buffers jade has a number of
  1210. commands for doing this, this is sometimes referred to as "killing" the
  1211. text.
  1212.  
  1213.    If the text to be pasted is in the same buffer as the position to
  1214. which you want to copy it there is an easier way than putting it into
  1215. the clipboard. For more details see *Note Commands on Blocks:: and the
  1216. command `Ctrl-i'.
  1217.  
  1218.    Once the text to be pasted is in the clipboard there are two
  1219. commands which can be used to insert it into the buffer before the
  1220. cursor,
  1221.  
  1222. `Ctrl-y'
  1223.      Inserts the contents of the standard clipboard into the buffer at
  1224.      the cursor position.
  1225.  
  1226. `Ctrl-Y'
  1227.      This is a variant of `Ctrl-y', it treats the string that it is
  1228.      pasting as a "rectangle" of text. That is, each successive line in
  1229.      the string (each separated by a newline character) is inserted on
  1230.      successive lines in the buffer but at the same column position.
  1231.      For more details see *Note Rectangular Blocks:: and the function
  1232.      `insert-rect'.
  1233.  
  1234.    ---------- Footnotes ----------
  1235.  
  1236.    (1)  When using an Amiga, unit zero of the `clipboard.device' is
  1237. used. For X11, the first cut-buffer.
  1238.  
  1239. 
  1240. File: jade.info,  Node: Using Blocks,  Next: Searching and Replacing,  Prev: Cutting And Pasting,  Up: Using Jade
  1241.  
  1242. Using Blocks
  1243. ============
  1244.  
  1245.    A "block" is a section of a buffer, you mark it by specifying its
  1246. edges (ie, the first and last characters). This part of the buffer can
  1247. then have various things done to it, for example insert it somewhere
  1248. else.
  1249.  
  1250.    Each window can only have a single block marked at any one time, it
  1251. will be displayed in the reverse of normal text (ie white on black, not
  1252. black on white).
  1253.  
  1254. * Menu:
  1255.  
  1256. * Marking Blocks::        Commands to define the current block
  1257. * Commands on Blocks::        How to work with blocks
  1258. * Rectangular Blocks::        Columns of text as blocks
  1259.  
  1260. 
  1261. File: jade.info,  Node: Marking Blocks,  Next: Commands on Blocks,  Up: Using Blocks
  1262.  
  1263. Marking Blocks
  1264. --------------
  1265.  
  1266.    To mark a block you must specify its outermost points, note that the
  1267. text marked by the block ends one character before the marked position
  1268. (this is so that it easy to mark whole lines).
  1269.  
  1270.    Rectangular blocks are a bit different for more information, see
  1271. *Note Rectangular Blocks::.
  1272.  
  1273.    Note also that block marks shrink and grow as text is deleted and
  1274. inserted inside them, similar to what normal marks do.
  1275.  
  1276.    These are the commands used to mark a block,
  1277.  
  1278. `Ctrl-m'
  1279.      If a block is currently marked in this window it will unmark it.
  1280.      Otherwise it will either mark the beginning or end of the block
  1281.      depending on whether or not a block has previously been partially
  1282.      marked.
  1283.  
  1284.      The normal method for marking a few characters is to first make
  1285.      sure that no block is currently marked (the status line displays
  1286.      the status of the block marks, a `b' means that one end of a block
  1287.      has been marked and a `B' means that both ends of a block are
  1288.      marked in which case it will be highlighted somewhere in the
  1289.      buffer) then press `Ctrl-m' at one end, move the cursor to the
  1290.      opposite end and press `Ctrl-m' again.
  1291.  
  1292. `Meta-m'
  1293.      Set the beginning of the block to the current cursor position.
  1294.  
  1295. `Meta-M'
  1296.      Set the end of the block.
  1297.  
  1298. `Ctrl-x h'
  1299.      Mark the whole of the buffer.
  1300.  
  1301. `ESC @'
  1302.      Mark the current word.
  1303.  
  1304. `ESC h'
  1305.      Mark the current paragraph.
  1306.  
  1307. `Ctrl-SPC'
  1308.      Mark from the position of the auto-mark to the cursor.
  1309.  
  1310.    Another method for marking a block is to use the mouse, double
  1311. clicking the left mouse button on a character has the same effect as
  1312. moving to that character and typing `Ctrl-m'. Similarly, clicking the
  1313. left mouse button while pressing the SHIFT key clears a marked block.
  1314.  
  1315. 
  1316. File: jade.info,  Node: Commands on Blocks,  Next: Rectangular Blocks,  Prev: Marking Blocks,  Up: Using Blocks
  1317.  
  1318. Commands on Blocks
  1319. ------------------
  1320.  
  1321. `Ctrl-i'
  1322.      Inserts the block marked in this window, at the cursor position,
  1323.      then unmarks the block.
  1324.  
  1325. `Ctrl-w'
  1326.      Copies the contents of the marked block to the standard clipboard
  1327.      and then deletes the block.
  1328.  
  1329. `ESC w'
  1330.      Copies the marked block to the standard clipboard, then unmarks
  1331.      the block.  This is a less destructive version of `Ctrl-w'.
  1332.  
  1333. `Ctrl-z'
  1334.      Deletes the text in the currently marked block.
  1335.  
  1336. `Ctrl-x Ctrl-l'
  1337.      Makes all alpha characters in the current block lower case.
  1338.  
  1339. `Ctrl-x Ctrl-u'
  1340.      Makes all characters in the block upper case.
  1341.  
  1342. 
  1343. File: jade.info,  Node: Rectangular Blocks,  Prev: Commands on Blocks,  Up: Using Blocks
  1344.  
  1345. Rectangular Blocks
  1346. ------------------
  1347.  
  1348.    Normally blocks are thought of sequentially from their first to last
  1349. characters, this does not have to be so. It is also possible to mark
  1350. rectangles, the block marks being thought of as the opposite corners of
  1351. the rectangle.
  1352.  
  1353. `Ctrl-M'
  1354.      Toggle between marking sequential and rectangular blocks, each
  1355.      window has its own value for this attribute (ie one window can be
  1356.      marking rectangles while the rest don't).
  1357.  
  1358. `Ctrl-Y'
  1359.      Similar to `Ctrl-y' except that the string inserted is treated as a
  1360.      rectangle -- newline characters don't get inserted, instead the
  1361.      next line is inserted in the next line in the buffer at the same
  1362.      column as that inserted into the previous line. For more details
  1363.      see the function `insert-rect'.
  1364.  
  1365.    At present there is a problem with changing the case of a
  1366. rectangular block with `Ctrl-x Ctrl-l' or `Ctrl-x Ctrl-u', they treat
  1367. it as a sequential block. This will be fixed soon.
  1368.  
  1369. 
  1370. File: jade.info,  Node: Searching and Replacing,  Next: Editing Modes,  Prev: Using Blocks,  Up: Using Jade
  1371.  
  1372. Searching and Replacing
  1373. =======================
  1374.  
  1375.    It is very easy to search any of jade's buffers for a specific
  1376. string, the standard search command will search the current buffer for
  1377. a specified regular expression.
  1378.  
  1379.    Once you have found an occurrence of the string you are looking for
  1380. it is then possible to replace it with something else.
  1381.  
  1382. * Menu:
  1383.  
  1384. * Regular Expressions::        The syntax of regular expressions
  1385. * Commands for Searching::    How to search for regexps
  1386. * Commands for Replacing::    Replacing found regexps
  1387.  
  1388. 
  1389. File: jade.info,  Node: Regular Expressions,  Next: Commands for Searching,  Up: Searching and Replacing
  1390.  
  1391. Regular Expressions
  1392. -------------------
  1393.  
  1394.    Jade uses the regexp(3) package by Henry Spencer, with some
  1395. modifications that I have added. It comes with this heading:
  1396.  
  1397.      Copyright (c) 1986 by University of Toronto.
  1398.      Written by Henry Spencer.  Not derived from licensed software.
  1399.  
  1400.      Permission is granted to anyone to use this software for any
  1401.      purpose on any computer system, and to redistribute it freely,
  1402.      subject to the following restrictions:
  1403.  
  1404.        1. The author is not responsible for the consequences of use of
  1405.           this software, no matter how awful, even if they arise from
  1406.           defects in it.
  1407.  
  1408.        2. The origin of this software must not be misrepresented, either
  1409.           by explicit claim or by omission.
  1410.  
  1411.        3. Altered versions must be plainly marked as such, and must not
  1412.           be misrepresented as being the original software.
  1413.  
  1414.    The syntax of a regular expression (or regexp) is as follows (this
  1415. is quoted from the regexp(3) manual page):
  1416.  
  1417.      A regular expression is zero or more "branches", separated by `|'.
  1418.      It matches anything that matches one of the branches.
  1419.  
  1420.      A branch is zero or more "pieces", concatenated. It matches a
  1421.      match for the first, followed by a match for the second, etc.
  1422.  
  1423.      A piece is an "atom" possibly followed by `*', `+', or `?'.  An
  1424.      atom followed by `*' matches a sequence of 0 or more matches of
  1425.      the atom. An atom followed by `+' matches a sequence of 1 or more
  1426.      matches of the atom. An atom followed by `?' matches a match of
  1427.      the atom, or the null string.
  1428.  
  1429.      An atom is a regular expression in parentheses (matching a match
  1430.      for the regular expression), a "range" (see below), `.' (matching
  1431.      any single character), `^' (matching the null string at the
  1432.      beginning of the input string), `$' (matching the null string at
  1433.      the end of the input string), a `\' followed by a single character
  1434.      (matching that character), or a single character with no other
  1435.      significance (matching that character).
  1436.  
  1437.      A "range" is a sequence of characters enclosed in `[]'. It
  1438.      normally matches any single character from the sequence. If the
  1439.      sequence begins with `^', it matches any single character *not*
  1440.      from the rest of the sequence. If two characters in the sequence
  1441.      are separated by `-', this is shorthand for the full list of ASCII
  1442.      characters between them (e.g. `[0-9]' matches any decimal digit).
  1443.      To include a literal `]' in the sequence, make it the first
  1444.      character (following a possible `^'). To include a literal `-',
  1445.      make it the first or last character.
  1446.  
  1447.    Some example legal regular expressions could be:
  1448.  
  1449. `ab*a+b'
  1450.      Matches an `a' followed by zero or more `b' characters, followed by
  1451.      one or more `a' characters, followed by a `b'. For example,
  1452.      `aaab', `abbbab', etc...
  1453.  
  1454. `(one|two)_three'
  1455.      Matches `one_three' or `two_three'.
  1456.  
  1457. `^cmd_[0-9]+'
  1458.      Matches `cmd_' followed by one or more digits, it must start at the
  1459.      beginning of the line.
  1460.  
  1461.    As well as being matched against, regexps also provide a means of
  1462. "remembering" portions of the string that they match. The first 9
  1463. parenthesised expressions and the whole string that matched are
  1464. recorded so that they can be used later.
  1465.  
  1466.    The main use for this is in the command to replace a previously
  1467. found regexp (`ESC p') and the Lisp functions `regexp-expand',
  1468. `regexp-expand-line' and `replace-regexp'. The string which is given as
  1469. the template (ie, the string that replaces the matched string) is
  1470. expanded inserting these recorded strings where asked to.
  1471.  
  1472.    Each occurrence of `\C' in the template is a candidate for
  1473. expansion. C can be one of:
  1474.  
  1475. `&'
  1476. `0'
  1477.      Replaces the whole substring matched by the regular expression.
  1478.  
  1479. `1' to `9'
  1480.      The numbered parenthesised expression.
  1481.  
  1482. `\'
  1483.      The character `\'.
  1484.  
  1485.    For example, if a regexp of `:([0-9]+):' matches a line
  1486. `foo:123:bar', the expansion template `x_\1' would produce `x_123'.
  1487.  
  1488.