Cooledit - Frequently Asked Questions (FAQ)

The information in this file is provided without warranty
for its accuracy or completeness. Use of this file or its
information is entirely at your own risk.

  
CONTENTS

     * 1 Introduction and General Information
          + 1.1 What is Cooledit?
          + 1.2 Who has written it?
          + 1.3 Does it run on my machine?
          + 1.4 Does Cooledit require any proprietary libraries to run?
          + 1.5 Is Cooledit copyrighted? What is the licensing agreement?
          + 1.6 What is the latest version of Cooledit?
          + 1.7 Can Cooledit be ported to Gtk?
          + 1.8 What is Python and its relevance to Cooledit?
          + 1.9 Should I worry about cutting-edge/BETA releases?
     * 2 Network Sources and Resources
          + 2.1 Where can I get Cooledit?
          + 2.2 Where can I get Python?
          + 2.3 Does Cooledit have a mailing list?
          + 2.4 Does Cooledit have a world wide web home-page?
          + 2.5 What other applications are called 'cooledit'?
     * 3 Common Problems
          + 3.1 How do I get the commands from the 'Scripts' menu to work?
          + 3.2 How do I get the man page browser to work?
          + 3.3 The man page browser displays the man page, but gives a warning.
          + 3.4 In what ways does Cooledit behave differently to other X applications?
          + 3.5 How do I get Emacs key-bindings, or bindings of other editors?
          + 3.6 How do I get function keys F13 and up with my keyboard?
          + 3.7 How do I paste into an input widget like the file browser input line?
          + 3.8 How do I get my Alt/Meta key to work?
          + 3.9 Why do my other drag and drop applications not work with Cooledit?
          + 3.10 Where can I get more info on drag and drop?
          + 3.11 How do I get mail to work?
          + 3.12 How do I do regular expression substring replaces?
          + 3.13 Why does Cooledit die occasionally for no reason?
     * 4 International Characters
          + 4.1 How do I enable international character support?
          + 4.2 How do I compose and insert international characters?
          + 4.3 My keyboard doesn't have a right-control key.
          + 4.4 Where can I get more information on UNIX and ISO?
     * 5 Coolicon
          + 5.1 How do I get the 3D rotating `e' to work?
     * 6 Syntax Highlighting
          + 6.1 How does the syntax highlighting work?
          + 6.2 How fast is the syntax highlighting?
     * 7 Debugger
          + 7.1 How does Cooledit manage to be a debugger?
          + 7.2 How do I insert a watch point?
          + 7.3 How do I enter other commands not shown in the menu?


     _________________________________________________________________
  
1 INTRODUCTION AND GENERAL INFORMATION
                                      
1.1 What is Cooledit?

   Cooledit is a full-featured text editor, for Unix computers that run
   the X Window System. Cooledit was born from a need for a user
   friendly text editor that would rival editors of other operating
   systems in ease of use and convenience. Lately Cooledit is also a
   powerful programmer's editor. It is also small and fast, making it
   ideal for interface with applications that allow for, or require, an
   external editor. See 'Features' in the man page for a more elaborate
   description of what Cooledit can do.
  
1.2 Who has written it?

   Cooledit was written by Paul Sheer. A few odd C functions and the
   regular expression library were taken from Rxvt, Dnd and the Midnight
   Commander (thanks guys). Their respective authors are acknowledged in
   the source. See THANKS in the man page for help that I received from
   users.

1.3 Does it run on my machine?

   Cooledit was initially written only for Linux, but now uses GNU
   autoconf, and will therefore compile under any Unix compatible
   system, provided that system is running the X Window System, Version
   11. If it doesn't compile or run as expected, please email me ASAP.
   Cooledit does not require any of the X11 extensions that many other
   programs need to compile or run. Cooledit has run on all the
   computer's listed in the man page.

1.4 Does Cooledit require any proprietary libraries to compile/run?

   No. Cooledit requires only the basic X11 library (libX11) to run
   which is available as free-ware. On some systems this may mean
   linking with addition basic libraries (like libsocket?), which are
   automatically determined by the ./configure script. In particular,
   note that Cooledit does not require the Motif (libXm) library which
   is not yet available for free.

1.5 Is Cooledit copyrighted? What is the licensing agreement?

   Cooledit is licensed under the GNU GENERAL PUBLIC LICENSE. This means
   that you can freely distribute Cooledit under certain conditions. The
   file COPYING contains the full licensing agreement. You are advised
   to read this license to be sure of your restrictions and obligations
   when modifying or distributing Cooledit.

1.6 What is the latest version of Cooledit?

    The distribution that this README file was packed into is
	Cooledit Version 3.11.6
    created on
	11 July 1999
    See 'Where can I get Cooledit?' below.

1.7 Can Cooledit be ported to Gtk?

   Cooledit and Coolwidgets are deeply integrated since they were
   developed simaltaneously. Cooledits behaviour has been honed at a low
   level. To port to any other widget library would be close to a
   complete rewrite. The editor widget itself is however running under
   Gnome. This is not the complete Cooledit application, but a version
   of Cooledit that works under the Midnight Commander (text mode) and
   under the Gnome verison of the Midnight Commander.

1.8 What is Python and its relevance to Cooledit?

   Python is an object orientated scripting language. (It can be
   compared to Java but has a much more elegant and intuative design.)
   It has the most succinct, sensable and readable syntax of any other
   programming language whether interpreted or compiled. It suites rapid
   application development (RAD) because it is easy to learn, because
   Python applications are easy to maintain, and because it is simply
   takes less time to do anything in Python than with anything else.

   In the same way that Emacs uses lisp for writing extensions, and
   Nedit has a macro programming language, Cooledit now can be custom
   programmed with Python. This is an extremely powerful addition, since
   all of Python's many extensions are available to Cooledit.

   The Python home page is http://www.python.org/
   Cooledit requires Python version 1.5

1.9 Should I worry about cutting-edge/BETA releases?

   If I add something that has a general influence on the stability
   of Cooledit, then I will normally release this with an announcement
   indicating that the software is BETA. This is rare. Usually new
   versions contain isolated features so if you want to be really
   safe, check for what features are new and avoid them. If a specific
   problem arises, get the latest release and see if that has been
   fixed. Probably few users use all of Cooledit's features, hence
   you should pick a version that you feel happy with and upgrade from
   time to time to check what useful new stuff has been added.

2 NETWORK SOURCES AND RESOURCES

2.1 Where can I get Cooledit?

   The latest stable release can be obtained from
       ftp://sunsite.unc.edu/pub/Linux/apps/editors/X
       http://www.netins.net/showcase/Comput-IT/cooledit/index.html
   The latest development version can be obtained from
       ftp://lava.obsidian.co.za/pub/unix/cooledit

2.1 Where can I get Python?

   The Python home page is http://www.python.org/
   There you will find a list of the many mirror sites
   around the world.
   Cooledit requires Python version 1.5

2.3 Does Cooledit have a mailing list?

   The mailing list is
       cooledit@mail.obsidian.co.za

   To subscribe, email
	majordomo@mail.obsidian.co.za
   with the following line in the body of the message:
       subscribe cooledit

2.4 Does Cooledit have a world wide web home-page?

   Yes. The Cooledit page is now up and can be viewed at
       http://www.netins.net/showcase/Comput-IT/cooledit/index2.html  (?)
       http://www.netins.net/showcase/Comput-IT/cooledit/index.html
       http://www.obsidian.co.za/cooledit
   This has some nice screen shots of Cooledit.

2.5 What other applications are called 'cooledit'?

   I havn't done a search myself, but users tell me that a program
   'cooledit', for editing sound files, exists for one non-unix
   operating system. Since this application has a complete different
   function to Cooledit, this should cause no problem.

3 COMMON PROBLEMS

3.1 How do I get the commands from the 'Scripts' menu to work?

   If a script doesn't function properly, try run it stand-alone from a
   terminal to see what happens. Some of the scripts are not standard
   Unix commands and require installation of other free-ware packages.
   You may need to install

      ispell
      indent
      latex
      xdvi
      rxvt
      ghostview
      dvips

   (Look on you local  sunsite  or  tsx  mirror for these and other
   free-ware packages.) You can edit the script from the Script menu.
   Look at the script's text and try run the script (make appropriate
   substitutions for the filenames) from a terminal. This will usually
   indicate the problem.

3.2 How do I get the man page browser to work?

    (As of version 3.3.3, the configure script automatically
     checks if man accepts '-a')
   Look in the file ~/cedit/.cooledit.ini
   Somewhere in the file is the line:
       option_man_cmdline = man -a %m
  
   You should try:
       Start cooledit from a terminal.
       See your man man-page (type  man man  at the terminal) to see if
           command-line options or environment variables are needed.
       See if the -a option is supported.

   Then see if the command-line needs changing.

3.3 The man page browser displays the man page, but gives a warning.

   This can safely be ignored.

3.4 In what ways does Cooledit behave differently to other X applications.

   Cooledit is more similar to applications from 'other' operating systems
   than to standard X applications.

   - Only two mouse buttons are supported. Mouse button 1 is recognised as
       the 'Left' button, while all other buttons are recognized as the
       'Right' button. Under the Options menu you can however set the middle
       mouse button to paste.
   - Double clicking is synonymous with acknowledgement or pressing Enter.
   - The Tab key is always used to cycle between items in a dialog box.
       The arrow keys can also be used where they are not bound to some
       other function. Shift-Tab or back-tab is used to cycle backward.
   - Shift-arrow text highlighting works along with its well known keys:
       Control-Ins and Shift-Ins. In addition Alt/Meta-Ins brings up
       a cut and paste history which is very useful.
   - Dragging and dropping bits of text poses the problem of how to
       tell if the user wants to copy or to move the text being highlighted:
       use the Left mouse button to copy and the right mouse button to move
       ('move' = 'copy and then delete the original'). Dragging always works
       by highlighting the text with the mouse or cursor keys, and then
       Clicking (with the appropriate button) and dragging from within
       the highlighted region.
   - Clicking with button 2 to copy text from another application doesn't
       work --- instead you must use Shift-Insert. If text is highlighted
       in another application it will then be inserted at the cursor.
       Under the Options menu you can however set the middle mouse button
       to paste. Cooledit also does not discriminate between different kinds
       of data, so any data being copied to Cooledit will be accepted and
       inserted.
   - Copying of text to another application works as usual: highlight it
       with the mouse and click the middle mouse button in the window of
       the application. You can also highlight it with the arrow keys and
       press Control-Ins, and then click the middle mouse button in the
       window of the application.
   - Regular expression substring replaces are not like other Unix editors.
       See under `How do I do regular expression substring replaces?'.

