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