~ubuntu-branches/ubuntu/hoary/ess/hoary

« back to all changes in this revision

Viewing changes to doc/html/ess_10.html

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-02-15 20:08:31 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040215200831-7b1g2z10hylgz809
Tags: 5.1.24-6
* Newer standards
* Bug fix: "Half-broken dependency on emacs20", thanks to Martin
  Michlmayr (Closes: #232757).  replace with emacs21

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<HTML>
 
2
<HEAD>
 
3
<!-- Created by texi2html 1.56k from ess.texi on 6 August 2002 -->
 
4
 
 
5
<TITLE>ESS -- Emacs Speaks Statistics - Other features of ESS</TITLE>
 
6
</HEAD>
 
7
<BODY>
 
8
Go to the <A HREF="ess_1.html">first</A>, <A HREF="ess_9.html">previous</A>, <A HREF="ess_11.html">next</A>, <A HREF="ess_16.html">last</A> section, <A HREF="ess_toc.html">table of contents</A>.
 
9
<P><HR><P>
 
10
 
 
11
 
 
12
<H1><A NAME="SEC62" HREF="ess_toc.html#TOC62">Other features of ESS</A></H1>
 
13
 
 
14
<P>
 
15
ESS has a few miscellaneous features, which didn't fit anywhere else.
 
16
 
 
17
 
 
18
 
 
19
<UL>
 
20
<LI><A HREF="ess_10.html#SEC63">Highlighting</A>: Syntactic highlighting of buffers
 
21
<LI><A HREF="ess_10.html#SEC64">Graphics</A>: Using graphics with ESS
 
22
<LI><A HREF="ess_10.html#SEC67">Object Completion</A>
 
23
</UL>
 
24
 
 
25
 
 
26
 
 
27
<H2><A NAME="SEC63" HREF="ess_toc.html#TOC63">Syntactic highlighting of buffers</A></H2>
 
28
 
 
29
<P>
 
30
ESS provides Font-Lock (see section `Using Multiple Typefaces' in <CITE>The Gnu Emacs Reference Manual</CITE>) patterns for Inferior <B>S</B> Mode, S
 
31
Mode, and <B>S</B> Transcript Mode buffers.
 
32
<A NAME="IDX211"></A>
 
33
<A NAME="IDX212"></A>
 
34
 
 
35
 
 
36
<P>
 
37
To activate the highlighting, you need to turn on Font Lock mode in the
 
38
appropriate buffers.  This can be done on a per-buffer basis with
 
39
<KBD>M-x font-lock-mode</KBD>, or may be done by adding
 
40
<CODE>turn-on-font-lock</CODE> to <CODE>inferior-ess-mode-hook</CODE>,
 
41
<CODE>ess-mode-hook</CODE> and <CODE>ess-transcript-mode-hook</CODE>
 
42
(see section <A HREF="ess_12.html#SEC78">Customizing ESS with hooks</A>).  Your systems administrator may have done this for you
 
43
in <TT>`ess-site.el'</TT> (see section <A HREF="ess_12.html#SEC72">Customizing ESS</A>).
 
44
 
 
45
 
 
46
<P>
 
47
The font-lock patterns are defined in three variables, which you may
 
48
modify if desired:
 
49
 
 
50
 
 
51
<P>
 
52
<DL>
 
53
<DT><U>Variable:</U> <B>ess-inf-font-lock-keywords</B>
 
54
<DD><A NAME="IDX213"></A>
 
55
Font-lock patterns for Inferior <B>ESS</B> Mode.  The default value
 
56
highlights prompts, inputs, assignments, output messages, vector and
 
57
matrix labels, and literals such as <SAMP>`NA'</SAMP> and <CODE>TRUE</CODE>.
 
58
</DL>
 
59
 
 
60
 
 
61
<P>
 
62
<DL>
 
63
<DT><U>Variable:</U> <B>ESS-font-lock-keywords</B>
 
64
<DD><A NAME="IDX214"></A>
 
65
Font-lock patterns for <B>ESS</B> programming mode.  The default value
 
66
highlights function names, literals, assignments, source functions and
 
67
reserved words.
 
68
</DL>
 
69
 
 
70
 
 
71
<P>
 
72
<DL>
 
73
<DT><U>Variable:</U> <B>ess-trans-font-lock-keywords</B>
 
74
<DD><A NAME="IDX215"></A>
 
75
Font-lock patterns for <B>ESS</B> Transcript Mode.  The default value
 
76
highlights the same stuff as in Inferior <B>ESS</B> Mode.
 
77
</DL>
 
78
 
 
79
 
 
80
 
 
81
 
 
82
<H2><A NAME="SEC64" HREF="ess_toc.html#TOC64">Using graphics with ESS</A></H2>
 
83
 
 
84
<P>
 
85
<A NAME="IDX216"></A>
 
86
One of the main features of the <CODE>S</CODE> package is its ability to
 
87
generate high-resolution graphics plots, and ESS provides a number of
 
88
features for dealing with such plots.
 
89
 
 
90
 
 
91
 
 
92
<UL>
 
93
<LI><A HREF="ess_10.html#SEC65">printer</A>: The printer() graphics driver
 
94
<LI><A HREF="ess_10.html#SEC66">X11</A>: The X11() (and other X-windows based) driver
 
95
</UL>
 
96
 
 
97
 
 
98
 
 
99
<H3><A NAME="SEC65" HREF="ess_toc.html#TOC65">Using ESS with the <CODE>printer()</CODE> driver</A></H3>
 
100
 
 
101
<P>
 
102
This is the simplest (and least desirable) method of using graphics
 
103
within ESS.  S's <CODE>printer()</CODE> device driver produces crude character
 
104
based plots which can be contained within the <B>ESS</B> process buffer
 
105
itself.  To start using character graphics, issue the <B>S</B> command
 
106
 
 
107
<PRE>
 
108
printer(width=79)
 
109
</PRE>
 
110
 
 
111
<P>
 
112
<A NAME="IDX217"></A>
 
113
(the <CODE>width=79</CODE> argument prevents Emacs line-wrapping at column
 
114
80 on an 80-column terminal.  Use a different value for a terminal with
 
115
a different number of columns.) Plotting commands do not generate
 
116
graphics immediately, but are stored until the <CODE>show()</CODE> command
 
117
is issued, which displays the current figure.
 
118
 
 
119
 
 
120
 
 
121
 
 
122
<H3><A NAME="SEC66" HREF="ess_toc.html#TOC66">Using ESS with windowing devices</A></H3>
 
123
 
 
124
<P>
 
125
<A NAME="IDX218"></A>
 
126
Of course, the ideal way to use graphics with ESS is to use a windowing
 
127
system.  Under X windows, this requires that the DISPLAY environment
 
128
variable be appropriately set, which may not always be the case within
 
129
your Emacs process.  ESS provides a facility for setting the value of
 
130
DISPLAY before the <B>ESS</B> process is started if the variable
 
131
<CODE>ess-ask-about-display</CODE>
 
132
<A NAME="IDX219"></A>
 
133
is non-<CODE>nil</CODE>.  See section <A HREF="ess_12.html#SEC72">Customizing ESS</A>, for details of this variable,
 
134
and see section <A HREF="ess_3.html#SEC12">Starting the <B>ESS</B> process</A> for information on how to set the value of
 
135
DISPLAY when beginning an <B>S</B> session.
 
136
 
 
137
 
 
138
 
 
139
 
 
140
<H2><A NAME="SEC67" HREF="ess_toc.html#TOC67">Object Completion</A></H2>
 
141
 
 
142
<P>
 
143
If you are running S-PLUS or R, you might consider installing the
 
144
database files.  From within (X)Emacs, "C-x d" to the directory
 
145
containing ESS.  Now:
 
146
 
 
147
 
 
148
<P>
 
149
<CODE>M-x S+3</CODE>
 
150
 
 
151
 
 
152
<P>
 
153
(get S-PLUS running.  once you have reached the SPLUS 3.x prompt, do:)
 
154
 
 
155
 
 
156
<P>
 
157
<CODE>M-x ess-create-object-name-db</CODE>
 
158
 
 
159
 
 
160
<P>
 
161
(this will create the file: ess-s+3-namedb.el; if it isn't in the ESS
 
162
directory, move it there).
 
163
 
 
164
 
 
165
<P>
 
166
Then, completions will be autoloaded and will not be regenerated for
 
167
every session.
 
168
 
 
169
 
 
170
<P>
 
171
For R:
 
172
 
 
173
 
 
174
<P>
 
175
<CODE>M-x R</CODE>
 
176
 
 
177
 
 
178
<P>
 
179
(get R running.  once you have reached the R prompt, do:)
 
180
 
 
181
 
 
182
<P>
 
183
<CODE>M-x ess-create-object-name-db</CODE>
 
184
 
 
185
 
 
186
<P>
 
187
(this will create the file: ess-r-namedb.el; if it isn't in the ESS
 
188
directory, move it there).
 
189
 
 
190
 
 
191
<P><HR><P>
 
192
Go to the <A HREF="ess_1.html">first</A>, <A HREF="ess_9.html">previous</A>, <A HREF="ess_11.html">next</A>, <A HREF="ess_16.html">last</A> section, <A HREF="ess_toc.html">table of contents</A>.
 
193
</BODY>
 
194
</HTML>