UP | HOME

Support via Liberapay

Contributing to Org

The Org codebase is large, and contributing can be daunting at first, but don't hesitate to call for directions on the mailing list. If you are willing to help, there is plenty of low-hanging fruit for you, and the community will welcome your contribution.

When contributing, always keep the maintenance burden in mind:
are you alleviating it, or are you adding to it?

Overview of Org repositories

Ways to contribute 🦄

Ways that do not involve programming

  • Send bug reports. Before sending a bug report, make sure you read the section of the manual on how to provide useful feedback or this other great text: How to Send Bug Reports Effectively.
  • Try to reproduce bugs: That's always very helpful. Do subscribe to Org's mailing list and monitor new unreferenced bugs. Try to reproduce them. If you can reproduce a bug, reply to the original poster and add Confirmed. in a separate line of your email text, and the bug will then be shown on tracker.orgmode.org.
  • Help other users by replying to their questions on the mailing list or on other web places.
  • Contribute to Worg. Worg is collaborative documentation made of Org files. It's very easy to contribute to it. Learn more about Worg and how to contribute.
  • Share ideas and feature requests. Org is already mature, but new ideas keep popping up. If you want to request a feature, first dig into the mailing list to find similar proposals. If you cannot find any, subscribe to the list, read it for a while, then make your proposal. Formulate it with as much detail as possible, especially with examples.

Ways that involve programming

  • Check the requests for help: If you want to help with one of these tasks, say so on the list.
  • Check the list of confirmed bugs: Even if you just provide more information or ideas on how to fix them, this helps.
  • Submit patches to the mailing list. See how to format your first patch and details on how to submit it.
  • Write add-ons. The best way is to submit your code to the mailing list and discuss it with people. Many add-ons are published through GNU ELPA (for authors who signed the FSF copyright assignment) and NonGNU ELPA (for others). You'll need to sign the FSF copyright assignment FSF if you want to add your code in Org's core, because it will end up in GNU Emacs.
  • Maintain an Org file: If a file in the git repository does not have a maintainer 1 and you want to help by maintaining it, please read more on how Org is maintained and let us know by sending an email to the mailing list.

What does NOT help

  • Submitting feature requests without proper justification.
  • Submitting "It does not work" bug reports.
  • Submitting ill-formatted patches.
  • Sending too many emails.
  • Arguing.

We follow the GNU Kind Communications Guidelines and ask you to follow them too.

As a contributor, what can I expect?

Contributions are discussed on the Org mailing list.

When you contribute with a bug report
Expect someone to try reproducing the bug. Please make it easier by providing a minimal reproducible recipe. Check the manual on how to provide feedback. If no one replies, don't take it personally: it either means that nobody was able to reproduce the bug or that the bug does not seem that critical for someone else to confirm it.
When you contribute with a patch
Your patch will be listed on tracker.orgmode.org. If this is your first patch, don't expect the patch to be applied immediately. You can expect someone to review it and to suggest changes, either on the technical or formal aspects of the patch. If nobody seems to care enough to reply, don't take it personally: it means that maintainers are busy and/or that the patch does not seem critical enough.
When you contribute with an idea or a feature request
The best way to convince maintainers that your idea is worth considering is by detailing your use-case and by proposing a patch for it. Expect people to discuss the idea on the list, but please remember Org is very old now, used by many people with various needs. If nobody replies, don't take it personally.

In general, if you want to raise awareness on an email you sent, please wait at least for one month before bumping a thread. See What to do if you don't receive an answer.

The Org mailing list has volunteer contributor stewards who will try their best to make sure your contributions get all the attention they deserve.

Your first patch as an occasional contributor

You don't need write access to the repository to contribute with patches, just send them to the mailing list. Here is a checklist to go through before submitting a patch:

  1. Make your patch against the latest bugfix or main branch
  2. Run ~$ make test to catch broken tests2
  3. Check compilation warnings with ~$ make compile
  4. If relevant, include or update tests
  5. If your patch is adding a feature, please update etc/ORG-NEWS
  6. If relevant, don't forget to update doc/org-manual.org
  7. Take extra care of the commit message (see Commit messages and ChangeLog entries)
  8. If your change is small enough and you didn't sign the FSF copyright assignment3, include TINYCHANGE at the bottom of the commit message.

Details on how to submit patches

Coding conventions

Org is part of Emacs, so any contribution should follow the GNU Emacs Lisp coding conventions described in Emacs manual.

On top of these conventions :

  • When creating an option (as defcustom) or changing the default value of an existing one, use the next stable version of Org as the value of package-version. E.g. if the main branch version is 9.6-pre, use 9.6 for package-version.
  • Do not create commits that only perform space replacements 4.

Sending patches with Git

Please use Git or Magit to make patches and send them via email – this is perfectly fine for both major and minor changes.