3.5 How do I get Emacs key-bindings, or bindings of other editors?

   The key learning dialog box is easy to use. Just go through the list,
   pressing the keys you would like. Double key combinations will not
   work however.

   Cooledit now contains a builtin Python interpretor which can be used
   to program double key combinations and effectively emulate any other
   editor. Anybody want to create a vi emulation?

3.6 How do I get function keys F13 and up with my keyboard?

   Shift with a function key is analogous to adding 10 to the function
   key. i.e. Shift-F3 is F13 etc.

3.7 How do I paste into an input widget like the file browser input line?

   Press Shift-Insert in the input line.

3.8 How do I get my Alt/Meta key to work?

   On some machines, what the system thinks is an Alt/Meta key is
   actually one of the other hyper keys (on my Sun I have to use the key
   with the diamond on it). Try using one of these other keys as a
   Alt/Meta. The header file  global.h  contains the definition of the
   Alt/Meta key which you can change if you know what you are doing.

3.9 Why do my other drag and drop applications not work with Cooledit?

   The freeware community is adopting a new drag and drop protocol
   called XDND. Cooledit now works with this protocol only. It supports
   version 0, 1 and 2 of the protocol, although I have not tested it
   with versions below 2. Just when I had it working with version 2 of
   this protocol, the XDND team adopted a new version 3, which I haven't
   been able to get working. When more XDND applications come out (Qt is
   said to be going XDND) then I will have a more thorough test-bed for
   version 3 of the protocol and will probably be able to get this
   working.

