~ubuntu-branches/ubuntu/oneiric/ess/oneiric

« back to all changes in this revision

Viewing changes to doc/ess.texi

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2010-11-08 16:52:27 UTC
  • mfrom: (1.2.18 upstream)
  • Revision ID: james.westby@ubuntu.com-20101108165227-u844l0tlegcdn89k
Tags: 5.12-1
* New upstream version released today

* debian/emacen-startup: Follow suggestion by Kevin Ryde in #594750 and
  use debian-pkg-add-load-path-item as well; also improved emacsen-install
  script by using soft links instead of copies  (Closes: #594750)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1991
1991
@end menu
1992
1992
 
1993
1993
@comment  node-name,  next,  previous,  up
1994
 
@node Styles,  , ,Indenting 
 
1994
@node Styles,  , Indenting, Indenting
1995
1995
@subsection Changing indentation styles
1996
1996
 
1997
1997
The combined value of nine variables that control indentation are
2383
2383
           (font-lock-mode 1)))
2384
2384
@end example
2385
2385
 
2386
 
@node Roxygen, , R documentation files, Editing R documentation
 
2386
@node Roxygen,  , R documentation files, Editing R documentation
2387
2387
@section Editing Roxygen documentation
2388
2388
@cindex Roxygen
2389
2389
@cindex roxy
2423
2423
All ESS Roxygen support is defined in @file{ess-roxy.el} which is loaded
2424
2424
by default in ESS. The following special Emacs commands are provided.
2425
2425
 
2426
 
@table @kbd
2427
 
@item C-c C-o 
 
2426
@itemize @bullet
 
2427
 
 
2428
@item
 
2429
@kbd{C-c C-o} (@code{ess-roxy-update-entry}) @*
2428
2430
@pindex ess-roxy-update-entry
2429
 
@code{ess-roxy-update-entry}: Generate a Roxygen template or update the
2430
 
parameter list in Roxygen entry at point (or above the function at the
2431
 
point). Documented parameters that are not in the function are placed
2432
 
last in the list, parameters that are not documented and not in the
2433
 
definition are dropped.
 
2431
Generate a Roxygen template or update the parameter list in Roxygen
 
2432
entry at point (or above the function at the point). Documented
 
2433
parameters that are not in the function are placed last in the list,
 
2434
parameters that are not documented and not in the definition are
 
2435
dropped. Parameter descriptions are filled if
 
2436
@code{ess-roxy-fill-param-p} is non-nil.
2434
2437
 
2435
 
@item C-c C-e C-c 
 
2438
@item
 
2439
@kbd{C-c C-e C-c} (@code{ess-roxy-toggle-roxy-region}) @*
2436
2440
@pindex ess-roxy-toggle-roxy-region
2437
 
@code{ess-roxy-toggle-roxy-region}: Toggle the presence of the leading
2438
 
Roxygen string on all lines in the marked region. Convenient for
2439
 
transferring text to Roxygen entries and to evaluate example fields.
 
2441
Toggle the presence of the leading Roxygen string on all lines in the
 
2442
marked region. Convenient for transferring text to Roxygen entries and
 
2443
to evaluate example fields.
2440
2444
 
2441
 
@item C-c C-e C-r 
 
2445
@item
 
2446
@kbd{C-c C-e C-r} (@code{ess-roxy-preview-Rd}) @*
2442
2447
@pindex ess-roxy-preview-Rd
2443
 
@code{ess-roxy-preview-Rd}: Use the attached R process to parse the
2444
 
entry at point obtain the input for an Rd file. Convenient for checking
2445
 
syntax. When used with the prefix argument, i.e. @kbd{C-u C-c C-e C-r},
2446
 
place the content in a buffer associated with a Rd file with the same
2447
 
name as the documentation. Requires the Roxygen package to be installed.
 
2448
Use the attached R process to parse the entry at point obtain the input
 
2449
for an Rd file. Convenient for checking syntax. When used with the
 
2450
prefix argument, i.e. @kbd{C-u C-c C-e C-r}, place the content in a
 
2451
buffer associated with a Rd file with the same name as the
 
2452
documentation. Requires the Roxygen package to be installed.
2448
2453
 
2449
 
@item C-c C-e p @code{ess-roxy-previous-entry}
 
2454
@item
 
2455
@kbd{C-c C-e p} (@code{ess-roxy-previous-entry}) @*
2450
2456
@pindex ess-roxy-previous-entry
2451
2457
Go to start of the Roxygen entry above point.
2452
2458
 
2453
 
@item C-c C-e n 
 
2459
@item 
 
2460
@kbd{C-c C-e n}  (@code{ess-roxy-next-entry}) @*
2454
2461
@pindex ess-roxy-next-entry
2455
 
@code{ess-roxy-next-entry}: Go to end of the Roxygen entry above point.
 
2462
Go to end of the Roxygen entry above point.
2456
2463
 
2457
 
@item C-c C-e C-h 
 
2464
@item
 
2465
@kbd{C-c C-e C-h} (@code{ess-roxy-hide-all}) @*
2458
2466
@pindex ess-roxy-hide-all
2459
 
@code{ess-roxy-hide-all}: Use the hideshow mode to fold away the
2460
 
visibility of all Roxygen entries. Hide-show support must be enabled for
2461
 
this binding to get defined.
2462
 
