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