3.10 Where can I get more info on drag and drop?

   http://www.cco.caltech.edu/~jafl/xdnd/

3.11 How do I get mail to work?

   If mail doesn't work, your mail command probably doesn't support one
   of the command line options (see the mail dialog). You will have to
   create a mail script that ignores these options. The command is not
   currently configurable. Watch cooledit's stdout when sending mail to
   see mail error messages.

3.12 How do I do regular expression substring replaces?

   Substrings are specified between ( and ) braces. Use \( to specify a
   literal (. %s can be used to insert a substring into the replacement
   string. Use %% for a literal %. Use the third field of the
   replacement dialog box to enter the order in which the substrings
   will be inserted, eg.
       3,4,1,3
   This is different to sed replacements which use \( \) for substrings
   and \1, \2 ... for replacements. Also see the man page for an example.

3.13 Why does Cooledit die occasionally for no reason?

If you have bad RAM or some kind of hardware problem it will be
noticeable when you do kernel compiles. It will also be noticeable when
you use Cooledit because of the very wierd way Cooledit shuffles memory
around.

I have noticed that Cooledit can crash after being up for several weeks
non stop. If anyone can send me a backtrace it would be appreciated. I
am not sure if this is a Cooledit problem though.

4 INTERNATIONAL CHARACTERS

4.1 How do I enable international character support?

   International character support has changed as of version 3.10, and
   now properly uses the libc6 locale functionality. Hence you should
   set the LANG and LC_ALL environment variables to reflect your locale,
   and install the appropriate locale files. Most distributions will
   have these locale files installed already in say
       /usr/share/i18n/locales/
   You can then type
       export LC_ALL=cs_CZ
       export LANG=cs_CZ
       cooledit

   A full list of locales on my system is: POSIX, cs_CZ, da_DK, de_AT,
   de_BE, de_CH, de_DE, de_LU, el_GR, en_AU, en_CA, en_DK, en_GB, en_IE,
   en_NZ, en_US, en_ZA, es_AR, es_BO, es_CL, es_CO, es_DO, es_EC, es_ES,
   es_GT, es_HN, es_MX, es_PA, es_PE, es_PY, es_SV, es_US, es_UY, es_VE,
   et_EE, eu_ES, fi_FI, fo_FO, fr_BE, fr_CA, fr_CH, fr_FR, fr_LU, ga_IE,
   he_IL, hr_HR, hu_HU, id_ID, in_ID, is_IS, it_CH, it_IT, iw_IL, ja_JP,
   kl_GL, lt_LT, lv_LV, nl_BE, nl_NL, no_NO, pl_PL, pt_BR, pt_PT, ro_RO,
   ru_RU, ru_SU, ru_UA, sk_SK, sl_SI, sr_YU, sv_FI, sv_SE, tr_TR, uk_UA,
   zh_CN.

   You should also choose an appropriate font for your locale if it
   requires other than the normal iso8859-1 character set, such as the
   koi8 fonts for Russian language support. For example,
       cooledit -font '-cronyx-fixed-medium-r-normal--20-200-75-75-c-100-koi8-r'

   If you don't want to bother with a proper locale setting, but just
   want to display characters above 128, set the `Display characters
   outside of locale' in the Options --> Switches menu.

   The setlocale(3) man page contains a few sketchy details on locale
   support.

4.2 How do I compose and insert international characters?

   Use Right-Control and the character that the international
   character most looks like. Then press a second character that
   would compose that character typographically.
       Eg. Ctrl-a o inserts a ''
   The file INTERNATIONAL in the source distribution contains a
   complete list of character compositions. Note that cooledit does
   not compose characters in a standard way.

4.3 My keyboard doesn't have a right-control key.

   The header file  global.h  contains the definition of the Compose
   key which you can change to one of the others in the list of examples.
   You will have to recompile though with
       make clean
       make
       make install
   For the change to take effect.
   (you can, alternatively, just remove the file coolnext.o to re-make.)

4.4 Where can I get more information on UNIX and ISO?

   See the 'ISO 8859-1  National Character Set FAQ'
   The most recent version of this document is available via anonymous
   ftp from ftp.vlsivie.tuwien.ac.at under the file name
       /pub/8bit/FAQ-ISO-8859-1"

5 COOLICON

5.1 How do I get the 3D rotating `e' to work?

   The coolicon man page describes this.

6 SYNTAX HIGHLIGHTING

6.1 How does the syntax highlighting work?

   Syntax highlighting does not work the way you expect it does --- the
   colors of each character that you see on the screen are not stored
   anywhere within cooledit. Rather when the character is rendered, its
   colour is looked up from its context using a highly optimised
   algorithm.

   This means that syntax highlighting is not being calculated as you
   press keys or modify text. It is being calculated with each redraw of
   a character. This imposes certain limitations on the kind of syntax
   highlighting rules that are possible, but, with a little imagination,
   a rich and elegant description of your language can be created.

6.2 How fast is the syntax highlighting?

   Python and C code are parsed at a 350kB per second on a PII300. Perl
   code at 250kB per second. (In the sense that paging to the bottom of
   the 1M file will take 3 or 4 seconds.) However, the speed is highly
   dependent on the number of rules as well as the content of the text
   itself.

7 DEBUGGER

7.1 How does Cooledit manage to be a debugger?

   Cooledit has no builtin support for debugging executables. It
   interfaces with gdb by sending gdb the commands that one normally
   types into gdb's text interface.

   As such, newer versions of gdb may break the interface by sending
   unexpected output. It is unlikely (??) that the gdb maintainers would
   change the error reporting though.

   Hence, you should not expect the robustness of a proper debugger. For
   instance, breakpoints will not be removed if you close an edit
   window, nor will changes to a file be noticed by gdb - you have to
   rebuild and rerun your executable or even kill the debugger from the
   Debug menu.

7.2 How do I insert a watch point?

   Add a new variable to your display list `Display variable...' from
   the `Debug' menu.

   A text box will appear (if one is not already open). You can set a
   watch point by hitting `Ins' inside the textbox with the cursor over
   the variable of your choice. It will then be highlighted in blue.

7.3 How do I enter other commands not shown in the menu?

   You can insert any command you want with Ctrl-F1 (`Enter command...').
   See the gdb info pages (info gdb) for everything else that gdb can do.


