04cc713f3b56ad046db6836dddd737b88160841c
[chise/xemacs-chise.git.1] / README.packages
1 The XEmacs Packages Quick Start Guide
2 -------------------------------------
3
4 This text is intended to help you get started installing a new XEmacs
5 and its packages from start.  For details see the 'Startup Paths' and
6 'Packages' sections of the XEmacs info manual.
7
8 Real Real Quickstart FAQ
9 ------------------------
10
11 Q. Do I need to have the packages to compile XEmacs?
12 A. No, XEmacs will build and install just fine without any packages
13    installed.  However, only the most basic editing functions will be
14    available with no packages installed, so installing packages is an
15    essential part of making your installed XEmacs _useful_.
16
17 Q. I really liked the old way that packages were bundled and do not
18    want to mess with packages at all.
19 A. You can grab all the packages at once like you used to with old
20    XEmacs versions, skip to the 'Sumo Tarball' section below.
21
22 Q. After installing, I want XEmacs to do `foo', but when I invoke it
23    (or click the toolbar button or select the menu item), nothing (or
24    an error) happens, and it used to work.
25 A. See the first FAQ; you may be missing a package that is essential to
26    you.  You can either track it down and install it, or install the
27    `Sumo Tarball' (see the second FAQ).
28
29 A note of caution
30 -----------------
31
32 The XEmacs package system is still in its infancy. Please expect a few
33 minor hurdles on the way. Also neither the interface nor the structure is
34 set in stone. The XEmacs maintainers reserve the right to sacrifice
35 backwards compatibility as quirks are worked out over the coming
36 releases.
37
38 Some Package Theory
39 -------------------
40
41 In order to reduce the size and increase the maintainability of XEmacs,
42 the majority of the Elisp packages that came with previous releases
43 have been unbundled. They have been replaced by the package system.
44 Each elisp add-on (or groups of them when they are small) now comes
45 in its own tarball that contains a small search hierarchy.
46
47 You select just the ones you need. Install them by untarring them into
48 the right place. On startup XEmacs will find them, set up the load
49 path correctly, install autoloads, etc, etc.
50
51 Package hierarchies
52 -------------------
53
54 On Startup XEmacs looks for packages in so called package hierarchies.
55 These can be specified by the 'package-path' parameter to the
56 'configure' script. However by default there are three system wide
57 hierarchies.
58
59 $prefix/lib/xemacs/site-packages
60      Local and 3rd party packages go here.
61
62 $prefix/lib/xemacs/mule-packages
63      Only searched by MULE-enabled XEmacsen.
64
65 $prefix/lib/xemacs/xemacs-packages
66      Normal packages go here.
67
68 Where to get the packages
69 -------------------------
70
71 Packages are available from ftp://ftp.xemacs.org/pub/xemacs/packages
72 and its mirrors.
73
74 How to install the packages
75 ---------------------------
76
77 1. All at once, using the 'Sumo Tarball'.
78 2. By hand.
79 3. Automatically, using the package tools from XEmacs.
80
81 The Sumo Tarball
82 ----------------
83
84 Those with little time, cheap connections and plenty of disk space can
85 install all the packages at once using the sumo tarballs.
86 Download the file
87
88 xemacs-sumo.tar.gz
89
90 For an XEmacs compiled with Mule you also need
91
92 xemacs-mule-sumo.tar.gz
93
94 N.B. They are called 'Sumo Tarballs' for good reason. They are
95 currently about 15MB and 2.3MB (gzipped) respectively.
96
97 Install them by
98
99 cd $prefix/lib/xemacs ; gunzip -c <tarballname> | tar xf -
100
101 As the Sumo tarballs are not regenerated as often as the individual
102 packages, it is recommended that you use the automatic package tools
103 afterwards to pick up any recent updates.
104
105 Installing by Hand
106 ------------------
107
108 Fetch the packages from the ftp site, CDROM whatever. The filenames
109 have the form name-<version>-pkg.tar.gz and are gzipped tar files. For
110 a fresh install it is sufficient to untar the file at the top of the
111 package hierarchy. For example if we are installing the 'xemacs-base'
112 package in version 1.27:
113
114 mkdir $prefix/lib/xemacs/xemacs-packages # if it does not exist yet
115 cd $prefix/lib/xemacs/xemacs-packages
116 gunzip -c ...../xemacs-base-1.27-pkg.tar.gz | tar xf -
117
118 For MULE related packages, it is best to untar in the mule-packages
119 hierarchy, i.e. for the mule-base package, version 1.25
120
121 mkdir $prefix/lib/xemacs/mule-packages # if it does not exist yet
122 cd $prefix/lib/xemacs/mule-packages
123 gunzip -c ...../mule-base-1.25-pkg.tar.gz | tar xf -
124
125 Installing automatically
126 ------------------------
127
128 XEmacs comes with some tools to make the periodic updating and
129 installing easier. It will notice if new packages or versions are
130 available and will fetch them from the ftp site.
131
132 Unfortunately this requires that a few packages are already in place.
133 You will have to install them by hand as above or use a SUMO tarball.
134 This requirement will hopefully go away in the future. The packages
135 you need are:
136
137    efs          - To fetch the files from the ftp site or mirrors.
138    xemacs-base  - Needed by efs.
139
140 and optionally:
141
142    mailcrypt    - If you have PGP installed and want to verify the
143                   signature of the index file.
144    mule-base    - Needed if you want to use XEmacs with MULE.
145
146 After installing these by hand, you can start XEmacs. (It is a good
147 idea to use 'xemacs -vanilla' here as your startup files might need
148 things now moved to packages.)
149
150  - First you need to specify an FTP site to use.
151       Use Options->Manage Packages->Add Download Site
152        or M-x customize-variable RET package-get-remote RET
153
154    Alternatively, if you already have the packages on a local disk
155    then you can specify this directly using 'M-x
156    pui-add-install-directory'. Please make sure you also have a
157    corresponding copy of the package index there.
158
159  - Invoke Options->Manage Packages->List & Install
160       or M-x pui-list-packages RET
161    XEmacs will now first try to fetch a new version of the package
162    index from the FTP site. Depending on whether you are using
163    'mailcrypt/PGP', you will get some question about keys to fetch or
164    whether to use the index without verifying the signature. If the
165    new index was different from the one already on disk, XEmacs will
166    offer you to overwrite the old index.
167
168 -  XEmacs will show you a buffer named "*Packages*" with an overview
169    of available and installed packages, including a short description.
170    In this buffer you can select which packages you want using the
171    mouse or using RET.
172
173 -  When you are finished choosing packages, invoke
174    'Packages->Install/Remove Select' from the menu or type 'x' to
175    begin installing packages.
176
177 After Installation
178 ------------------
179
180 New packages can only be used by XEmacs after a restart.
181
182 Note to MULE users
183 ------------------
184
185 Unlike all other packages the mule-base package is used at build/dump
186 time. This means that you need this available before compiling XEmacs
187 with MULE. Also it is a good idea to keep packages that are
188 MULE-only separate by putting them in the mule-packages hierarchy.
189
190 Which Packages to install?
191 --------------------------
192
193 This is difficult to say. When in doubt install a package. If you
194 administrate a big site it might be a good idea to just install
195 everything. A good minimal set of packages for XEmacs-latin1 would be
196
197 xemacs-base, xemacs-devel, c-support, cc-mode, debug, dired, efs,
198 edit-utils, fsf-compat, mail-lib, net-utils, os-utils, prog-modes,
199 text-modes, time
200
201 Unfortunately the package system currently provides neither
202 dependencies nor conflicts. This will be a future enhancement. The
203 above set includes most packages that are used by others.
204
205 See also '.../etc/PACKAGES' for further descriptions of the individual
206 packages (currently outdated).
207
208 Upgrading/Removing Packages
209 ---------------------------
210
211 As the exact files and their locations contained in a package may
212 change it is recommended to remove a package first before installing a
213 new version. In order to facilitate removal each package contains an
214 pgkinfo/MANIFEST.pkgname file which list all the files belong to the
215 package. M-x package-admin-delete-binary-package RET can be used to
216 remove a package using this file.
217
218 Note that the interactive package tools included with XEmacs already do
219 this for you.
220
221 User Package directories
222 ------------------------
223
224 In addition to the system wide packages, each user can have his own
225 packages installed in "~/.xemacs/xemacs-packages". If you want to
226 install packages there using the interactive tools, you need to set
227 'pui-package-install-dest-dir' to "~/.xemacs/xemacs-packages"
228
229 Site lisp/Site start
230 --------------------
231
232 The site-packages hierarchy replaces the old 'site-lisp' directory.
233 XEmacs no longer looks into a 'site-lisp' directly by default.
234 A good place to put 'site-start.el' would be in
235 $prefix/lib/xemacs/site-packages/lisp/
236
237 Finding the right packages
238 --------------------------
239
240 If you want to find out which package contains the functionality you
241 are looking for, use M-x package-get-package-provider, and give it a
242 symbol that is likely to be in that package.  For example, if some
243 code you want to use has a (require 'thingatpt) in it, try doing
244 M-x package-get-package-provider RET thingatpt , which will return
245 something like: (fsf-compat "1.06").