App-Chart
view release on metacpan or search on metacpan
doc/chart.texi view on Meta::CPAN
list of language preferences for message translations (@pxref{Using
gettextized software,, User influence on @code{gettext}, libc, GNU C Library
Reference Manual}). For example to have Italian preferred, otherwise Spanish,
otherwise English,
@example
LANGUAGE=it_IT:es:en
export LANGUAGE
@end example
Chart looks at @env{LANGUAGE} too (on all systems) for the preferred language
for stock and commodity names.
@c ---------------------------------------------------------------------------
@node Emacs, Concept Index, Internationalization, Top
@chapter Emacs
@cindex Emacs
@uref{http://www.gnu.org/software/emacs/}
@cindex @file{chartprog.el}
@cindex XEmacs
@file{chartprog.el} shows the Chart watchlist and gets quotes within Emacs
(@CHARTpxreftop{emacs, The Emacs Editor}). It's designed for Emacs 21 and
higher, and also works with XEmacs 21 if you have the UTF-8 coding system (see
below).
@cindex Autoload @file{chartprog.el}
@cindex @file{chartprog-loaddefs.el}
@cindex @file{.emacs}
The Debian package has the following setups already. Otherwise, the best way
to use @file{chartprog.el} is with autoloads for the commands.
@file{chartprog-loaddefs.el} is a small file which sets this up. Add the
following to your @file{.emacs} file (@pxref{Init File,, The Init File
@file{~/.emacs}, emacs, The Emacs Editor}),
@lisp
(require 'chartprog-loaddefs)
@end lisp
@cindex @code{load-path}
@cindex @code{site-lisp}
The build system currently doesn't install @file{chartprog.el} into
@file{site-lisp}, so you should copy it and @file{chartprog-loaddefs.el} to
somewhere in your @code{load-path} (@pxref{Lisp Libraries,, Libraries of Lisp
Code for Emacs, emacs, The Emacs Editor}).
@c If Chart isn't installed in a standard location you'll need to add its lisp
@c directory (@file{$prefix/share/emacs/site-lisp}) to your Emacs
@c @code{load-path}
@section Watchlist and Quotes
@findex @code{chart-watchlist}
@kbd{M-x chart-watchlist} displays the Favourites list in a buffer. Key
@key{a} adds a symbol. @kbd{C-k} and @kbd{C-y} kill and yank symbols.
@key{g} refreshes the quotes. @key{L} selects a different list (like the
Alerts list). The usual @kbd{C-h m} mode help shows other key bindings.
Chart communicates changes to the lists between the Emacs display and a
running Chart GUI@. So if you have both open then changes in one are
reflected in the other a moment later.
@findex @code{chart-quote}
@kbd{M-x chart-quote} displays a quote for a given symbol in the message area.
It prompts for the symbol with default a symbol at point. @key{Tab}
completion is available (@pxref{Completion,,, emacs, The Emacs Editor}) using
the database symbols, favourites list, and previously requested symbols.
@findex @code{chart-quote-at-point}
@kbd{M-x chart-quote-at-point} displays a quote for the symbol at point,
without prompting.
The language, date formats, etc, follow the Chart locale selection described
in @ref{Internationalization}. Emacs @kbd{M-x set-language-environment} and
other Emacs setups don't influence the display.
@section UTF-8
@cindex Asian characters in Emacs
@cindex XEmacs UTF-8
UTF-8 is used in Emacs, the same as in the Gtk GUI display. This is easiest
to implement, and should mean whatever is seen in the GUI can be seen in
Emacs.
@table @asis
@cindex MULE-UCS
@item Emacs 21
If you use an Asian locale then you probably know Emacs 21 has limited support
for Asian parts of UTF-8. The typical symptom is @samp{\207}, @samp{\221} etc
in the display. Install the MULE-UCS package to add to the builtin
characters: @uref{http://www.m17n.org}
@item XEmacs 21
If you use XEmacs 21 you probably know it has no builtin UTF-8. To run
@code{chartprog.el} you must get one of the add-ons providing that. MULE-UCS
is recommended (@uref{http://www.m17n.org}), and @code{chartprog.el} will
attempt to load it automatically.
@end table
@section Lisp
@cindex Lisp
@defun chart-latest symbol &optional field scale
Return the latest price for @var{symbol} (a string) from Chart. If there's no
information available (an unknown stock, not online, nothing cached, etc) the
return is @code{nil}.
@example
(chart-latest "F") @result{} 19.55
@end example
@c SYMBOL: F
@var{field} is a lisp symbol for what data to return. The default is
@code{last} which is the last traded price. The fields are
( run in 0.512 second using v1.01-cache-2.11-cpan-2398b32b56e )