Skip to content
Generate Orgmode-formatted READMEs from your Emacs Lisp file headers.
Emacs Lisp Makefile
Branch: master
Clone or download
Pull request Compare This branch is 13 commits ahead, 11 commits behind thomas11:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Makefile
README.org
h2o.el

README.org

h2o

Orgmode-formatted READMEs for your ELisp

Copyright (C) 2009 Thomas Kappler Copyright (C) 2011-2016 Puneeth Chaganti

  • Author: Puneeth Chaganti <punchagan@muse-amuse.in>
  • Created: 2011 March 20
  • Keywords: lisp, help, readme, orgmode, header, documentation, github
  • URL: https://github.com/punchagan/h2o

This file is not part of GNU Emacs.

Licensed under the GPL version 3 or later.

Commentary

The git-based source code hosting site http://github.com has lately become popular for Emacs Lisp projects. Github has a feature that displays files named “README[.suffix]” automatically on a project’s main page. If these files are formatted in Orgmode, the formatting is interpreted. See http://github.com/guides/readme-formatting for more information.

Emacs Lisp files customarily have a header in a fairly standardized format. h2o extracts this header, re-formats it to Orgmode, and writes it to the file “README.org” in the same directory. If you put your code on github, you could have this run automatically, for instance upon saving the file or from a git pre-commit hook, so you always have an up-to-date README on github.

It recognizes headings, the GPL license disclaimer which is replaced by a shorter notice linking to the GNU project’s license website, lists, and normal paragraphs. Lists are somewhat tricky to recognize automatically, and the program employs a very simple heuristic currently.

Dependencies

None.

Installation

(require ‘h2o), then you can call h2o-generate manually. I have not found a way to call it automatically that I really like, but here is one that works for me:

(require ‘h2o) (dir-locals-set-class-variables ‘generate-README-with-h2o ‘((emacs-lisp-mode . ((h2o-generate-readme . t))))) (dolist (dir ‘(“~/Projects/wpmail/” “~/Projects/h2o/”)) (dir-locals-set-directory-class dir ‘generate-README-with-h2o)) (add-hook ‘after-save-hook ‘(lambda () (if (boundp ‘h2o-generate-readme) (h2o-generate))))

History

2009-11: First release. 2011-03: Forked for Orgmode.

To Do

  • Fix codeblock rendering

README.org generated from the library header in h2o.el by h2o

You can’t perform that action at this time.