[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In 4.2 Routine Info and 4.4 Completion we showed how IDLWAVE displays the calling sequence and keywords of routines, and completes routine names and keywords. For these features to work, IDLWAVE must know about the accessible routines.
A.1 Routine Definitions | Where IDL Routines are defined. | |
A.2 Routine Information Sources | So how does IDLWAVE know about... | |
A.3 Catalogs | ||
A.4 Load-Path Shadows | Routines defined in several places | |
A.5 Documentation Scan | Scanning the IDL Manuals |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Routines which can be used in an IDL program can be defined in several places:
CALL_EXTERNAL
, linked into IDL via LINKIMAGE
,
or included as dynamically loaded modules (DLMs). Currently IDLWAVE
cannot provide routine info and completion for such external routines.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
To maintain the most comprehensive information about all IDL routines on a system, IDLWAVE collects data from many sources:
idlwave-update-routine-info
) can be used
at any time to rescan all buffers.
idlwave-update-routine-info
) can be used to update the shell
routine data.
Loading routine and catalog information can be a time consuming process,
especially over slow networks. Depending on the system and network
configuration it could take up to 30 seconds. In order to minimize the
wait time upon your first completion or routine info command in a
session, IDLWAVE uses Emacs idle time to do the initialization in six
steps, yielding to user input in between. If this gets into your way,
set the variable idlwave-init-rinfo-when-idle-after
to 0 (zero).
The more routines documented in library and user catalogs, the slower
the loading will be, so reducing this number can help alleviate any long
load times.
10
)
t
)
nil
means scan all buffers for IDL programs when updating
info.
t
)
nil
means query the shell for info about compiled routines.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Catalogs are files containing scanned information on individual routines, including arguments and keywords, calling sequence, file path, class and procedure vs. function type, etc. They represent a way of extending the internal built-in information available for IDL system routines (see section 4.2 Routine Info) to other source collections.
Starting with version 5.0, there are two types of catalogs available with IDLWAVE. The traditional user catalog and the newer library catalogs. Although they can be used interchangeably, the library catalogs are more flexible, and preferred. There are few occasions when a user catalog might be preferred -- read below. Both types of catalogs can coexist without causing problems.
To facilitate the catalog systems, IDLWAVE stores information it gathers
from the shell about the IDL search paths, and can write this
information out automatically, or on-demand (menu Debug->Save Path
Info
). On systems with no shell from which to discover the path
information (e.g. Windows), a library path must be specified in
idlwave-library-path
to allow library catalogs to be located, and
to setup directories for user catalog scan (see section A.3.2 User Catalog for
more on this variable).
t
)
A.3.1 Library Catalogs | ||
A.3.2 User Catalog |
<A NAME="LIBRARY_CATALOGS"></A>
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Library catalogs are files named `.idlwave_catalog' stored in
directories containing .pro
routine files. They are discovered
on the IDL search path and loaded automatically when routine information
is read. Each catalog file documents the routines found in that
directory -- one catalog per directory. Every catalog has a library
name associated with it (e.g. AstroLib). This name will be shown
briefly when the catalog is found, and in the routine info of routines
it documents.
Many popular libraries of routines include such catalog files by default, and so will be automatically discovered. Library catalogs are scanned externally to Emacs using a tool provided with IDLWAVE. Each can be re-scanned independently, depending on how often it changes. Catalogs can easily be made available system-wide with a common source repository, providing uniform routine information, and lifting the burden of scanning from the user (who may not even know they're using a scanned catalog). Since each catalog is independent of the others, they can be re-scanned automatically to gather updates, e.g. in a `cron' job. Scanning is much faster than with the built-in user catalog method. One minor disadvantage: the entire IDL search path is scanned for catalog files every time IDLWAVE starts up, which might be slow over a network.
A Perl tool to create library catalogs is distributed with IDLWAVE:
idlwave_catalog
. It can be called quite simply:
idlwave_catalog MyLib |
This would scan all directories recursively beneath the current and populate them with `.idlwave_catalog' files, tagging the routines found with the name "MyLib". The full usage information:
Usage: idlwave_catalog [-l] [-v] [-d] [-s] [-f] [-h] libname libname - Unique name of the catalog (4 or more alphanumeric characters). -l - Scan local directory only, otherwise recursively catalog all directories at or beneath this one. -v - Print verbose information. -d - Instead of scanning, delete all .idlwave_catalog files here or below. -s - Be silent. -f - Force overwriting any catalogs found with a different library name. -h - Print this usage. |
To re-load the library catalogs on the IDL path, force a system routine
info update using a single prefix to idlwave-update-routine-info
:
C-u C-c C-i.
t
)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The user catalog is the old routine catalog system. It is produced within Emacs, and stored in a single file in the user's home directory (`.idlwave/idlusercat.el' by default). Although library catalogs are more flexible, there may be reasons to prefer a user catalog instead, including:
However, no routine info is available in the user catalog by default; the user must actively complete a scan. In addition, this type of catalog is all or nothing: if a single routine changes, the entire catalog must be rescanned to update it. Creating the user catalog is also much slower than scanning library catalogs.
You can scan any of the directories on the currently known path. Under
Windows and MacOS (not OSX), you need to specify the IDL search path in
the variable idlwave-library-path
, and the location of the IDL
directory (the value of the !DIR
system variable) in the variable
idlwave-system-directory
, like this(11):
(setq idlwave-library-path '("+c:/RSI/IDL56/lib/" "+c:/user/me/idllibs")) (setq idlwave-system-directory "c:/RSI/IDL56/") |
Under GNU and UNIX, these values will be automatically gathered from the IDLWAVE shell.
The command M-x idlwave-create-user-catalog-file (or the menu item `IDLWAVE->Routine Info->Select Catalog Directories' can then be used to create a user catalog. It brings up a widget in which you can select some or all directories on the search path. Directories which already contain a library catalog are marked with `[LIB]', and need not be scanned (although there is no harm if you do so, other than the additional memory used for the duplication).
After selecting directories, click on the `[Scan & Save]'
button in the widget to scan all files in the selected directories and
write out the resulting routine information. In order to update the
library information using the directory selection, call the command
idlwave-update-routine-info
with a double prefix argument:
C-u C-u C-c C-i. This will rescan files in the previously
selected directories, write an updated version of the user catalog file
and rebuild IDLWAVE's internal lists. If you give three prefix
arguments C-u C-u C-u C-c C-i, updating will be done with a
background job(12). You can continue
to work, and the library catalog will be re-read when it is ready. If
you find you need to update the user catalog often, you should consider
building a library catalog for these routines instead (see section A.3.1 Library Catalogs).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
IDLWAVE can compile a list of routines which are defined in several different files. Since one definition will hide (shadow) the others depending on which file is compiled first, such multiple definitions are called "load-path shadows". IDLWAVE has several routines to scan for load path shadows. The output is placed into the special buffer `*Shadows*'. The format of the output is identical to the source section of the routine info buffer (see section 4.2 Routine Info). The different definitions of a routine are listed in the sequence of likelihood of use. So the first entry will be most likely the one you'll get if an unsuspecting command uses that routine. Before listing shadows, you should make sure that routine info is up-to-date by pressing C-c C-i. Here are the different routines:
RESOLVE_ALL
to compile any routines used by
your code, update the routine info inside IDLWAVE with C-c C-i and
then check for shadowing.
For these commands to work fully you need to scan the entire load path in either a user or library catalog. Also, IDLWAVE should be able to distinguish between the system library files (normally installed in `/usr/local/rsi/idl/lib') and any site specific or user specific files. Therefore, such local files should not be installed inside the `lib' directory of the IDL directory. This is also advisable for many other reasons.
Users of Windows and MacOS also must set the variable
idlwave-system-directory
to the value of the !DIR
system
variable in IDL. IDLWAVE appends `lib' to the value of this
variable and assumes that all files found on that path are system
routines.
Another way to find out if a specific routine has multiple definitions on the load path is routine info display (see section 4.2 Routine Info).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
IDLWAVE derives its knowledge about system routines from the IDL manuals. The file `idlw-rinfo.el' contains the routine information for the IDL system routines, and links to relevant sections of the HTML documentation. The Online Help feature of IDLWAVE requires HTML versions of the IDL manuals to be available.
The HTML files and related images can be produced from the `idl.chm' HTMLHelp file distributed with IDL using the free Microsoft HTML Help Workshop. If you are lucky, the maintainer of IDLWAVE will always have access to the newest version of IDL and provide updates. The IDLWAVE distribution also contains the Perl program `get_html_rinfo' which constructs the `idlw-rinfo.el' file by scanning the HTML documents produced from the IDL documentation. Instructions on how to use `get_html_rinfo' are in the program itself.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by XEmacs shared group account on December, 19 2009
using texi2html 1.65.