Update Copyright.
[gnus] / texi / gnus-coding.texi
1 \input texinfo
2
3 @setfilename gnus-coding
4 @settitle Gnus Coding Style and Maintainance Guide
5 @syncodeindex fn cp
6 @syncodeindex vr cp
7 @syncodeindex pg cp
8
9 @copying
10 Copyright (c) 2004, 2005  Free Software Foundation, Inc.
11
12 @quotation
13 Permission is granted to copy, distribute and/or modify this document
14 under the terms of the GNU Free Documentation License, Version 1.1 or
15 any later version published by the Free Software Foundation; with no
16 Invariant Sections, with the Front-Cover texts being ``A GNU
17 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
18 license is included in the section entitled ``GNU Free Documentation
19 License'' in the Emacs manual.
20
21 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
22 this GNU Manual, like GNU software.  Copies published by the Free
23 Software Foundation raise funds for GNU development.''
24
25 This document is part of a collection distributed under the GNU Free
26 Documentation License.  If you want to distribute this document
27 separately from the collection, you can do so by adding a copy of the
28 license to the document, as described in section 6 of the license.
29 @end quotation
30 @end copying
31
32
33 @titlepage
34 @title Gnus Coding Style and Maintainance Guide
35
36 @author by Reiner Steib  <Reiner.Steib@@gmx.de>
37
38 @insertcopying
39 @end titlepage
40
41 @c Obviously this is only a very rudimentary draft.  We put it in CVS
42 @c anyway hoping that it might annoy someone enough to fix it.  ;-)
43 @c Fixing only a paragraph also is appreciated.
44
45 @node Top
46 @top Gnus Coding Style and Maintainance Guide
47 This manual describes @dots{}
48 @menu
49 * Gnus Coding Style:: Gnus Coding Style
50 * Gnus Maintainance Guide:: Gnus Maintainance Guide
51 @end menu
52
53 @node Gnus Coding Style
54 @chapter Gnus Coding Style
55 @section Dependencies
56
57 The Gnus distribution contains a lot of libraries that have been written
58 for Gnus and used intensively for Gnus.  But many of those libraries are
59 useful on their own.  E.g. other Emacs Lisp packages might use the
60 @acronym{MIME} library @xref{Top, ,Top, emacs-mime, The Emacs MIME
61 Manual}.
62
63 @subsection General purpose libraries
64
65 @table @file
66
67 @item netrc.el
68 @file{.netrc} parsing functionality.
69 @c As of 2005-10-21...
70 There are no Gnus dependencies in this file.
71
72 @item format-spec.el
73 Functions for formatting arbitrary formatting strings.
74 @c As of 2005-10-21...
75 There are no Gnus dependencies in this file.
76
77 @end table
78
79 @subsection Encryption and security
80
81 @table @file
82 @item encrypt.el
83 File encryption routines
84 @c As of 2005-10-25...
85 There are no Gnus dependencies in this file.
86
87 @item password.el
88 Read passwords from user, possibly using a password cache.
89 @c As of 2005-10-21...
90 There are no Gnus dependencies in this file.
91
92 @item tls.el
93 TLS/SSL support via wrapper around GnuTLS
94 @c As of 2005-10-21...
95 There are no Gnus dependencies in this file.
96
97 @item pgg*.el
98 Glue for the various PGP implementations.
99 @c As of 2005-10-21...
100 There are no Gnus dependencies in these files.
101
102 @end table
103
104 @subsection Networking
105
106 @table @file
107 @item dig.el
108 Domain Name System dig interface.
109 @c As of 2005-10-21...
110 There are no serious Gnus dependencies in this file.  Uses
111 @code{gnus-run-mode-hooks} (a wrapper function).
112
113 @item dns*.el
114 Domain Name Service lookups.
115 @c As of 2005-10-21...
116 There are no Gnus dependencies in these files.
117 @end table
118
119 @subsection Mail and News related RFCs
120
121 @table @file
122 @item pop3.el
123 Post Office Protocol (RFC 1460) interface.
124 @c As of 2005-10-21...
125 There are no Gnus dependencies in this file.
126
127 @item imap.el
128 @acronym{IMAP} library.
129 @c As of 2005-10-21...
130 There are no Gnus dependencies in this file.
131
132 @item ietf-drums.el
133 Functions for parsing RFC822bis headers.
134 @c As of 2005-10-21...
135 There are no Gnus dependencies in this file.
136
137 @item rfc1843.el
138 HZ (rfc1843) decoding.  HZ is a data format for exchanging files of
139 arbitrarily mixed Chinese and @acronym{ASCII} characters.
140 @c As of 2005-10-21...
141 @code{rfc1843-gnus-setup} seem to be useful only for Gnus.  Maybe this
142 function should be relocated to remove dependencies on Gnus.  Other
143 minor dependencies: @code{gnus-newsgroup-name} could be eliminated by
144 using an optional argument to @code{rfc1843-decode-article-body}.
145
146 @item rfc2045.el
147 Functions for decoding rfc2045 headers
148
149 @item rfc2047.el
150 Functions for encoding and decoding rfc2047 messages
151
152 @item rfc2104.el
153 RFC2104 Hashed Message Authentication Codes
154
155 @item rfc2231.el
156 Functions for decoding rfc2231 headers
157
158 @item flow-fill.el
159 Interpret RFC2646 "flowed" text
160 @c As of 2005-10-27...
161 There are no Gnus dependencies in this file.
162 @end table
163
164 @subsection message
165
166 All message composition from Gnus (both mail and news) takes place in
167 Message mode buffers.  Message mode is intended to be a replacement for
168 Emacs mail mode.  There should be no Gnus dependencies in
169 @file{message.el}.
170
171 @subsection Emacs @acronym{MIME}
172
173 The files @file{mml*.el} and @file{mm-*.el} provide @acronym{MIME}
174 functionality for Emacs.
175
176 @acronym{MML} (@acronym{MIME} Meta Language) is supposed to be
177 independent from Gnus.  Alas it is not anymore.
178
179
180 @subsection Gnus backends
181
182 The files @file{nn*.el} provide functionality for accessing NNTP
183 (@file{nntp.el}), IMAP (@file{nnimap.el}) and several other Mail back
184 ends (probably @file{nnml.el}, @file{nnfolder.el} and
185 @file{nnmaildir.el} are the most widely used mail back ends).
186
187
188 @c message / gnus
189 @c 
190 @c nn*
191 @c 
192 @c mm*
193 @c
194 @c rfc*
195 @c 
196 @c pgg*
197 @c tla netrc pop3 dig dns ...
198 @c format-spec.el
199
200
201 @section Compatibility
202
203 @c Compatibility with XEmacs and older Emacs versions in v5-10 and in
204 @c the trunk.
205
206 No Gnus should work on:
207 @itemize @bullet
208 @item
209 Emacs 21.1 and up.
210 @item
211 XEmacs 21.4 and up.
212 @end itemize
213
214 Gnus 5.10 should work on:
215 @itemize @bullet
216 @item
217 Emacs 20.7 and up.
218 @item
219 XEmacs 21.1 and up.
220 @end itemize
221
222 @node Gnus Maintainance Guide
223 @chapter Gnus Maintainance Guide
224
225 @section Stable and development versions
226
227 The development of Gnus normally is done on the CVS trunk, i.e. there
228 are no separate branches to develop and test new features.  Most of the
229 time, the trunk is developed quite actively with more or less daily
230 changes.  Only after a new major release, e.g. 5.10.1, there's usually a
231 feature period of several months.  After the release of Gnus 5.10.6 the
232 development of new features started again on the trunk while the 5.10
233 series is continued on the stable branch (v5-10) from which more stable
234 releases will be done when needed (5.10.7, @dots{}).
235
236 Stable releases of Gnus finally become part of Emacs.  E.g. Gnus 5.8
237 became a part of Emacs 21 (relabeled to Gnus 5.9).  The 5.10 series will
238 become part of Emacs 22 (as Gnus 5.11).
239
240 @section Syncing
241
242 @c Some MIDs related to this follow.  Use http://thread.gmane.org/MID
243 @c (and click on the subject) to get the thread on Gmane.
244
245 @c Some quotes from Miles Bader follow...
246
247 @c <v9eklyke6b.fsf@marauder.physik.uni-ulm.de>
248 @c <buovfd71nkk.fsf@mctpc71.ucom.lsi.nec.co.jp>
249
250 In the past, the inclusion of Gnus into Emacs was quite cumbersome.  For
251 each change made to Gnus in Emacs repository, it had to be checked that
252 it was applied to the new Gnus version, too.  Else, bug fixes done in
253 Emacs repository might have been lost.
254
255 With the inclusion of Gnus 5.10, Miles Bader has set up an Emacs-Gnus
256 gateway to ensure the bug fixes from Emacs CVS are propagated to Gnus
257 CVS semi-automatically.  These bug fixes are installed on the stable
258 branch and on the trunk.  Basically the idea is that the gateway will
259 cause all common files in Emacs and Gnus v5-10 to be identical except
260 when there's a very good reason (e.g., the Gnus version string in Emacs
261 says @samp{5.11}, but the v5-10 version string remains @samp{5.10.x}).
262 Furthermore, all changes in these files in either Emacs or the v5-10
263 branch will be installed into the Gnus CVS trunk, again except where
264 there's a good reason.
265 @c (typically so far the only exception has been that the changes
266 @c already exist in the trunk in modified form).
267 Because of this, when the next major version of Gnus will be included in
268 Emacs, it should be very easy -- just plonk in the files from the Gnus
269 trunk without worrying about lost changes from the Emacs tree.
270
271 The effect of this is that as hacker, you should generally only have to
272 make changes in one place:
273
274 @itemize
275 @item
276 If it's a file which is thought of as being outside of Gnus (e.g., the
277 new @file{encrypt.el}), you should probably make the change in the Emacs
278 tree, and it will show up in the Gnus tree a few days later.
279
280 If you don't have Emacs CVS access (or it's inconvenient), you can
281 change such a file in the v5-10 branch, and it should propagate to Emacs
282 CVS -- however, it will get some extra scrutiny (by Miles) to see if the
283 changes are possibly controversial and need discussion on the mailing
284 list.  Many changes are obvious bug-fixes however, so often there won't
285 be any problem.
286
287 @item
288 If it's to a Gnus file, and it's important enough that it should be part
289 of Emacs and the v5-10 branch, then you can make the change on the v5-10
290 branch, and it will go into Emacs CVS and the Gnus CVS trunk (a few days
291 later).  The most prominent examples for such changes are bug-fixed
292 including improvements on the documentation.
293
294 If you know that there will be conflicts (perhaps because the affected
295 source code is different in v5-10 and the Gnus CVS trunk), then you can
296 install your change in both places, and when I try to sync them, there
297 will be a conflict -- however, since in most such cases there would be a
298 conflict @emph{anyway}, it's often easier for me to resolve it simply if
299 I see two @samp{identical} changes, and can just choose the proper one,
300 rather than having to actually fix the code.
301
302 @item
303 For general Gnus development changes, of course you just make the
304 change on the Gnus CVS trunk and it goes into Emacs a few years
305 later... :-)
306 @end itemize
307
308 Of course in any case, if you just can't wait for me to sync your
309 change, you can commit it in more than one place and probably there will
310 be no problem; usually the changes are textually identical anyway, so
311 can be easily resolved automatically (sometimes I notice silly things in
312 such multiple commits, like whitespace differences, and unify those ;-).
313
314
315 @c I do Emacs->Gnus less often (than Gnus->Emacs) because it tends to
316 @c require more manual work.
317
318 @c By default I sync about once a week.  I also try to follow any Gnus
319 @c threads on the mailing lists and make sure any changes being discussed
320 @c are kept more up-to-date (so say 1-2 days delay for "topical" changes).
321
322 @c <buovfd71nkk.fsf@mctpc71.ucom.lsi.nec.co.jp>
323
324 @c BTW, just to add even more verbose explanation about the syncing thing:
325
326 @section Miscellanea
327
328 @heading @file{GNUS-NEWS}
329
330 Starting from No Gnus, the @file{GNUS-NEWS} is created from
331 @file{texi/gnus-news.texi}.  Don't edit @file{GNUS-NEWS}.  Edit
332 @file{texi/gnus-news.texi}, type @command{make GNUS-NEWS} in the
333 @file{texi} directory and commit @file{GNUS-NEWS} and
334 @file{texi/gnus-news.texi}.
335
336
337 @c Local Variables:
338 @c mode: texinfo
339 @c coding: iso-8859-1
340 @c End:
341
342 @ignore
343    arch-tag: ab15234c-2c8a-4cbd-8111-1811bcc6f931
344 @end ignore