@end table
2463
 
 
2464
 
ESS also advices several standard editing functions in order to make
2465
 
Roxygen editing more intuitive. The advised functions are as follows.
2466
 
 
2467
 
@table @kbd
2468
 
@item C-c TAB 
 
2467
Use the hideshow mode to fold away the visibility of all Roxygen
 
2468
entries. Hide-show support must be enabled for this binding to get
 
2469
defined.
 
2470
 
 
2471
ESS also advices the following standard editing functions in order to make
 
2472
Roxygen editing more intuitive: 
 
2473
 
 
2474
@item
 
2475
@kbd{C-c TAB} (@code{ess-R-complete-object-name}) @*
2469
2476
@pindex ess-R-complete-object-name
2470
 
@code{ess-R-complete-object-name}: Complete Roxygen tag at
2471
 
point. E.g. doing @kbd{C-c TAB} when the point is at the end of
2472
 
@code{@@par} completes to @code{@@param}.
 
2477
Complete Roxygen tag at point. E.g. doing @kbd{C-c TAB} when the point
 
2478
is at the end of @code{@@par} completes to @code{@@param}.
2473
2479
 
2474
 
@item M-h 
 
2480
@item
 
2481
@kbd{M-h} (@code{mark-paragraph}) @*
2475
2482
@pindex mark-paragraph
2476
 
@code{mark-paragraph}: If the transient mark mode is active, place mark
2477
 
and point at start end end of the field at point and activate the mark.
 
2483
If the transient mark mode is active, place mark and point at start end
 
2484
end of the field at point and activate the mark.
2478
2485
 
2479
 
@item TAB 
 
2486
@item
 
2487
@kbd{TAB} (@code{ess-indent-command}) @*
2480
2488
@pindex ess-indent-command
2481
 
@code{ess-indent-command}: If hide-show support is enabled, fold away
2482
 
the visibility of the Roxygen entry at point.
 
2489
If hide-show support is enabled, fold away the visibility of the Roxygen
 
2490
entry at point.
2483
2491
 
2484
 
@item M-q 
 
2492
@item
 
2493
@kbd{M-q} (@code{fill-paragraph}) @*
2485
2494
@pindex fill-paragraph
2486
 
@code{fill-paragraph}: Fill the Roxygen field at point.
 
2495
Fill the Roxygen field at point.
2487
2496
 
2488
 
@item C-a 
 
2497
@item
 
2498
@kbd{C-a} (@code{move-beginning-of-line}) @*
2489
2499
@pindex move-beginning-of-line
2490
 
@code{move-beginning-of-line}: Move to the point directly to the right
2491
 
of the Roxygen start string.
 
2500
Move to the point directly to the right of the Roxygen start string.
2492
2501
 
2493
 
@item ENTER 
 
2502
@item
 
2503
@kbd{ENTER} (@code{newline-and-indent}) @*
2494
2504
@pindex newline-and-indent
2495
 
@code{newline-and-indent}: Insert a new line and the Roxygen prefix
2496
 
string.
2497
 
@end table
 
2505
Insert a new line and the Roxygen prefix string.
 
2506
@end itemize
2498
2507
 
2499
2508
@comment  node-name,  next,  previous,  up
2500
2509
@node Help, ESS for SAS, Editing R documentation, Top
2740
2749
* TAGS::                        Using TAGS for S files
2741
2750
* Rdired::                      Directory editor for R objects
2742
2751
* Rutils::                      R object/package management and help utilities
 
2752
* Org::                         Interaction with Org mode
2743
2753
@end menu
2744
2754
 
2745
2755
@comment  node-name,  next,  previous,  up
2990
3000
 
2991
3001
 
2992
3002
@comment  node-name,  next,  previous,  up
2993
 
@node Rutils, , Rdired, Miscellaneous
 
3003
@node Rutils, Org, Rdired, Miscellaneous
2994
3004
@section Rutils
2995
3005
 
2996
3006
Ess-rutils builds up on ess-rdired, providing key bindings for
3082
3092
 
3083
3093
 
3084
3094
 
 
3095
@comment  node-name,  next,  previous,  up
 
3096
@node Org,  , Rutils, Miscellaneous
 
3097
@section Interaction with Org mode
 
3098
 
 
3099
Org-mode (@uref{http://orgmode.org} now supports reproducible research
 
3100
and literate programming in many languages (including R) -- see chapter
 
3101
14 of the Org manual
 
3102
(@uref{http://orgmode.org/org.html#Working-With-Source-Code}.  For ESS
 
3103
users, this offers a document-based work environment within which to
 
3104
embed ESS usage.  R code lives in code blocks of an Org document, from
 
3105
which it can be edited in ess-mode, evaluated, extracted ("tangled") to
 
3106
pure code files.  The code can also be exported ("woven") with the
 
3107
surrounding text to several formats including HTML and LaTeX.  Results of
 
3108
evaluation including figures can be captured in the Org document, and
 
3109
data can be passed from the Org document (e.g. from a table) to the ESS
 
3110
R process.  (This section contributed by Dan Davison and Eric Schulte.)
 
3111
 
3085
3112
@comment  node-name,  next,  previous,  up@chapter Using S4
3086
3113
@node Mailing lists/bug reports, Customization, Miscellaneous, Top
3087
3114
@chapter Bugs and Bug Reporting, Mailing Lists