diff options
| author | Carsten Dominik | 2000-12-11 12:41:49 +0000 |
|---|---|---|
| committer | Carsten Dominik | 2000-12-11 12:41:49 +0000 |
| commit | aea44e56dc3f2be2abe2aee46963caf57d872936 (patch) | |
| tree | 86e28dba992e37969f86099fe72a5735fc0f2243 /man | |
| parent | 169fe44e5619260f5d5cbd5f7c9f4eb58ac01bb2 (diff) | |
| download | emacs-aea44e56dc3f2be2abe2aee46963caf57d872936.tar.gz emacs-aea44e56dc3f2be2abe2aee46963caf57d872936.zip | |
Updated IDLWAVE manual to version 4.7
Diffstat (limited to 'man')
| -rw-r--r-- | man/idlwave.texi | 560 |
1 files changed, 482 insertions, 78 deletions
diff --git a/man/idlwave.texi b/man/idlwave.texi index b504a193153..8fadb52d049 100644 --- a/man/idlwave.texi +++ b/man/idlwave.texi | |||
| @@ -9,12 +9,12 @@ | |||
| 9 | @synindex ky cp | 9 | @synindex ky cp |
| 10 | @syncodeindex vr cp | 10 | @syncodeindex vr cp |
| 11 | @syncodeindex fn cp | 11 | @syncodeindex fn cp |
| 12 | @set VERSION 4.2 | 12 | @set VERSION 4.7 |
| 13 | @set EDITION 4.2 | 13 | @set EDITION 4.7 |
| 14 | @set IDLVERSION 5.3 | 14 | @set IDLVERSION 5.4 |
| 15 | @set NSYSROUTINES 1251 | 15 | @set NSYSROUTINES 1287 |
| 16 | @set NSYSKEYWORDS 5287 | 16 | @set NSYSKEYWORDS 5724 |
| 17 | @set DATE June 2000 | 17 | @set DATE December 2000 |
| 18 | @set AUTHOR Carsten Dominik | 18 | @set AUTHOR Carsten Dominik |
| 19 | @set AUTHOR-EMAIL dominik@@astro.uva.nl | 19 | @set AUTHOR-EMAIL dominik@@astro.uva.nl |
| 20 | @set MAINTAINER Carsten Dominik | 20 | @set MAINTAINER Carsten Dominik |
| @@ -108,6 +108,7 @@ shell. | |||
| 108 | @menu | 108 | @menu |
| 109 | * Introduction:: What IDLWAVE is and what not | 109 | * Introduction:: What IDLWAVE is and what not |
| 110 | * IDLWAVE in a Nutshell:: One page quick-start guide | 110 | * IDLWAVE in a Nutshell:: One page quick-start guide |
| 111 | * Getting Started:: Tutorial | ||
| 111 | * The IDLWAVE Major Mode:: The mode to edit IDL programs | 112 | * The IDLWAVE Major Mode:: The mode to edit IDL programs |
| 112 | * The IDLWAVE Shell:: The mode to run IDL as inferior program | 113 | * The IDLWAVE Shell:: The mode to run IDL as inferior program |
| 113 | * Installation:: How to Install or Upgrade | 114 | * Installation:: How to Install or Upgrade |
| @@ -155,6 +156,7 @@ Debugging IDL Programs | |||
| 155 | 156 | ||
| 156 | * Compiling Programs:: Compiling buffers under the shell | 157 | * Compiling Programs:: Compiling buffers under the shell |
| 157 | * Breakpoints and Stepping:: Deciding where to stop and look | 158 | * Breakpoints and Stepping:: Deciding where to stop and look |
| 159 | * Walking the Calling Stack:: From where was this routine called? | ||
| 158 | * Examining Variables:: What is the value now? | 160 | * Examining Variables:: What is the value now? |
| 159 | 161 | ||
| 160 | Installation | 162 | Installation |
| @@ -167,7 +169,7 @@ Sources of Routine Info | |||
| 167 | 169 | ||
| 168 | * Routine Definitions:: Where IDL Routines are defined. | 170 | * Routine Definitions:: Where IDL Routines are defined. |
| 169 | * Routine Information Sources:: So how does IDLWAVE know about... | 171 | * Routine Information Sources:: So how does IDLWAVE know about... |
| 170 | * Library Scan:: Scanning the Libraries for Routine Info | 172 | * Library Catalog:: Scanning the Libraries for Routine Info |
| 171 | * Load-Path Shadows:: Routines defined in several places | 173 | * Load-Path Shadows:: Routines defined in several places |
| 172 | * Documentation Scan:: Scanning the IDL Manuals | 174 | * Documentation Scan:: Scanning the IDL Manuals |
| 173 | 175 | ||
| @@ -269,10 +271,8 @@ things. For a full description of what a particular variable does and | |||
| 269 | how to configure it, see the documentation string of that variable. | 271 | how to configure it, see the documentation string of that variable. |
| 270 | Some configuration examples are also given in the appendix. | 272 | Some configuration examples are also given in the appendix. |
| 271 | 273 | ||
| 272 | @node IDLWAVE in a Nutshell, The IDLWAVE Major Mode, Introduction, Top | 274 | @node IDLWAVE in a Nutshell, Getting Started, Introduction, Top |
| 273 | @chapter IDLWAVE in a Nutshell | 275 | @chapter IDLWAVE in a Nutshell |
| 274 | @cindex Quick-Start | ||
| 275 | @cindex Getting Started | ||
| 276 | @cindex Summary of important commands | 276 | @cindex Summary of important commands |
| 277 | @cindex IDLWAVE in a Nutshell | 277 | @cindex IDLWAVE in a Nutshell |
| 278 | @cindex Nutshell, IDLWAVE in a | 278 | @cindex Nutshell, IDLWAVE in a |
| @@ -337,18 +337,345 @@ at point. | |||
| 337 | ;; Pad some operators with spaces | 337 | ;; Pad some operators with spaces |
| 338 | (setq idlwave-do-actions t | 338 | (setq idlwave-do-actions t |
| 339 | idlwave-surround-by-blank t) | 339 | idlwave-surround-by-blank t) |
| 340 | ;; Automatically expand END to ENDIF, ENDELSE, ... | ||
| 341 | (setq idlwave-expand-generic-end t) | ||
| 342 | ;; Syntax Highlighting | 340 | ;; Syntax Highlighting |
| 343 | (add-hook 'idlwave-mode-hook 'turn-on-font-lock) | 341 | (add-hook 'idlwave-mode-hook 'turn-on-font-lock) |
| 344 | ;; Automatically start the shell when needed, in dedicated frame | 342 | ;; Automatically start the shell when needed |
| 345 | (setq idlwave-shell-automatic-start t | 343 | (setq idlwave-shell-automatic-start t) |
| 346 | idlwave-shell-use-dedicated-frame t) | 344 | ;; Bind debugging commands with CONTROL and SHIFT modifiers |
| 345 | (setq idlwave-shell-debug-modifiers '(control shift)) | ||
| 347 | ;; Where are the online help files? | 346 | ;; Where are the online help files? |
| 348 | (setq idlwave-help-directory "~/.idlwave") | 347 | (setq idlwave-help-directory "~/.idlwave") |
| 349 | @end lisp | 348 | @end lisp |
| 350 | 349 | ||
| 351 | @node The IDLWAVE Major Mode, The IDLWAVE Shell, IDLWAVE in a Nutshell, Top | 350 | @node Getting Started, The IDLWAVE Major Mode, IDLWAVE in a Nutshell, Top |
| 351 | @chapter Getting Started (Tutorial) | ||
| 352 | @cindex Quick-Start | ||
| 353 | @cindex Tutorial | ||
| 354 | @cindex Getting Started | ||
| 355 | |||
| 356 | @section Lession I: Development Cycle | ||
| 357 | |||
| 358 | The purpose of this tutorial is to guide you through a very basic | ||
| 359 | development cycle with IDLWAVE. We will type a simple program into a | ||
| 360 | buffer and use the shell to compile, debug and run this program. On the | ||
| 361 | way we will use the most important commands in IDLWAVE. Note | ||
| 362 | however that there is much more funtionality available in IDLWAVE than | ||
| 363 | we cover here, and it will pay off greatly if eventually you go further | ||
| 364 | and read the whole manual. | ||
| 365 | |||
| 366 | I assume that you have access to Emacs or XEmacs with the full IDLWAVE | ||
| 367 | package including online help (@pxref{Installation}). I also assume | ||
| 368 | that you are familiar with Emacs and can read the nomenclature of key | ||
| 369 | presses in Emacs (in particular, @kbd{C} stands for @key{CONTROL} and | ||
| 370 | @kbd{M} for @key{META} (often the @key{ALT} key carries this | ||
| 371 | functionality)). | ||
| 372 | |||
| 373 | Open a new source file by typing | ||
| 374 | |||
| 375 | @example | ||
| 376 | @kbd{C-x C-f tutorial.pro @key{RET}} | ||
| 377 | @end example | ||
| 378 | |||
| 379 | A buffer for this file will pop up, and it should be in IDLWAVE mode. | ||
| 380 | You can see this by looking at the mode line, just below the editing | ||
| 381 | window. Also, the menu bar should contain entries @samp{IDLWAVE} and | ||
| 382 | @samp{Debug}. | ||
| 383 | |||
| 384 | Now cut-and-paste the following program, also available as | ||
| 385 | @file{tutorial.pro} in the IDLWAVE distribution. | ||
| 386 | |||
| 387 | @example | ||
| 388 | function daynr,d,m,y | ||
| 389 | ;; compute a sequence number for a date | ||
| 390 | ;; works 1901-2099. | ||
| 391 | if y lt 100 then y = y+1900 | ||
| 392 | if m le 2 then delta = 1 else delta = 0 | ||
| 393 | m1 = m + delta*12 + 1 | ||
| 394 | y1 = y * delta | ||
| 395 | return, d + floor(m1*30.6)+floor(y1*365.25)+5 | ||
| 396 | end | ||
| 397 | |||
| 398 | function weekday,day,month,year | ||
| 399 | ;; compute weekday number for date | ||
| 400 | nr = daynr(day,month,year) | ||
| 401 | return, nr mod 7 | ||
| 402 | end | ||
| 403 | |||
| 404 | pro plot_wday,day,month | ||
| 405 | ;; Plot the weekday of a date in the first 10 years of this century. | ||
| 406 | years = 2000,+indgen(10) | ||
| 407 | wdays = intarr(10) | ||
| 408 | for i=0,n_elements(wdays)-1 do begin | ||
| 409 | wdays[i] = weekday(day,month,years[i]) | ||
| 410 | end | ||
| 411 | plot,years,wdays,YS=2,YT="Wday (0=sunday)" | ||
| 412 | end | ||
| 413 | @end example | ||
| 414 | |||
| 415 | The indentation probably looks funny, since it's different from the | ||
| 416 | settings you use, so use the @key{TAB} key in each line to automatically | ||
| 417 | line it up (or more quickly @emph{select} the entire buffer with | ||
| 418 | @kbd{C-x h} followed by @kbd{M-C-\}). Notice how different syntactical | ||
| 419 | elements are highlighted in different colors, if you have set up support | ||
| 420 | for font-lock. | ||
| 421 | |||
| 422 | Let's check out two particular editing features of IDLWAVE. Place the | ||
| 423 | cursor after the @code{end} statement of the @code{for} loop and press | ||
| 424 | @key{SPC}. IDLWAVE blinks back to the beginning of the block and | ||
| 425 | changes the generic @code{end} to the specific @code{endfor} | ||
| 426 | automatically. Now place the cursor in any line you would like to split | ||
| 427 | into two and press @kbd{M-@key{RET}}. The line is split at the cursor | ||
| 428 | position, with the continuation @samp{$} and indentation all taken care | ||
| 429 | of. Use @kbd{C-/} to undo the last change. | ||
| 430 | |||
| 431 | The procedure @code{plot_wday} is supposed to plot the weekday of a given | ||
| 432 | date for the first 10 years of the 21st century. I have put in a few | ||
| 433 | bugs which we are going to fix now. | ||
| 434 | |||
| 435 | First, let's launch the IDLWAVE shell. You do this with the command | ||
| 436 | @kbd{C-c C-s}. The Emacs window will split and display IDL running in a | ||
| 437 | shell interaction buffer. Type a few commands like @code{print,!PI} to | ||
| 438 | convince yourself that you can work there like in an xterminal, or the | ||
| 439 | IDLDE. Use the arrow keys to cycle through your command history. Are | ||
| 440 | we having fun now? | ||
| 441 | |||
| 442 | Now go back to the source window and type @kbd{C-c C-d C-c} to compile | ||
| 443 | the program. If you watch the shell buffer, you see that IDLWAVE types | ||
| 444 | @samp{.run tutorial.pro} for you. But the compilation fails because | ||
| 445 | there is a comma in the line @samp{years=...}. The line with the error | ||
| 446 | is highlighted and the cursor positioned at the error, so remove the | ||
| 447 | comma (you should only need to hit Delete!). Compile again, using the | ||
| 448 | same keystrokes as before. Notice that the file is saved for you. This | ||
| 449 | time everything should work fine, and you should see the three routines | ||
| 450 | compile. | ||
| 451 | |||
| 452 | Now we want to use the command to plot the weekdays for January 1st. We | ||
| 453 | could type the full command ourselves, but why do that? Go back to the | ||
| 454 | shell window, type @samp{plot_} and hit @key{TAB}. After a bit of a | ||
| 455 | delay (while IDLWAVE initializes its routine info database), the window | ||
| 456 | will split to show all procedures it knows starting with that string, | ||
| 457 | and @w{@code{plot_wday}} should be one of them. Saving the buffer was | ||
| 458 | enough to tell IDLWAVE about this new routine. Click with the middle | ||
| 459 | mouse button on @code{plot_wday} and it will be copied to the shell | ||
| 460 | buffer, or if you prefer, add @samp{w} to @samp{plot_} to make it | ||
| 461 | unambiguous, hit @key{TAB}, and the full routine name will be completed. | ||
| 462 | Now provide the two arguments: | ||
| 463 | |||
| 464 | @example | ||
| 465 | plot_wday,1,1 | ||
| 466 | @end example | ||
| 467 | |||
| 468 | |||
| 469 | and press @key{RET}. This fails with an error message telling you the | ||
| 470 | @code{YT} keyword to plot is ambiguous. What are the allowed keywords | ||
| 471 | again? Go back to the source window and put the cursor into the `plot' | ||
| 472 | line, and press @kbd{C-c ?}. This pops up the routine info window for | ||
| 473 | the plot routine, which contains a list of keywords, and the argument | ||
| 474 | list. Oh, we wanted @code{YTITLE}. Fix that up. Recompile with | ||
| 475 | @kbd{C-c C-d C-c}. Jump back into the shell with @kbd{C-c C-s}, press | ||
| 476 | the @key{UP} arrow to recall the previous command and execute again. | ||
| 477 | |||
| 478 | This time we get a plot, but it is pretty ugly -- the points are all | ||
| 479 | connected with a line. Hmm, isn't there a way for @code{plot} to use | ||
| 480 | symbols instead? What was that keyword? Position the cursor on the | ||
| 481 | plot line after a comma (where you'd normally type a keyword), and hit | ||
| 482 | @kbd{M-@key{Tab}}. A long list of plot's keywords appears. Aha, there | ||
| 483 | it is, @code{PSYM}. Middle click to insert it. An @samp{=} sign is | ||
| 484 | included for you too. Now what were the values of @code{PSYM} supposed | ||
| 485 | to be? With the cursor on or after the keyword, press @kbd{M-?} for | ||
| 486 | online help (alternatively, you could have right clicked on the colored | ||
| 487 | keyword itself in the completion list). The online help window will pop | ||
| 488 | up showing the documentation for the @code{PYSM} keyword. Ok, let's use | ||
| 489 | diamonds=4. Fix this, recompile (you know the command by now: @kbd{C-c | ||
| 490 | C-d C-c}, go back to the shell (if it's vanished, you know the command | ||
| 491 | to recall it by now: @kbd{C-c C-s}) and execute again. Now things look | ||
| 492 | pretty good. | ||
| 493 | |||
| 494 | Lets try a different day - how about April fool's day? | ||
| 495 | |||
| 496 | @example | ||
| 497 | plot_wday,1,4 | ||
| 498 | @end example | ||
| 499 | |||
| 500 | Oops, this looks very wrong. All April fool's days cannot be | ||
| 501 | Fridays! We've got a bug in the program, perhaps in the @code{daynr} | ||
| 502 | function. Lets put a breakpoint on the last line there. Position the | ||
| 503 | cursor on the @samp{return, d+...} line and press @kbd{C-c C-d C-b}. | ||
| 504 | IDL sets a breakpoint (as you see in the shell window), and the line is | ||
| 505 | highlighted in some way. Back to the shell buffer, re-execute the | ||
| 506 | previous command. IDL stops at the line with the breakpoint. Now hold | ||
| 507 | down the SHIFT key and click with the middle mouse button on a few | ||
| 508 | variables there: @samp{d}, @samp{y}, @samp{m}, @samp{y1}, etc. Maybe | ||
| 509 | @code{d} isn't the correct type. CONTROL-SHIFT middle-click on it for | ||
| 510 | help. Well, it's an integer, so that's not the problem. Aha, @samp{y1} | ||
| 511 | is zero, but it should be the year, depending on delta. Shift click | ||
| 512 | @samp{delta} to see that it's 0. Below, we see the offending line: | ||
| 513 | @samp{y1=y*delta...} the multiplication should have been a minus sign! | ||
| 514 | So fix the line to | ||
| 515 | |||
| 516 | @example | ||
| 517 | y1 = y - delta | ||
| 518 | @end example | ||
| 519 | |||
| 520 | Now remove all breakpoints: @kbd{C-c C-d C-a}. Recompile and rerun the | ||
| 521 | command. Everything should now work fine. How about those leap years? | ||
| 522 | Change the code to plot 100 years and see that every 28 years, the | ||
| 523 | sequence of weekdays repeats. | ||
| 524 | |||
| 525 | @section Lession II: Customization | ||
| 526 | |||
| 527 | Emacs is probably the most customizable piece of software available, and | ||
| 528 | it would be a shame if you did not make use of this and adapt IDLWAVE to | ||
| 529 | your own preferences. Customizing Emacs or IDLWAVE means that you have | ||
| 530 | to set Lisp variables in the @file{.emacs} file in your home directory. | ||
| 531 | This looks scary to many people because of all the parenthesis. | ||
| 532 | However, you can just cut and paste the examples given here and work | ||
| 533 | from there. | ||
| 534 | |||
| 535 | Lets first use a boolean variable. These are variables which you turn | ||
| 536 | on or off, much like a checkbox. A value of @samp{t} means on, a | ||
| 537 | value of @samp{nil} means off. Copy the following line into your | ||
| 538 | @file{.emacs} file, exit and restart Emacs. | ||
| 539 | |||
| 540 | @lisp | ||
| 541 | (setq idlwave-reserved-word-upcase t) | ||
| 542 | @end lisp | ||
| 543 | |||
| 544 | When this option is turned on, each reserved word you type into an IDL | ||
| 545 | source buffer will be converted to upper case when you press @key{SPC} | ||
| 546 | or @key{RET} right after the word. Try it out! @samp{if} changes to | ||
| 547 | @samp{IF}, @samp{begin} to @samp{BEGIN}. If you don't like this | ||
| 548 | behavior, remove the option again from your @file{.emacs} file. | ||
| 549 | |||
| 550 | Now I bet you have your own indentation preferences for IDL code. For | ||
| 551 | example, I like to indent the main block of an IDL program a bit, | ||
| 552 | different from the conventions used by RSI. Also, I'd like to use only | ||
| 553 | 3 spaces as indentation between @code{BEGIN} and @code{END}. Try the | ||
| 554 | following lines in @file{.emacs} | ||
| 555 | |||
| 556 | @lisp | ||
| 557 | (setq idlwave-main-block-indent 2) | ||
| 558 | (setq idlwave-block-indent 3) | ||
| 559 | (setq idlwave-end-offset -3) | ||
| 560 | @end lisp | ||
| 561 | |||
| 562 | Restart Emacs, take the program we developed in the first part of this | ||
| 563 | tutorial and re-indent it with @kbd{C-c h} and @kbd{M-C-\}. You | ||
| 564 | probably want to keep these lines in @file{.emacs}, with values adjusted | ||
| 565 | to your likings. If you want to get more information about any of these | ||
| 566 | variables, type, e.g., @kbd{C-h v idlwave-main-block-indent @key{RET}}. | ||
| 567 | To find which variables can be customized, look for items marked | ||
| 568 | @samp{User Option:} in the manual. | ||
| 569 | |||
| 570 | If you cannot wrap your head around this Lisp stuff, there is another, | ||
| 571 | more user-friendly way to customize all the IDLWAVE variables. You can | ||
| 572 | access it through the IDLWAVE menu in one of the @file{.pro} buffers, | ||
| 573 | option @code{Customize->Browse IDLWAVE Group}. Here you'll be presented | ||
| 574 | with all the various variables grouped into categories. You can | ||
| 575 | navigate the hierarchy (e.g. Idlwave Code Formatting->Idlwave Main Block | ||
| 576 | Indent), read about the variables, change them, and `Save for Future | ||
| 577 | Sessions'. Few of these variables need customization, but you can | ||
| 578 | exercise considerable control over IDLWAVE's functionality with them. | ||
| 579 | |||
| 580 | Many people I talk to find the key bindings used for the debugging | ||
| 581 | commands too long and complicated. Do I always have to type @kbd{C-c | ||
| 582 | C-d C-c} to get a single simple command? Due to Emacs rules and | ||
| 583 | conventions I cannot make better bindings by default, but you can. | ||
| 584 | First, there is a way to assign all debugging commands in a single sweep | ||
| 585 | to other combinations. The only problem is that we have to use | ||
| 586 | something which Emacs does not need for other important commands. A | ||
| 587 | good option is to execute debugging commands by holding down | ||
| 588 | @key{CONTROL} and @key{SHIFT} while pressing a single character: | ||
| 589 | @kbd{C-S-b} for setting a breakpoint, @kbd{C-S-c} for compiling the | ||
| 590 | current source file, @kbd{C-S-a} for deleting all breakpoints. You can | ||
| 591 | have this with | ||
| 592 | |||
| 593 | @lisp | ||
| 594 | (setq idlwave-shell-debug-modifiers '(shift control)) | ||
| 595 | @end lisp | ||
| 596 | |||
| 597 | If you have a special keyboard with for example a @key{HYPER} key, you | ||
| 598 | could use | ||
| 599 | |||
| 600 | @lisp | ||
| 601 | (setq idlwave-shell-debug-modifiers '(hyper)) | ||
| 602 | @end lisp | ||
| 603 | |||
| 604 | instead to get compilation on @kbd{H-c}. | ||
| 605 | |||
| 606 | You can also assign specific commands to function keys. This you must | ||
| 607 | do in the @emph{mode-hook}, a special function which is run when a new | ||
| 608 | buffer gets set up. Keybindings can only be done when the buffer | ||
| 609 | exists. The possibilities for key customization are endless. Here we | ||
| 610 | set function keys f5-f8 to common debugging commands. | ||
| 611 | |||
| 612 | @lisp | ||
| 613 | ;; First for the source buffer | ||
| 614 | (add-hook 'idlwave-mode-hook | ||
| 615 | (lambda () | ||
| 616 | (local-set-key [f5] 'idlwave-shell-break-here) | ||
| 617 | (local-set-key [f6] 'idlwave-shell-clear-current-bp) | ||
| 618 | (local-set-key [f7] 'idlwave-shell-cont) | ||
| 619 | (local-set-key [f8] 'idlwave-shell-clear-all-bp))) | ||
| 620 | ;; Then for the shell buffer | ||
| 621 | (add-hook 'idlwave-shell-mode-hook | ||
| 622 | (lambda () | ||
| 623 | (local-set-key [f5] 'idlwave-shell-break-here) | ||
| 624 | (local-set-key [f6] 'idlwave-shell-clear-current-bp) | ||
| 625 | (local-set-key [f7] 'idlwave-shell-cont) | ||
| 626 | (local-set-key [f8] 'idlwave-shell-clear-all-bp))) | ||
| 627 | @end lisp | ||
| 628 | |||
| 629 | @section Lession III: Library Catalog | ||
| 630 | |||
| 631 | We have already used the routine info display in the first part of this | ||
| 632 | tutorial. This was the key @kbd{C-c ?} which displays information about | ||
| 633 | the IDL routine near the cursor position. Wouldn't it be nice | ||
| 634 | to have the same available for your own library routines and for the | ||
| 635 | huge amount of code in major extension libraries like JHUPL or the | ||
| 636 | IDL-Astro library? To do this, you must give IDLWAVE a chance to study | ||
| 637 | these routines first. We call this @emph{Building the library catalog}. | ||
| 638 | |||
| 639 | From the IDLWAVE entry in the menu bar, select @code{Routine Info/Select | ||
| 640 | Catalog Directories}. If necessary, start the shell first with @kbd{C-c | ||
| 641 | C-s} (@pxref{Starting the Shell}). IDLWAVE will find out about the IDL | ||
| 642 | @code{!PATH} variable and offer a list of directories on the path. | ||
| 643 | Simply select them all (or whichever you want) and click on the | ||
| 644 | @samp{Scan&Save} button. Then go for a cup of coffee while IDLWAVE | ||
| 645 | collects information for each and every IDL routine on your search path. | ||
| 646 | All this information is written to the file @file{.idlcat} in your home | ||
| 647 | directory and will from now one be automatically loaded whenever you use | ||
| 648 | IDLWAVE. Try to use routine info (@kbd{C-c ?}) or completion | ||
| 649 | (@kbd{M-<TAB>}) while on any routine or partial routine name you know to | ||
| 650 | be located in the library. E.g., if you have scanned the IDL-Astro | ||
| 651 | library: | ||
| 652 | |||
| 653 | @example | ||
| 654 | a=readf@key{M-<TAB>} | ||
| 655 | @end example | ||
| 656 | |||
| 657 | |||
| 658 | expands to `readfits('. Then try | ||
| 659 | |||
| 660 | @example | ||
| 661 | a=readfits(@key{C-c ?} | ||
| 662 | @end example | ||
| 663 | |||
| 664 | and you get: | ||
| 665 | |||
| 666 | @example | ||
| 667 | Usage: Result = READFITS(filename, header, heap) | ||
| 668 | ... | ||
| 669 | @end example | ||
| 670 | |||
| 671 | I hope you made it until here. Now you are set to work with IDLWAVE. | ||
| 672 | On the way you will want to change other things, and to learn more about | ||
| 673 | the possibilities not discussed in this short tutorial. Read the | ||
| 674 | manual, look at the documentation strings of interesting variables (with | ||
| 675 | @kbd{C-h v idlwave<-variable-name> @key{RET}}) and ask the remaining | ||
| 676 | questions on @code{comp.lang.idl-pvwave}. | ||
| 677 | |||
| 678 | @node The IDLWAVE Major Mode, The IDLWAVE Shell, Getting Started, Top | ||
| 352 | @chapter The IDLWAVE Major Mode | 679 | @chapter The IDLWAVE Major Mode |
| 353 | @cindex IDLWAVE major mode | 680 | @cindex IDLWAVE major mode |
| 354 | @cindex Major mode, @code{idlwave-mode} | 681 | @cindex Major mode, @code{idlwave-mode} |
| @@ -626,7 +953,7 @@ This may indicate that your routine is shadowing a library routine, | |||
| 626 | which may or may not be what you want (@pxref{Load-Path Shadows}). The | 953 | which may or may not be what you want (@pxref{Load-Path Shadows}). The |
| 627 | information about the calling sequence and the keywords is derived from | 954 | information about the calling sequence and the keywords is derived from |
| 628 | the first source listed. Library routines can only be supported if you | 955 | the first source listed. Library routines can only be supported if you |
| 629 | have scanned the local IDL library (@pxref{Library Scan}). The source | 956 | have scanned the local IDL library (@pxref{Library Catalog}). The source |
| 630 | entry consists of a @emph{source category}, a set of @emph{flags} and | 957 | entry consists of a @emph{source category}, a set of @emph{flags} and |
| 631 | the path to the @emph{source file}. The following categories | 958 | the path to the @emph{source file}. The following categories |
| 632 | exist: | 959 | exist: |
| @@ -635,7 +962,7 @@ exist: | |||
| 635 | @item @i{System} | 962 | @item @i{System} |
| 636 | @tab A system routine, but we do not know if it is @i{Builtin} or | 963 | @tab A system routine, but we do not know if it is @i{Builtin} or |
| 637 | @i{SystemLib}. When the system library has bee scanned | 964 | @i{SystemLib}. When the system library has bee scanned |
| 638 | (@pxref{Library Scan}), this category will automatically split into the | 965 | (@pxref{Library Catalog}), this category will automatically split into the |
| 639 | next two. | 966 | next two. |
| 640 | @item @i{Builtin} | 967 | @item @i{Builtin} |
| 641 | @tab A builtin routine with no source code available. | 968 | @tab A builtin routine with no source code available. |
| @@ -659,7 +986,7 @@ with the variable @code{idlwave-special-lib-alist}. | |||
| 659 | @cindex Multiply defined routines | 986 | @cindex Multiply defined routines |
| 660 | @cindex Routine definitions, multiple | 987 | @cindex Routine definitions, multiple |
| 661 | The flags @code{[CSB]} indicate if the file is known to IDLWAVE from the | 988 | The flags @code{[CSB]} indicate if the file is known to IDLWAVE from the |
| 662 | library catalog (@w{@code{[C--]}}, @pxref{Library Scan}), from the Shell | 989 | library catalog (@w{@code{[C--]}}, @pxref{Library Catalog}), from the Shell |
| 663 | (@w{@code{[-S-]}}) or from an Emacs buffer (@w{@code{[--B]}}). | 990 | (@w{@code{[-S-]}}) or from an Emacs buffer (@w{@code{[--B]}}). |
| 664 | Combinations are possible. If a file contains multiple definitions of | 991 | Combinations are possible. If a file contains multiple definitions of |
| 665 | the same routine, the file name will be prefixed with @samp{(Nx)} where | 992 | the same routine, the file name will be prefixed with @samp{(Nx)} where |
| @@ -691,6 +1018,11 @@ Another click on the same line switches back to the buffer from which | |||
| 691 | @kbd{C-c ?} was called. If you use the @emph{right} mouse button, the | 1018 | @kbd{C-c ?} was called. If you use the @emph{right} mouse button, the |
| 692 | source will not be visited by a buffer, but displayed in the online help | 1019 | source will not be visited by a buffer, but displayed in the online help |
| 693 | window. | 1020 | window. |
| 1021 | @item @i{Classes} | ||
| 1022 | @tab The @i{Classes} line is only included in the routine info window if | ||
| 1023 | the current class inherits from other classes. You can click with the | ||
| 1024 | @emph{middle} mouse button to display routine info about the current | ||
| 1025 | method in other classes on the inheritance chain. | ||
| 694 | @end multitable | 1026 | @end multitable |
| 695 | 1027 | ||
| 696 | @defopt idlwave-resize-routine-help-window (@code{t}) | 1028 | @defopt idlwave-resize-routine-help-window (@code{t}) |
| @@ -870,6 +1202,10 @@ file. | |||
| 870 | The face for links to IDLWAVE online help. | 1202 | The face for links to IDLWAVE online help. |
| 871 | @end defopt | 1203 | @end defopt |
| 872 | 1204 | ||
| 1205 | @defopt idlwave-help-activate-links-agressively (@code{t}) | ||
| 1206 | Non-@code{nil} means, make all possible links in help window active. | ||
| 1207 | @end defopt | ||
| 1208 | |||
| 873 | @node Completion, Routine Source, Online Help, The IDLWAVE Major Mode | 1209 | @node Completion, Routine Source, Online Help, The IDLWAVE Major Mode |
| 874 | @section Completion | 1210 | @section Completion |
| 875 | @cindex Completion | 1211 | @cindex Completion |
| @@ -905,6 +1241,9 @@ x = obj_new('IDL* @r{Class name} | |||
| 905 | x = obj_new('MyCl',a* @r{Keyword to @code{Init} method in class @code{MyCl}} | 1241 | x = obj_new('MyCl',a* @r{Keyword to @code{Init} method in class @code{MyCl}} |
| 906 | pro A* @r{Class name} | 1242 | pro A* @r{Class name} |
| 907 | pro * @r{Fill in @code{Class::} of first method in this file} | 1243 | pro * @r{Fill in @code{Class::} of first method in this file} |
| 1244 | !v* @r{System variable} | ||
| 1245 | !version.t* @r{Structure tag of system variable} | ||
| 1246 | self.g* @r{Class structure tag in methods} | ||
| 908 | @end example | 1247 | @end example |
| 909 | 1248 | ||
| 910 | @cindex Scrolling the @file{*Completions*} window | 1249 | @cindex Scrolling the @file{*Completions*} window |
| @@ -979,7 +1318,8 @@ current method in all available classes will be considered. In the | |||
| 979 | will be shown next to the item (see option | 1318 | will be shown next to the item (see option |
| 980 | @code{idlwave-completion-show-classes}). As a special case, the class | 1319 | @code{idlwave-completion-show-classes}). As a special case, the class |
| 981 | of an object called @samp{self} object is always the class of the | 1320 | of an object called @samp{self} object is always the class of the |
| 982 | current routine. | 1321 | current routine. All classes it inherits from are considered as well |
| 1322 | where appropriate. | ||
| 983 | 1323 | ||
| 984 | @cindex Forcing class query. | 1324 | @cindex Forcing class query. |
| 985 | @cindex Class query, forcing | 1325 | @cindex Class query, forcing |
| @@ -996,6 +1336,10 @@ property in the object operator @samp{->}. This is not enabled by | |||
| 996 | default - the variable @code{idlwave-store-inquired-class} can be used | 1336 | default - the variable @code{idlwave-store-inquired-class} can be used |
| 997 | to turn it on. | 1337 | to turn it on. |
| 998 | 1338 | ||
| 1339 | @defopt idlwave-support-inheritance (@code{t}) | ||
| 1340 | Non-@code{nil} means, treat inheritance with completion, online help etc. | ||
| 1341 | @end defopt | ||
| 1342 | |||
| 999 | @defopt idlwave-completion-show-classes (@code{1}) | 1343 | @defopt idlwave-completion-show-classes (@code{1}) |
| 1000 | Non-@code{nil} means, show classes in @file{*Completions*} buffer when | 1344 | Non-@code{nil} means, show classes in @file{*Completions*} buffer when |
| 1001 | completing object methods and keywords. | 1345 | completing object methods and keywords. |
| @@ -1055,7 +1399,7 @@ taken from context, but you get a chance to edit it. | |||
| 1055 | 1399 | ||
| 1056 | @code{idlwave-resolve} is one way to get a library module within reach | 1400 | @code{idlwave-resolve} is one way to get a library module within reach |
| 1057 | of IDLWAVE's routine info collecting functions. A better way is to | 1401 | of IDLWAVE's routine info collecting functions. A better way is to |
| 1058 | scan (parts of) the library (@pxref{Library Scan}). Routine info on | 1402 | scan (parts of) the library (@pxref{Library Catalog}). Routine info on |
| 1059 | library modules will then be available without the need to compile the | 1403 | library modules will then be available without the need to compile the |
| 1060 | modules first, and even without a running shell. | 1404 | modules first, and even without a running shell. |
| 1061 | 1405 | ||
| @@ -1115,7 +1459,7 @@ The templates are expanded in upper or lower case, depending upon the | |||
| 1115 | variables @code{idlwave-abbrev-change-case} and | 1459 | variables @code{idlwave-abbrev-change-case} and |
| 1116 | @code{idlwave-reserved-word-upcase}. | 1460 | @code{idlwave-reserved-word-upcase}. |
| 1117 | 1461 | ||
| 1118 | @defopt idlwave-abbrev-start-char | 1462 | @defopt idlwave-abbrev-start-char (@code{"\"}) |
| 1119 | A single character string used to start abbreviations in abbrev | 1463 | A single character string used to start abbreviations in abbrev |
| 1120 | mode. | 1464 | mode. |
| 1121 | @end defopt | 1465 | @end defopt |
| @@ -1197,7 +1541,7 @@ Non-@code{nil} means point blinks to block beginning for | |||
| 1197 | @code{idlwave-show-begin}. | 1541 | @code{idlwave-show-begin}. |
| 1198 | @end defopt | 1542 | @end defopt |
| 1199 | 1543 | ||
| 1200 | @defopt idlwave-expand-generic-end (@code{nil}) | 1544 | @defopt idlwave-expand-generic-end (@code{t}) |
| 1201 | Non-@code{nil} means expand generic END to ENDIF/ENDELSE/ENDWHILE etc. | 1545 | Non-@code{nil} means expand generic END to ENDIF/ENDELSE/ENDWHILE etc. |
| 1202 | @end defopt | 1546 | @end defopt |
| 1203 | 1547 | ||
| @@ -1498,13 +1842,22 @@ Hook for customizing @code{idlwave-shell-mode}. | |||
| 1498 | 1842 | ||
| 1499 | The IDLWAVE shell works in the same fashion as other shell modes in | 1843 | The IDLWAVE shell works in the same fashion as other shell modes in |
| 1500 | Emacs. It provides command history, command line editing and job | 1844 | Emacs. It provides command history, command line editing and job |
| 1501 | control. Here is a list of commonly used commands. | 1845 | control. The @key{UP} and @key{DOWN} arrows cycle through the input |
| 1846 | history just like in an X terminal@footnote{This is different from | ||
| 1847 | normal Emacs/Comint behavior, but more like an xterm. If you prefer the | ||
| 1848 | default comint functionality, check the variable | ||
| 1849 | @code{idlwave-shell-arrows-do-history}.}. Here is a list of | ||
| 1850 | commonly used commands. | ||
| 1502 | 1851 | ||
| 1503 | @multitable @columnfractions .12 .88 | 1852 | @multitable @columnfractions .12 .88 |
| 1853 | @item @key{UP} | ||
| 1854 | @tab Cycle backwards in input history | ||
| 1855 | @item @key{DOWN} | ||
| 1856 | @tab Cycle forwards in input history | ||
| 1504 | @item @kbd{M-p} | 1857 | @item @kbd{M-p} |
| 1505 | @tab Cycle backwards in input history matching input | 1858 | @tab Cycle backwards in input history @emph{matching input} |
| 1506 | @item @kbd{M-n} | 1859 | @item @kbd{M-n} |
| 1507 | @tab Cycle forwards | 1860 | @tab Cycle forwards in input history @emph{matching input} |
| 1508 | @item @kbd{M-r} | 1861 | @item @kbd{M-r} |
| 1509 | @tab Previous input matching a regexp | 1862 | @tab Previous input matching a regexp |
| 1510 | @item @kbd{M-s} | 1863 | @item @kbd{M-s} |
| @@ -1559,12 +1912,24 @@ information on these commands. | |||
| 1559 | @tab Compile a library routine (@code{idlwave-resolve}) | 1912 | @tab Compile a library routine (@code{idlwave-resolve}) |
| 1560 | @end multitable | 1913 | @end multitable |
| 1561 | 1914 | ||
| 1915 | @defopt idlwave-shell-arrows-do-history (@code{t}) | ||
| 1916 | Non-@code{nil} means @key{UP} and @key{DOWN} arrows move through command | ||
| 1917 | history like xterm. | ||
| 1918 | @end defopt | ||
| 1919 | |||
| 1920 | @defopt idlwave-shell-comint-settings | ||
| 1921 | Alist of special settings for the comint variables in the IDLWAVE Shell. | ||
| 1922 | @end defopt | ||
| 1923 | |||
| 1562 | @defopt idlwave-shell-file-name-chars | 1924 | @defopt idlwave-shell-file-name-chars |
| 1563 | The characters allowed in file names, as a string. Used for file name | 1925 | The characters allowed in file names, as a string. Used for file name |
| 1564 | completion. | 1926 | completion. |
| 1565 | @end defopt | 1927 | @end defopt |
| 1566 | 1928 | ||
| 1567 | @page | 1929 | @defopt idlwave-shell-graphics-window-size |
| 1930 | Size of IDL graphics windows popped up by special IDLWAVE command. | ||
| 1931 | @end defopt | ||
| 1932 | |||
| 1568 | @cindex Input mode | 1933 | @cindex Input mode |
| 1569 | @cindex Character input mode (Shell) | 1934 | @cindex Character input mode (Shell) |
| 1570 | @cindex Line input mode (Shell) | 1935 | @cindex Line input mode (Shell) |
| @@ -1609,11 +1974,21 @@ C-t} (@code{idlwave-shell-toggle-toolbar}). | |||
| 1609 | 1974 | ||
| 1610 | The debugging keybindings are by default on the prefix key @kbd{C-c | 1975 | The debugging keybindings are by default on the prefix key @kbd{C-c |
| 1611 | C-d}, so for example setting a breakpoint is done with @kbd{C-c C-d | 1976 | C-d}, so for example setting a breakpoint is done with @kbd{C-c C-d |
| 1612 | C-b}. If you find this too much work and your ALT key is still | 1977 | C-b}, compiling a source file with @kbd{C-c C-d C-c}. If you find this |
| 1613 | available, turn on the variable | 1978 | too much work you can choose a combination of modifier keys which is not |
| 1614 | @code{idlwave-shell-activate-alt-keybindings} in order to get breakpoint | 1979 | used by other commands. For example, if you write in @file{.emacs} |
| 1615 | setting on @kbd{A-b}. In the remainder of this chapter we will assume | 1980 | |
| 1616 | that the @kbd{C-c C-d} bindings are active. | 1981 | @lisp |
| 1982 | (setq idlwave-shell-debug-modifiers '(control shift)) | ||
| 1983 | @end lisp | ||
| 1984 | |||
| 1985 | a breakpoint can be set by pressing @kbd{b} while holding down | ||
| 1986 | @kbd{shift} and @kbd{control} keys, i.e. @kbd{C-S-b}. Compiling a | ||
| 1987 | source file will be on @kbd{C-S-c}, deleting a breakpoint @kbd{C-S-d} | ||
| 1988 | etc. In the remainder of this chapter we will assume that the @kbd{C-c | ||
| 1989 | C-d} bindings are active, but each of these bindings will have an | ||
| 1990 | equivalent single-keypress shortcut with the modifiers given in the | ||
| 1991 | @code{idlwave-shell-debug-modifiers} variable. | ||
| 1617 | 1992 | ||
| 1618 | @defopt idlwave-shell-prefix-key (@kbd{C-c C-d}) | 1993 | @defopt idlwave-shell-prefix-key (@kbd{C-c C-d}) |
| 1619 | The prefix key for the debugging map | 1994 | The prefix key for the debugging map |
| @@ -1625,9 +2000,9 @@ Non-@code{nil} means, debug commands will be bound to the prefix | |||
| 1625 | key, like @kbd{C-c C-d C-b}. | 2000 | key, like @kbd{C-c C-d C-b}. |
| 1626 | @end defopt | 2001 | @end defopt |
| 1627 | 2002 | ||
| 1628 | @defopt idlwave-shell-activate-alt-keybindings (@code{nil}) | 2003 | @defopt idlwave-shell-debug-modifiers (@code{nil}) |
| 1629 | Non-@code{nil} means, debug commands will be bound to alternate | 2004 | List of modifier keys to use for binding debugging commands in the shell |
| 1630 | keys, like @kbd{A-b}. | 2005 | and in source buffers. |
| 1631 | @end defopt | 2006 | @end defopt |
| 1632 | 2007 | ||
| 1633 | @defopt idlwave-shell-use-toolbar (@code{t}) | 2008 | @defopt idlwave-shell-use-toolbar (@code{t}) |
| @@ -1639,6 +2014,7 @@ buffers. | |||
| 1639 | @menu | 2014 | @menu |
| 1640 | * Compiling Programs:: Compiling buffers under the shell | 2015 | * Compiling Programs:: Compiling buffers under the shell |
| 1641 | * Breakpoints and Stepping:: Deciding where to stop and look | 2016 | * Breakpoints and Stepping:: Deciding where to stop and look |
| 2017 | * Walking the Calling Stack:: From where was this routine called? | ||
| 1642 | * Examining Variables:: What is the value now? | 2018 | * Examining Variables:: What is the value now? |
| 1643 | @end menu | 2019 | @end menu |
| 1644 | 2020 | ||
| @@ -1682,7 +2058,7 @@ The face which highlights the source line where IDL is | |||
| 1682 | stopped. | 2058 | stopped. |
| 1683 | @end defopt | 2059 | @end defopt |
| 1684 | 2060 | ||
| 1685 | @node Breakpoints and Stepping, Examining Variables, Compiling Programs, Debugging IDL Programs | 2061 | @node Breakpoints and Stepping, Walking the Calling Stack, Compiling Programs, Debugging IDL Programs |
| 1686 | @subsection Breakpoints and Stepping | 2062 | @subsection Breakpoints and Stepping |
| 1687 | @cindex Breakpoints | 2063 | @cindex Breakpoints |
| 1688 | @cindex Stepping | 2064 | @cindex Stepping |
| @@ -1693,16 +2069,23 @@ stopped. | |||
| 1693 | You can set breakpoints and step through a program with IDLWAVE. | 2069 | You can set breakpoints and step through a program with IDLWAVE. |
| 1694 | Setting a breakpoint in the current line of the source buffer is done | 2070 | Setting a breakpoint in the current line of the source buffer is done |
| 1695 | with @kbd{C-c C-d C-b} (@code{idlwave-shell-break-here}). With a prefix | 2071 | with @kbd{C-c C-d C-b} (@code{idlwave-shell-break-here}). With a prefix |
| 1696 | arg of 1, the breakpoint gets a @code{/ONCE} keyword, meaning that it | 2072 | arg of 1 (i.e. @kbd{C-1 C-c C-d C-b}, the breakpoint gets a @code{/ONCE} |
| 1697 | will be deleted after first use. With a numeric prefix greater than | 2073 | keyword, meaning that it will be deleted after first use. With a |
| 1698 | one, the breakpoint will only be active the @code{nth} time it is hit. | 2074 | numeric prefix greater than one, the breakpoint will only be active the |
| 1699 | To clear the breakpoint in the current line, use @kbd{C-c C-d C-d} | 2075 | @code{nth} time it is hit. To clear the breakpoint in the current line, |
| 1700 | (@code{idlwave-clear-current-bp}). To clear all breakpoints, use | 2076 | use @kbd{C-c C-d C-d} (@code{idlwave-clear-current-bp}). When executed |
| 1701 | @kbd{C-c C-d C-a} (@code{idlwave-clear-all-bp}). Breakpoint lines are | 2077 | from the shell window, the breakpoint where IDL is currently stopped |
| 1702 | highlighted in the source code. | 2078 | will be deleted. To clear all breakpoints, use @kbd{C-c C-d C-a} |
| 1703 | 2079 | (@code{idlwave-clear-all-bp}). Breakpoint lines are highlighted in the | |
| 1704 | Once the program has stopped somewhere, you can step through it. Here | 2080 | source code. |
| 1705 | is a summary of the breakpoint and stepping commands: | 2081 | |
| 2082 | Once the program has stopped somewhere, you can step through it. The | ||
| 2083 | most important stepping commands are @kbd{C-c C-d C-s} to execute one | ||
| 2084 | line of IDL code; @kbd{C-c C-d C-n} to do one step but treat procedure | ||
| 2085 | and function calls as a single step; @kbd{C-c C-d C-h} to continue | ||
| 2086 | execution to the line where the cursor is in and @kbd{C-c C-d C-r} to | ||
| 2087 | continue execution. Here is a summary of the breakpoint and stepping | ||
| 2088 | commands: | ||
| 1706 | 2089 | ||
| 1707 | @multitable @columnfractions .23 .77 | 2090 | @multitable @columnfractions .23 .77 |
| 1708 | @item @kbd{C-c C-d C-b} | 2091 | @item @kbd{C-c C-d C-b} |
| @@ -1746,12 +2129,31 @@ The face for breakpoint lines in the source code if | |||
| 1746 | @code{idlwave-shell-mark-breakpoints} has the value @code{face}. | 2129 | @code{idlwave-shell-mark-breakpoints} has the value @code{face}. |
| 1747 | @end defopt | 2130 | @end defopt |
| 1748 | 2131 | ||
| 1749 | @node Examining Variables, , Breakpoints and Stepping, Debugging IDL Programs | 2132 | @node Walking the Calling Stack, Examining Variables, Breakpoints and Stepping, Debugging IDL Programs |
| 2133 | @subsection Walking the Calling Stack | ||
| 2134 | @cindex Calling stack, walking | ||
| 2135 | |||
| 2136 | When debugging a program, it can be very useful to check in what context | ||
| 2137 | the current routine was called, and why the arguments of the call are | ||
| 2138 | the way they are. For this one needs to examine the calling stack. If | ||
| 2139 | execution is stopped somewhere deep in a program, you can use the | ||
| 2140 | commands @kbd{C-c C-d C-@key{UP}} (@code{idlwave-shell-stack-up}) and | ||
| 2141 | @kbd{C-c C-d C-@key{DOWN}} (@code{idlwave-shell-stack-down}) or the | ||
| 2142 | corresponding toolbar buttons to move through the calling stack. The | ||
| 2143 | mode line of the shell window will indicate where you are on the stack | ||
| 2144 | with a token like @samp{[-3:MYPRO]}, and the line of IDL code which did | ||
| 2145 | the current call will be highlighted. When you continue execution, | ||
| 2146 | IDLWAVE will automatically return to the current level. @xref{Examining | ||
| 2147 | Variables} for information how to examine the value of variables and | ||
| 2148 | expressions on higher calling stack levels. | ||
| 2149 | |||
| 2150 | @node Examining Variables, , Walking the Calling Stack, Debugging IDL Programs | ||
| 1750 | @subsection Examining Variables | 2151 | @subsection Examining Variables |
| 1751 | @cindex @code{PRINT} expressions | 2152 | @cindex @code{PRINT} expressions |
| 1752 | @cindex @code{HELP}, on expressions | 2153 | @cindex @code{HELP}, on expressions |
| 1753 | @cindex Expressions, printing | 2154 | @cindex Expressions, printing |
| 1754 | @cindex Expressions, help | 2155 | @cindex Expressions, help |
| 2156 | @cindex Printing expressions | ||
| 1755 | @cindex Mouse binding to print expressions | 2157 | @cindex Mouse binding to print expressions |
| 1756 | 2158 | ||
| 1757 | @kindex C-c C-d C-p | 2159 | @kindex C-c C-d C-p |
| @@ -1765,23 +2167,21 @@ argument will prompt for an expression instead of using the one at | |||
| 1765 | point. | 2167 | point. |
| 1766 | 2168 | ||
| 1767 | It is very convenient to click with the mouse on expressions to retrieve | 2169 | It is very convenient to click with the mouse on expressions to retrieve |
| 1768 | their value. Expression printing is also bound to @kbd{S-mouse-2} and | 2170 | their value. Use @kbd{S-mouse-2} to print an expression and |
| 1769 | expression help to @kbd{C-S-mouse-2}. I.e. you need to hold down | 2171 | @kbd{C-S-mouse-2} to get help on an expression. I.e. you need to hold |
| 1770 | @key{SHIFT} and @key{CONTROL} while clicking with the mouse. | 2172 | down @key{SHIFT} and @key{CONTROL} while clicking with the middle mouse |
| 2173 | buton. | ||
| 1771 | 2174 | ||
| 1772 | @cindex Calling stack, motion | ||
| 1773 | @cindex Printing expressions, on calling stack | 2175 | @cindex Printing expressions, on calling stack |
| 1774 | @cindex Restrictions for expression printing | 2176 | @cindex Restrictions for expression printing |
| 1775 | Printing of expressions also works on higher levels of the calling | 2177 | Printing of expressions also works on higher levels of the calling |
| 1776 | stack. This means that you can examine the values of variables and | 2178 | stack. This means that you can examine the values of variables and |
| 1777 | expressions inside the routine which called the current routine etc. | 2179 | expressions inside the routine which called the current routine etc. |
| 1778 | Use the commands @kbd{C-c C-d C-@key{UP}} | 2180 | @xref{Walking the Calling Stack} for information on how to step back to |
| 1779 | (@code{idlwave-shell-stack-up}) and @kbd{C-c C-d C-@key{DOWN}} | 2181 | higher levels on the calling stack. Commands which print values of |
| 1780 | (@code{idlwave-shell-stack-down}) or the corresponding toolbar buttons | 2182 | variables and expressions will then use the values of variables in the |
| 1781 | to move through the calling stack. The mode line of the shell window | 2183 | calling routine. The following restrictions apply for all levels except |
| 1782 | will indicate the routine and the calling stack level which define the | 2184 | the current: |
| 1783 | context for printing expressions. The following restrictions apply for | ||
| 1784 | all levels except the current: | ||
| 1785 | 2185 | ||
| 1786 | @itemize @bullet | 2186 | @itemize @bullet |
| 1787 | @item | 2187 | @item |
| @@ -1902,14 +2302,14 @@ The main contributors to the IDLWAVE package have been: | |||
| 1902 | 2302 | ||
| 1903 | @itemize @minus | 2303 | @itemize @minus |
| 1904 | @item | 2304 | @item |
| 1905 | @uref{mailto:chase@@att.com, @b{Chris Chase}} wrote | 2305 | @uref{mailto:chase@@att.com, @b{Chris Chase}}, the original author. |
| 1906 | @file{idl.el} and @file{idl-shell.el} and maintained them for several | 2306 | Chris wrote @file{idl.el} and @file{idl-shell.el} and maintained them |
| 1907 | years. | 2307 | for several years. |
| 1908 | 2308 | ||
| 1909 | @item | 2309 | @item |
| 1910 | @uref{mailto:dominik@@astro.uva.nl, @b{Carsten Dominik}} has been in | 2310 | @uref{mailto:dominik@@astro.uva.nl, @b{Carsten Dominik}}, current author |
| 1911 | charge of the package since version 3.0. He renamed the package to | 2311 | and maintainer. I have been in charge of the package since version |
| 1912 | IDLWAVE, rewrote and added large parts and is the current maintainer. | 2312 | 3.0. I am also responsible for the manual. |
| 1913 | 2313 | ||
| 1914 | @item | 2314 | @item |
| 1915 | @uref{mailto:jdsmith@@astrosun.tn.cornell.edu, @b{J.D. Smith}} has | 2315 | @uref{mailto:jdsmith@@astrosun.tn.cornell.edu, @b{J.D. Smith}} has |
| @@ -1937,6 +2337,8 @@ Xuyong Liu <liu@@stsci.edu> | |||
| 1937 | @item | 2337 | @item |
| 1938 | Simon Marshall <Simon.Marshall@@esrin.esa.it> | 2338 | Simon Marshall <Simon.Marshall@@esrin.esa.it> |
| 1939 | @item | 2339 | @item |
| 2340 | Craig Markwardt <craigm@@cow.physics.wisc.edu> | ||
| 2341 | @item | ||
| 1940 | Laurent Mugnier <mugnier@@onera.fr> | 2342 | Laurent Mugnier <mugnier@@onera.fr> |
| 1941 | @item | 2343 | @item |
| 1942 | Lubos Pochman <lubos@@rsinc.com> | 2344 | Lubos Pochman <lubos@@rsinc.com> |
| @@ -1965,7 +2367,7 @@ IDLWAVE must know about the accessible routines. | |||
| 1965 | @menu | 2367 | @menu |
| 1966 | * Routine Definitions:: Where IDL Routines are defined. | 2368 | * Routine Definitions:: Where IDL Routines are defined. |
| 1967 | * Routine Information Sources:: So how does IDLWAVE know about... | 2369 | * Routine Information Sources:: So how does IDLWAVE know about... |
| 1968 | * Library Scan:: Scanning the Libraries for Routine Info | 2370 | * Library Catalog:: Scanning the Libraries for Routine Info |
| 1969 | * Load-Path Shadows:: Routines defined in several places | 2371 | * Load-Path Shadows:: Routines defined in several places |
| 1970 | * Documentation Scan:: Scanning the IDL Manuals | 2372 | * Documentation Scan:: Scanning the IDL Manuals |
| 1971 | @end menu | 2373 | @end menu |
| @@ -2003,7 +2405,7 @@ cannot provide routine info and completion for external | |||
| 2003 | routines. | 2405 | routines. |
| 2004 | @end enumerate | 2406 | @end enumerate |
| 2005 | 2407 | ||
| 2006 | @node Routine Information Sources, Library Scan, Routine Definitions, Sources of Routine Info | 2408 | @node Routine Information Sources, Library Catalog, Routine Definitions, Sources of Routine Info |
| 2007 | @section Routine Information Sources | 2409 | @section Routine Information Sources |
| 2008 | @cindex Routine info sources | 2410 | @cindex Routine info sources |
| 2009 | @cindex Builtin list of routines | 2411 | @cindex Builtin list of routines |
| @@ -2046,7 +2448,7 @@ the shell again at any time. | |||
| 2046 | @item | 2448 | @item |
| 2047 | IDLWAVE can scan all or selected library files and store the result in a | 2449 | IDLWAVE can scan all or selected library files and store the result in a |
| 2048 | file which will be automatically loaded just like | 2450 | file which will be automatically loaded just like |
| 2049 | @file{idlw-rinfo.el}. @xref{Library Scan}, for information how to | 2451 | @file{idlw-rinfo.el}. @xref{Library Catalog}, for information how to |
| 2050 | scan library files. | 2452 | scan library files. |
| 2051 | @end enumerate | 2453 | @end enumerate |
| 2052 | 2454 | ||
| @@ -2063,9 +2465,10 @@ Non-@code{nil} means query the shell for info about compiled routines. | |||
| 2063 | Controls under what circumstances routine info is updated automatically. | 2465 | Controls under what circumstances routine info is updated automatically. |
| 2064 | @end defopt | 2466 | @end defopt |
| 2065 | 2467 | ||
| 2066 | @node Library Scan, Load-Path Shadows, Routine Information Sources, Sources of Routine Info | 2468 | @node Library Catalog, Load-Path Shadows, Routine Information Sources, Sources of Routine Info |
| 2067 | @section Library Scan | 2469 | @section Library Catalog |
| 2068 | @cindex Library scan | 2470 | @cindex Library scan |
| 2471 | @cindex Library catalog | ||
| 2069 | @cindex IDL library routine info | 2472 | @cindex IDL library routine info |
| 2070 | @cindex Windows | 2473 | @cindex Windows |
| 2071 | @cindex MacOS | 2474 | @cindex MacOS |
| @@ -2126,7 +2529,7 @@ The IDL system directory for Windows and MacOS. Not needed under UNIX. | |||
| 2126 | Alist of regular expressions matching special library directories. | 2529 | Alist of regular expressions matching special library directories. |
| 2127 | @end defopt | 2530 | @end defopt |
| 2128 | 2531 | ||
| 2129 | @node Load-Path Shadows, Documentation Scan, Library Scan, Sources of Routine Info | 2532 | @node Load-Path Shadows, Documentation Scan, Library Catalog, Sources of Routine Info |
| 2130 | @section Load-Path Shadows | 2533 | @section Load-Path Shadows |
| 2131 | @cindex Load-path shadows | 2534 | @cindex Load-path shadows |
| 2132 | @cindex Shadows, load-path | 2535 | @cindex Shadows, load-path |
| @@ -2140,11 +2543,14 @@ IDLWAVE can compile a list of routines which are defined in several | |||
| 2140 | different files. Since one definition will hide (shadow) the others | 2543 | different files. Since one definition will hide (shadow) the others |
| 2141 | depending on which file is compiled first, such multiple definitions are | 2544 | depending on which file is compiled first, such multiple definitions are |
| 2142 | called "load-path shadows". IDLWAVE has several routines to scan for | 2545 | called "load-path shadows". IDLWAVE has several routines to scan for |
| 2143 | load path shadows. The output is placed into s special buffer | 2546 | load path shadows. The output is placed into the special buffer |
| 2144 | @file{*Shadows*}. The format of the output is identical to the source | 2547 | @file{*Shadows*}. The format of the output is identical to the source |
| 2145 | section of the routine info buffer (@pxref{Routine Info}). Before | 2548 | section of the routine info buffer (@pxref{Routine Info}). The |
| 2146 | calling these routines, you should make sure that routine info is | 2549 | different definitions of a routine are listed in the sequence of |
| 2147 | up-to-date by pressing @kbd{C-c C-i}. Here are the different routines: | 2550 | @emph{likelyhood of use}. So the first entry will be most likely the |
| 2551 | one you'll get if an unsuspecting command uses that routine. Before | ||
| 2552 | listing shadows, you should make sure that routine info is up-to-date by | ||
| 2553 | pressing @kbd{C-c C-i}. Here are the different routines: | ||
| 2148 | 2554 | ||
| 2149 | @table @asis | 2555 | @table @asis |
| 2150 | @item @kbd{M-x idlwave-list-buffer-load-path-shadows} | 2556 | @item @kbd{M-x idlwave-list-buffer-load-path-shadows} |
| @@ -2158,8 +2564,7 @@ the application, use @code{RESOLVE_ALL} to compile any routines used by | |||
| 2158 | your code, update the routine info inside IDLWAVE with @kbd{C-c C-i} and | 2564 | your code, update the routine info inside IDLWAVE with @kbd{C-c C-i} and |
| 2159 | then check for shadowing. | 2565 | then check for shadowing. |
| 2160 | @item @kbd{M-x idlwave-list-all-load-path-shadows} | 2566 | @item @kbd{M-x idlwave-list-all-load-path-shadows} |
| 2161 | This command finally checks all routines accessible to IDLWAVE for | 2567 | This command checks all routines accessible to IDLWAVE for conflicts. |
| 2162 | shadowing conflicts. | ||
| 2163 | @end table | 2568 | @end table |
| 2164 | 2569 | ||
| 2165 | For these commands to work properly you should have scanned the entire | 2570 | For these commands to work properly you should have scanned the entire |
| @@ -2239,8 +2644,7 @@ break with widely used standards. | |||
| 2239 | have in my @file{.emacs}: | 2644 | have in my @file{.emacs}: |
| 2240 | 2645 | ||
| 2241 | @lisp | 2646 | @lisp |
| 2242 | (setq idlwave-shell-activate-alt-keybindings t | 2647 | (setq idlwave-shell-debug-modifiers '(control shift) |
| 2243 | idlwave-expand-generic-end t | ||
| 2244 | idlwave-store-inquired-class t | 2648 | idlwave-store-inquired-class t |
| 2245 | idlwave-shell-automatic-start t | 2649 | idlwave-shell-automatic-start t |
| 2246 | idlwave-main-block-indent 2 | 2650 | idlwave-main-block-indent 2 |