aboutsummaryrefslogtreecommitdiffstats
path: root/CONTRIBUTE
diff options
context:
space:
mode:
authorStephen Leake2014-12-23 13:11:45 -0600
committerStephen Leake2014-12-23 13:11:45 -0600
commitfcb978e24023e9af4e465ac98222543990c70ffc (patch)
treeb71306f0aea7235715da76f88a9cb92608bddeca /CONTRIBUTE
parent061f310c4a32491634b7563f4b8520f4824ed21b (diff)
downloademacs-fcb978e24023e9af4e465ac98222543990c70ffc.tar.gz
emacs-fcb978e24023e9af4e465ac98222543990c70ffc.zip
Move user-level information from CONTRIBUTE to doc/emacs/trouble.texi
Fixes bug#19299 * CONTRIBUTE: Move user-level information to doc/emacs/trouble.texi (commit messages): new, gathered from comments on emacs-devel (Changelog notes): add reference to GNU coding standards section 5.2; doc 'present tense', bug fix format (branches): freeze announcements are made on info-gnu-emacs mailing list (git vs rename): new * doc/emacs/trouble.texi: Move user-level information from CONTRIBUTE here * lisp/startup.el (fancy-about-text): change buttons for etc/CONTRIBUTE to (info "(emacs)Contributing")
Diffstat (limited to 'CONTRIBUTE')
-rw-r--r--CONTRIBUTE267
1 files changed, 73 insertions, 194 deletions
diff --git a/CONTRIBUTE b/CONTRIBUTE
index dc6fd71624a..a190bd982fc 100644
--- a/CONTRIBUTE
+++ b/CONTRIBUTE
@@ -1,196 +1,14 @@
1Copyright (C) 2006-2014 Free Software Foundation, Inc. 1This file contains information on Emacs developer processes.
2See end for license conditions.
3 2
3For information on contributing to Emacs as a non-developer, see
4(info "(emacs)Contributing") or
5http://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html
4 6
5 Contributing to Emacs 7* Information for Emacs Developers.
6
7Emacs is a collaborative project and we encourage contributions from
8anyone and everyone. If you want to contribute in the way that will
9help us most, we recommend (1) fixing reported bugs and (2)
10implementing the feature ideas in etc/TODO. However, if you think of
11new features to add, please suggest them too -- we might like your
12idea. Porting to new platforms is also useful, when there is a new
13platform, but that is not common nowadays.
14
15For documentation on Emacs (to understand how to implement your
16desired change), refer to:
17
18- the Emacs Manual
19 http://www.gnu.org/software/emacs/manual/emacs.html
20 (info "(Emacs)Top")
21
22- the Emacs Lisp Reference Manual
23 http://www.gnu.org/software/emacs/manual/elisp.html
24 (info "(elisp)Top")
25
26- http://www.gnu.org/software/emacs
27
28- http://www.emacswiki.org/
29
30There are many ways to contribute to Emacs:
31
32- implement a new feature, and submit a patch (see "Submitting
33 Patches" below).
34
35- answer questions on the Emacs user mailing list
36 https://lists.gnu.org/mailman/listinfo/help-gnu-emacs
37
38- write documentation, either on the wiki, or in the Emacs source
39 repository (see "Submitting Patches" below)
40
41- find and report bugs; use M-x report-emacs-bug
42
43- check if existing bug reports are fixed in newer versions of Emacs
44 http://debbugs.gnu.org/cgi/pkgreport.cgi?which=pkg&data=emacs
45
46- develop a package that works with Emacs, and publish it on your own
47 or in Gnu ELPA (see admin/notes/elpa).
48
49Here are some style and legal conventions for contributors to Emacs:
50
51
52* Coding Standards
53
54Contributed code should follow the GNU Coding Standards
55(http://www.gnu.org/prep/standards/ - may also be available in info on
56your system).
57
58If it doesn't, we'll need to find someone to fix the code before we
59can use it.
60
61Emacs has additional style and coding conventions:
62
63- the "Tips" Appendix in the Emacs Lisp Reference
64 http://www.gnu.org/software/emacs/manual/html_node/elisp/Tips.html
65 (info "(elisp)Tips").
66
67- Avoid using `defadvice' or `eval-after-load' for Lisp code to be
68 included in Emacs.
69
70- Remove all trailing whitespace in all source and text files.
71
72- Emacs has no convention on whether to use tabs in source code;
73 please don't change whitespace in the files you edit.
74
75- Use ?\s instead of ? in Lisp code for a space character.
76
77* Copyright Assignment
78
79The FSF (Free Software Foundation) is the copyright holder for GNU Emacs.
80The FSF is a nonprofit with a worldwide mission to promote computer
81user freedom and to defend the rights of all free software users.
82For general information, see the website http://www.fsf.org/ .
83
84Generally speaking, for non-trivial contributions to GNU Emacs we
85require that the copyright be assigned to the FSF. For the reasons
86behind this, see: http://www.gnu.org/licenses/why-assign.html .
87
88Copyright assignment is a simple process. Residents of some countries
89can do it entirely electronically. We can help you get started, and
90answer any questions you may have (or point you to the people with the
91answers), at the emacs-devel@gnu.org mailing list.
92
93(Please note: general discussion about why some GNU projects ask
94for a copyright assignment is off-topic for emacs-devel.
95See gnu-misc-discuss instead.)
96
97A copyright disclaimer is also a possibility, but we prefer an assignment.
98Note that the disclaimer, like an assignment, involves you sending
99signed paperwork to the FSF (simply saying "this is in the public domain"
100is not enough). Also, a disclaimer cannot be applied to future work, it
101has to be repeated each time you want to send something new.
102
103We can accept small changes (roughly, fewer than 15 lines) without
104an assignment. This is a cumulative limit (e.g. three separate 5 line
105patches) over all your contributions.
106
107* Getting the Source Code
108
109The current working version of the Emacs source code is stored in a
110git repository on the Savannah web site
111(http://savannah.gnu.org/projects/emacs). It is important to write
112your patch based on the current working version. If you start from an
113older version, your patch may be outdated (so that maintainers will
114have a hard time applying it), or changes in Emacs may have made your
115patch unnecessary.
116
117After you have downloaded the repository source, you should read the file
118INSTALL.REPO for build instructions (they differ to some extent from a
119normal build).
120
121* Submitting Patches
122
123Every patch must have several pieces of information before we
124can properly evaluate it.
125
126When you have all these pieces, bundle them up in a mail message and
127send it to the developers. Sending it to bug-gnu-emacs@gnu.org
128(which is the bug/feature list) is recommended, because that list
129is coupled to a tracking system that makes it easier to locate patches.
130If your patch is not complete and you think it needs more discussion,
131you might want to send it to emacs-devel@gnu.org instead. If you
132revise your patch, send it as a followup to the initial topic.
133
134** Description
135
136For bug fixes, a description of the bug and how your patch fixes it.
137
138For new features, a description of the feature and your implementation.
139
140** ChangeLog
141
142A ChangeLog entry as plaintext (separate from the patch).
143
144See the existing ChangeLog files for format and content. Note that,
145unlike some other projects, we do require ChangeLogs for
146documentation, i.e. Texinfo files.
147
148Ref: "Change Log Concepts" node of the GNU Coding Standards Info
149Manual, for how to write good log entries.
150http://www.gnu.org/prep/standards/html_node/Change-Log-Concepts.html
151
152When using git, commit messages should use ChangeLog format, with a
153single short line explaining the change, then an empty line, then
154unindented ChangeLog entries. (Essentially, a commit message should
155be a duplicate of what the patch adds to the ChangeLog files. We are
156planning to automate this better, to avoid the duplication.) You can
157use the Emacs functions log-edit-add-to-changelog or
158log-edit-insert-changelog to ease this process.
159
160** The patch itself.
161
162If you are accessing the Emacs repository, make sure your copy is
163up-to-date (e.g. with 'git pull'). You can commit your changes
164to a private branch and generate a patch from the master version
165by using
166 git format-patch master
167Or you can leave your changes uncommitted and use
168 git diff
169With no repository, you can use
170 diff -u OLD NEW
171
172** Mail format.
173
174We prefer to get the patches as plain text, either inline (be careful
175your mail client does not change line breaks) or as MIME attachments.
176
177** Please reread your patch before submitting it.
178
179** Do not mix changes.
180
181If you send several unrelated changes together, we will ask you to
182separate them so we can consider each of the changes by itself.
183
184** Do not make formatting changes.
185
186Making cosmetic formatting changes (indentation, etc) makes it harder
187to see what you have really changed.
188
189
190* Supplemental information for Emacs Developers.
191 8
192An "Emacs Developer" is someone who contributes a lot of code or 9An "Emacs Developer" is someone who contributes a lot of code or
193documentation to the Emacs repository. 10documentation to the Emacs repository. Generally, they have write
11access to the Emacs git repository on Savannah.
194 12
195** Write access to the Emacs repository. 13** Write access to the Emacs repository.
196 14
@@ -213,6 +31,31 @@ entry in their name, not yours. git distinguishes between the author
213and the committer; use the --author option on the commit command to 31and the committer; use the --author option on the commit command to
214specify the actual author; the committer defaults to you. 32specify the actual author; the committer defaults to you.
215 33
34** commit messages
35
36When using git, commit messages should use ChangeLog format, with the
37following modifications:
38
39- Add a single short line explaining the change, then an empty line,
40 then unindented ChangeLog entries.
41
42 You can use various Emacs functions to ease this process; see (info
43 "(emacs)Change Log Commands") or
44 http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html.
45
46- The summary line is limited to 72 characters (enforced by a commit
47 hook). If you have trouble making that a good summary, add a
48 paragraph below it, before the individual file descriptions.
49
50- If only a single file is changed, the summary line can be the normal
51 file first line (starting with the asterisk). Then there is no
52 individual files section.
53
54- Explaining the rationale for a design choice is best done in comments
55 in the source code. However, sometimes it is useful to describe just
56 the rationale for a change; that can be done in the commit message
57 between the summary line and the file entries.
58
216** Changelog notes 59** Changelog notes
217 60
218- Emacs generally follows the GNU coding standards when it comes to 61- Emacs generally follows the GNU coding standards when it comes to
@@ -222,11 +65,25 @@ specify the actual author; the committer defaults to you.
222 standards used to recommend) rather than 'like-this' (as they do 65 standards used to recommend) rather than 'like-this' (as they do
223 now), because `...' is so widely used elsewhere in Emacs. 66 now), because `...' is so widely used elsewhere in Emacs.
224 67
68- Some of the rules in the GNU coding standards section 5.2
69 "Commenting Your Work" also apply to Changelog entries: they must be
70 in English, and be complete sentences starting with a capital and
71 ending with a period (except the summary line should not end in a
72 period).
73
74 It is tempting to relax this rule for commit messages, since they
75 are somewhat transient. However, they are preserved indefinitely,
76 and have a reasonable chance of being read in the future, so it's
77 better that they have good presentation.
78
225- There are multiple ChangeLogs in the emacs source; roughly one per 79- There are multiple ChangeLogs in the emacs source; roughly one per
226 high-level directory. The ChangeLog entry for a commit belongs in the 80 high-level directory. The ChangeLog entry for a commit belongs in the
227 lowest ChangeLog that is higher than or at the same level as any file 81 lowest ChangeLog that is higher than or at the same level as any file
228 changed by the commit. 82 changed by the commit.
229 83
84- Use the present tense; describe "what the change does", not "what
85 the change did".
86
230- Preferred form for several entries with the same content: 87- Preferred form for several entries with the same content:
231 88
232 * help.el (view-lossage): 89 * help.el (view-lossage):
@@ -235,7 +92,13 @@ specify the actual author; the committer defaults to you.
235 92
236 (Rather than anything involving "ditto" and suchlike.) 93 (Rather than anything involving "ditto" and suchlike.)
237 94
238- In ChangeLog files, there is no standard or recommended way to 95- If the commit fixes a bug, add a separate line
96
97 Fixes: bug#NNNN
98
99 where NNNN is the bug number.
100
101- In ChangeLog entries, there is no standard or recommended way to
239 identify revisions. 102 identify revisions.
240 103
241 One way to identify revisions is by quoting their summary line. 104 One way to identify revisions is by quoting their summary line.
@@ -244,7 +107,7 @@ specify the actual author; the committer defaults to you.
244 "2014-01-16T05:43:35Z!esr@thyrsus.com". Often, "my previous commit" 107 "2014-01-16T05:43:35Z!esr@thyrsus.com". Often, "my previous commit"
245 will suffice. 108 will suffice.
246 109
247- There is no need to make separate change log entries for files such 110- There is no need to make separate ChangeLog entries for files such
248 as NEWS, MAINTAINERS, and FOR-RELEASE, or to indicate regeneration 111 as NEWS, MAINTAINERS, and FOR-RELEASE, or to indicate regeneration
249 of files such as 'configure'. "There is no need" means you don't 112 of files such as 'configure'. "There is no need" means you don't
250 have to, but you can if you want to. 113 have to, but you can if you want to.
@@ -266,9 +129,8 @@ emacs-devel mailing list, and not anywhere else.
266The trunk branch is named "master" in git; release branches are named 129The trunk branch is named "master" in git; release branches are named
267"emacs-nn" where "nn" is the major version. 130"emacs-nn" where "nn" is the major version.
268 131
269You must follow emacs-devel to know exactly what kinds of changes are 132Announcements about the freeze (and other important events) are made
270allowed on what branch at any time. Announcements about the freeze 133on the info-gnu-emacs mailing list.
271(and other important events) will contain "ANNOUNCE" in the subject.
272 134
273If you are fixing a bug that exists in the current release, be sure to 135If you are fixing a bug that exists in the current release, be sure to
274commit it to the release branch; it will be merged to the master 136commit it to the release branch; it will be merged to the master
@@ -287,6 +149,23 @@ then exclude that commit from the merge to trunk.
287See all the files in admin/notes/* . In particular, see 149See all the files in admin/notes/* . In particular, see
288admin/notes/newfile, see admin/notes/repo. 150admin/notes/newfile, see admin/notes/repo.
289 151
152*** git vs rename
153
154git does not explicitly represent a file renaming; it uses a percent
155changed heuristic to deduce that a file was renamed. So if you are
156planning to make extensive changes to a file after renaming it (or
157moving it to another directory), you should:
158
159- create a feature branch
160
161- commit the rename without any changes
162
163- make other changes
164
165- merge the feature branch to trunk, _not_ squashing the commits into
166 one. The commit message on this merge should summarize the renames
167 and all the changes.
168
290** Emacs Mailing lists. 169** Emacs Mailing lists.
291 170
292Discussion about Emacs development takes place on emacs-devel@gnu.org. 171Discussion about Emacs development takes place on emacs-devel@gnu.org.