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.
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.
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.
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.
2449
@item C-c C-e p @code{ess-roxy-previous-entry}
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.
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.
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.
2464
ESS also advices several standard editing functions in order to make
2465
Roxygen editing more intuitive. The advised functions are as follows.
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
2471
ESS also advices the following standard editing functions in order to make
2472
Roxygen editing more intuitive:
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}.
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.
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
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.
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.
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
2505
Insert a new line and the Roxygen prefix string.
2499
2508
@comment node-name, next, previous, up
2500
2509
@node Help, ESS for SAS, Editing R documentation, Top
3095
@comment node-name, next, previous, up
3096
@node Org, , Rutils, Miscellaneous
3097
@section Interaction with Org mode
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.)
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