When sending a patch (using git diff, git format-patch or git send-email, always add a properly formatted Emacs ChangeLog entry in the commit message. See this section for details on how to create such a ChangeLog.

Sending commits

For every patch you send, we suggest to use git format-patch or git send-email. Here is a suggested workflow:

~$ git pull                 # make sure your repo is up to date
~$ git branch my-changes    # create a new branch from main
~$ git checkout my-changes  # switch to this new branch

… make some changes (1) …

~$ git commit -a -m "This is change (1)"  # Commit your change

… make another change (2) …

~$ git commit -a -m "This is change (2)"  # Commit your change
~$ git format-patch main                 # Creates two patches (.patch files)

Then two patches for your two commits are ready to be sent to the list.

To finally send the patches, you can either add them as attachments to your email (easier) or use git send-email, if it's properly configured.

Write useful commit messages: please provide (1) a reason for it in your email and (2) a ChangeLog entry in the commit message (again, see this section on how to format a ChangeLog entry.)

Sending quick fixes for testing purpose

If you want to send a quick fix that needs to be further tested by other people (before you submit a real patch), here is what you can do:

This command will make a patch between the staging area (in your computer), and the file you modified:

git diff -p org-whatever.el > org-whatever.el.diff

If you already committed your changes to your index (staging area), then you should compare against a particular branch (in this example, origin/main):

git diff -p origin/main org-whatever.el > org-whatever.el.diff

You email the output to the mailing list, adding [PATCH] to the subject, and description of what you fixed or changed.

Note that small patches sent like this still need to have a ChangeLog entry to be applied. If your patch looks good to you, it's always better to send a patch through git format-patch.

Sharing changes from a public branch

When discussing important changes, it is sometimes not so useful to send long and/or numerous patches.

In this case, you can maintain your changes on a public branch of a public clone of Org and send a link to the diff between your changes and the latest Org commit that sits in your clone.

If the discussion settles and your change is accepted, you can now send it as (a list of) patch(es) to the latest Org version.

Your first commit as an Org maintainer

Org regular contributors and maintainers have write access to the Git repository.

  1. Fill in this form and wait for the FSF feedback
  2. Create an account on savannah.gnu.org
  3. Request to join the Savannah Emacs group

Once you are granted access to the Emacs group:

  1. If your change is backward-incompatible, discuss it first on the list
  2. Apply your changes against the code and the documentation
  3. Run make test
  4. Remember to add a "news" entry in the etc/ORG-NEWS file if needed
  5. If the tests pass, commit and push your changes

If you are undertaking big changes, please create a dedicated branch locally and make sure you have a clean commit history before merging it into the bugfix or main branch.

To check our Git workflow in more details, please read Org maintenance.

Commit messages and ChangeLog entries

What's in a commit message?

A commit message should be constructed in the following way:

  • Line 1 of the commit message should always be a short description of the overall change. Line 1 does not get a dot at the end and does not start with a star. Generally, it starts with the filename that has been changed, followed by a colon, like this:

    lisp/ol-man.el: Restore file
    
  • Line 2 is an empty line.
  • Line 3 starts the ChangeLog entry. It looks like this:

    * org-timer.el (org-timer-cancel-timer, org-timer-stop): Enhance
    message.
    (org-timer-set-timer): Use the number of minutes in the Effort
    property as the default timer value.  Three prefix arguments will
    ignore the Effort value property.
    

    There should be an entry for every file changed in the commit. This includes, for instance, etc/ORG-NEWS and doc/org-manual.org if your change was relevant there. This is a good example of a TINYCHANGE that also touched the manual and news files.

    Please refer to GNU standards for more detailed information about the purpose and contents of the ChangeLog entries.

  • After the ChangeLog entry, another empty line should come before any additional information that the committer wishes to provide in order to explain the patch.
  • If the change is a minor change made by a committer without copyright assignment to the FSF, the commit message should also contain the cookie TINYCHANGE after the ChangeLog entry.
  • If the commit fixes a bug reported by someone on the list, you can add this contextual information like this:

    Reported-by: "Bruce E. Robertson" <brucer42@gmail.com>
    Link: https://list.orgmode.org/877dch89s1.fsf@kyleam.com/
    

    Only add links to the mailing list archive at list.orgmode.org.

    If a bug has been reported elsewhere on the web, don't reference such URLs: send an email to the list with a bug report and add a reference to your email in the commit message.

Conventions

  • Variables and functions names are quoted like `this' (a backquote and a single quote).
  • Sentences should be separated by two spaces.
  • Sentences should start with an uppercase letter.
  • Avoid the passive form: i.e., use "change" instead of "changed".

Example

Here is an example for such a message:

org-capture.el: Fix the case of using a template file

* lisp/org-capture.el (org-capture-set-plist): Make sure txt is a
string before calling `string-match'.
(org-capture-templates): Fix customization type.

* doc/org.texi (Capture): Document using a file for a template.

The problem here was that a wrong keyword was given in the
customization type.  This let to a string-match against a list value.

Modified from a patch proposal by Johan Friis.

TINYCHANGE

Producing ChangeLog entries

If you are using magit in Emacs, the ChangeLog for such entries can be produced by pressing C (for magit-commit-add-log) on the diff chunks of a staged file. (If you prefer storing your ChangeLog entries in a file, you can also use C-x 4 a (magit-add-change-log-entry-other-window) from within magit display of diff chunks.)

Another option to produce the entries is to use C-x 4 a in the changed function or the diff listing. This creates entries in the ChangeLog file and you can then cut and paste these to the commit message and remove the indentation.

Further reference:

Current contributors

You can check current contributors on this page.

Footnotes:

1

grep -lv "^;; Maintainer:" `find ./lisp -name "*.el"` | less

2

If the patch is trivial enough, testing against your own version of GNU Emacs is probably enough. For new features and complex changes, we recommend testing against the latest stable version of GNU Emacs.

3

Your total contribution (all patches you submit) should change less than 15 lines. See the CONTRIBUTE file in GNU Emacs. If you contribute more, you have to assign the copyright of your contribution to the Free Software Foundation.

4

Whitespace-only commits make it difficult to search across git history. See the discussion in https://yhetil.org/emacs-devel/E1k8aul-0001mr-Mg@fencepost.gnu.org/

Documentation from the orgmode.org/worg/ website (either in its HTML format or in its Org format) is licensed under the GNU Free Documentation License version 1.3 or later. The code examples and css stylesheets are licensed under the GNU General Public License v3 or later.