Skip to content

Commit

Permalink
tidy & refactor code, and changelog code bugfix
Browse files Browse the repository at this point in the history
New function org-readme-regexp-pairs
New option org-readme-author-name (not used yet)
  • Loading branch information
vapniks committed Nov 12, 2015
1 parent aad8808 commit 75114ec
Show file tree
Hide file tree
Showing 2 changed files with 511 additions and 361 deletions.
288 changes: 270 additions & 18 deletions Readme.org
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
- Author :: Matthew L. Fidler
- Maintainer :: Matthew L. Fidler
- Created :: Fri Aug 3 22:33:41 2012 (-0500)
- Version :: 20151112.36
- Version :: 20151112.2115
- Package-Requires :: ((http-post-simple "1.0") (yaoddmuse "0.1.1")(header2 "21.0") (lib-requires "21.0"))
- Last-Updated :: Wed Aug 22 13:11:26 2012 (-0500)
- By :: Matthew L. Fidler
- Last-Updated :: Thu Nov 12 23:37:26 2012 (-0500)
- By :: Joe Bloggs
- Update # :: 794
- URL :: https://github.com/mlf176f2/org-readme
- Keywords :: Header2, Readme.org, Emacswiki, Git
Expand Down Expand Up @@ -77,25 +77,163 @@ libraries and why they are needed.
* Functions & macros
** Interactive Functions

*** org-readme-changelog-to-readme
=(org-readme-changelog-to-readme)=

This puts the Emacs Lisp change-log into the Readme.org file.

*** org-readme-convert-to-emacswiki
=(org-readme-convert-to-emacswiki)=

Converts Readme.org to oddmuse markup and uploads to emacswiki.

*** org-readme-convert-to-markdown
=(org-readme-convert-to-markdown)=

Converts Readme.org to markdown Readme.md.

*** org-readme-edit
=(org-readme-edit)=

Edit change comment for commit.

*** org-readme-edit-cancel
=(org-readme-edit-cancel)=

Cancel the edit log.

*** org-readme-edit-commit
=(org-readme-edit-commit)=

Changelog for editing.

*** org-readme-gen-info
=(org-readme-gen-info)=

With the proper tools, generates an info and dir from the current readme.org

*** org-readme-git
=(org-readme-git)=

Add The files to git.

*** org-readme-insert-variables
=(org-readme-insert-variables)=

Extracts variable documentation and places it in the readme file.

*** org-readme-marmalade-post
=(org-readme-marmalade-post)=

Posts the current buffer to Marmalade.

*** org-readme-sync
=(org-readme-sync &optional COMMENT-ADDED)=

Syncs Readme.org with current buffer.
When COMMENT-ADDED is non-nil, the comment has been added and the syncing should begin.

*** org-readme-to-commentary
=(org-readme-to-commentary)=

Replace Commentary section in elisp file with text from Readme.org.

*** org-readme-top-header-to-readme
=(org-readme-top-header-to-readme)=

Copy top header from the elisp file into the readme file as Library Information.

** Internal Functions

*** macro
macro is an alias for =macro=,
which is not defined. Please make a bug report.
*** org-readme-buffer-version
=(org-readme-buffer-version)=

Gets the version of the current buffer.

*** org-readme-build-el-get
=(org-readme-build-el-get)=

Builds an el-get recipe. This assumes github, though others could be added.
Returns file name if created.

*** org-readme-build-melpa
=(org-readme-build-melpa)=

Builds a melpa recipe. This assumes github, though other could be added.
Returns file name if created.

*** org-readme-find-readme
=(org-readme-find-readme)=

Find the Readme.org.

*** org-readme-get-change
=(org-readme-get-change)=

Get file for changelog commits.

*** org-readme-get-emacswiki-name
=(org-readme-get-emacswiki-name)=

Gets emacswiki-style name based on buffer.

*** org-readme-in-readme-org-p
=(org-readme-in-readme-org-p)=

Determine if the currently open buffer is the Readme.org

*** org-readme-insert-functions
=(org-readme-insert-functions)=

Extracts function & macro documentation and places it in the Readme.org file.

*** un
un is an alias for =un=,
which is not defined. Please make a bug report.
*** org-readme-marmalade-version
=(org-readme-marmalade-version PACKAGE)=

Gets the marmalade version of the PACKAGE.

*** org-readme-regexp-pairs
=(org-readme-regexp-pairs PAIRS &optional FIXEDCASE LITERAL STRING
SUBEXP)=

Replace regex string find/replace PAIRS in buffer.
BEGIN END are the region boundaries.
PAIRS is: [[regexStr1 replaceStr1] [regexStr2 replaceStr2] …]
It can be list or vector, for the elements or the entire argument.
The optional arguments FIXEDCASE, LITERAL, STRING & SUBEXP are the same as in =replace-match=.

*** org-readme-remove-section
=(org-readme-remove-section SECTION &optional TXT ANY-LEVEL
AT-BEGINNING)=

Remove =org-mode= SECTION. Optionally insert TXT.
When ANY-LEVEL is non-nil, any level may be specified.
When AT-BEGINNING is non-nil, if the section is not found, insert it at the beginning.

*** org-readme-single-lisp-p
=(org-readme-single-lisp-p)=

Determine if the Readme.org is in a directory with a single Lisp file.
If so, return the name of that Lisp file, otherwise return nil.

*** org-readme-token
=(org-readme-token)=

Gets marmalade-token, if not already saved.

** Macros

*** org-readme-check-opt
=(org-readme-check-opt OPT &optional PROMPT)=

Query user if option OPT is 'prompt, otherwise return OPT.
If PROMPT is supplied use that for the prompt, otherwise use
the first sentence of the docstring for OPT.
* History

8-May-2013 Matthew L. Fidler
Last-Updated: Wed Aug 22 13:11:26 2012 (-0500) #794 (Matthew L. Fidler)
Add bugfix from vapniks for org-readme-to-commentray
3-May-2013 Matthew L. Fidler
Last-Updated: Wed Aug 22 13:11:26 2012 (-0500) #794 (Matthew L. Fidler)
Uploading using org-readme.
- 12-Nov-2015 :: Refactor and tidy up code (Joe Bloggs)
- 8-May-2013 :: Add bugfix from vapniks for org-readme-to-commentary (Matthew L. Fidler)
- 3-May-2013 :: Uploading using org-readme. (Matthew L. Fidler)
- 22-Mar-2013 :: Bug fix for org-readme generating texinfo documentation from org-files. (Matthew L. Fidler)
- 22-Mar-2013 :: Separated out the texinfo conversion so that this may be applied to a generalized readme. (Matthew L. Fidler)
- 13-Mar-2013 :: Added bug fix so that starred initial variables do not mess with org-cut-region. That way, strange duplication of lines and regions do not occur. (Matthew L. Fidler)
Expand Down Expand Up @@ -180,15 +318,129 @@ which is not defined. Please make a bug report.
- 11-Aug-2012 :: Bug fix to upload to emacswiki and upload to marmalade-repo (Matthew L. Fidler)
- 11-Aug-2012 :: Added marmalade-repo support. Now org-readme should upload to marmalade-repo when the version is different from the latest version. (Matthew L. Fidler)
- 08-Aug-2012 :: Fixed preformatting tags in emacswiki post. Previously they may have been replaced with <PRE></pre> instead of <pre></pre>. This makes the emacswiki page display correctly. (Matthew L. Fidler)
- 07-Aug-2012 :: To use, put (require 'ess-smart-underscore) in your ~/.emacs file 7-Aug-2012 Matthew L. Fidler Last-Updated: Tue Aug 7 19:14:34 2012 (-0500) #331 (Matthew L. Fidler) Added a Comment to EmcsWiki pages that states that the content of the page will likely be overwitten since it is automatically generated by =org-readme= 7-Aug-2012 Matthew L. Fidler Last-Updated: Mon Aug 6 23:42:02 2012 (-0500) #328 (Matthew L. Fidler) Added more documentation. (Matthew L. Fidler)
- 07-Aug-2012 :: To use, put (require 'ess-smart-underscore) in your ~/.emacs file (Matthew L. Fidler)
- 7-Aug-2012 :: Added a Comment to EmcsWiki pages that states that the content of the page will likely be overwitten since it is automatically generated by =org-readme= (Matthew L. Fidler)
- 7-Aug-2012 :: Added more documentation. (Matthew L. Fidler)
- 06-Aug-2012 :: Added support for uploading Readme.org files to emacswiki without having to have a single associated lisp file. (Matthew L. Fidler)
- 06-Aug-2012 :: Bug fix for syncing from the single lisp file. (Matthew L. Fidler)
- 06-Aug-2012 :: Added the ability to call =org-readme-sync= from Readme.org (Matthew L. Fidler)
- 05-Aug-2012 :: Added git pushing to org-readme (Matthew L. Fidler)
- 05-Aug-2012 :: Added git support as well as a comment mode. The only thing that should need to be called is =org-readme-sync= (Matthew L. Fidler)
- 04-Aug-2012 :: Added syncing with emacswiki. (Matthew L. Fidler)
- 04-Aug-2012 :: Initial Release (Matthew L. Fidler)
* Variables
- 04-Aug-2012 :: Initial Release (Matthew L. Fidler)* Variables
** Customizable Variables

*** org-readme-add-changelog-to-readme
Add Changelog information to Readme.org.

*** org-readme-add-functions-to-readme
Add a Functions section to Readme.org.

*** org-readme-add-readme-to-lisp-file
Update elisp file header with commentary section of Readme.org.

*** org-readme-add-top-header-to-readme
Add Top Header information to Readme.org.

*** org-readme-add-variables-to-readme
Add a Variables section to Readme.org.

*** org-readme-author-name
Name to use as author when updating "Last Updated" info in elisp header.

*** org-readme-build-el-get-recipe
Build an el-get recipe based on github information.

*** org-readme-build-info
Build library-name.info from Reade.org using texi.
Requires =org-readme-build-texi= to be non-nil, pandoc and makeinfo to be found.
This will also create the directory entry using install-info, if it is found.

*** org-readme-build-markdown
Build Readme.md from Readme.org.

*** org-readme-build-melpa-recipe
Build a melpa recipe based on github information.

*** org-readme-build-texi
Build library-name.texi from Readme.org, using Readme.md and pandoc.
Requires =org-readme-build-markdown= to be non-nil as pandoc to be found.

*** org-readme-create-tar-package
Create a tar package for use in ELPA.

*** org-readme-default-template
Default template for blank Readme.org Files. LIB-NAME is replaced with the library.

*** org-readme-drop-markdown-after-build-texi
Remove Readme.md after texinfo is generated.

*** org-readme-drop-texi-after-build-info
Remove the texi information after building info files.

*** org-readme-marmalade-server
Marmalade server website.
This should start with http: and should notend with a trailing forward slash,
just like the default value of http://marmalade-repo.org

*** org-readme-marmalade-token
Marmalade token to upload content to the marmalade server.

*** org-readme-marmalade-user-name
Marmalade user name to upload content to the marmalade server.

*** org-readme-remove-sections
List of sections to remove when changing the Readme.org to Commentary.

*** org-readme-remove-sections-from-markdown
List of sections to remove when changing the Readme.org to Markdown which is an intermediary for texinfo (using pandoc).

*** org-readme-sync-emacswiki
Post library to the emacswiki.
Requires =yaoddmuse=.

*** org-readme-sync-git
Post library to git.

*** org-readme-sync-marmalade
Post library to marmalade-repo.org.

*** org-readme-update-changelog
Add/update Changelog file.

*** org-readme-use-melpa-versions
Use Melpa-type versions YYYYMMDD.HHMM instead of 0.0.0 versions.

*** org-readme-use-pandoc-markdown
Use pandoc's grid tables instead of transferring the tables to html.

** Internal Variables

*** org-readme-edit-mode-map
Keymap for editing change-logs.

Value: (keymap
(24 keymap
(19 . org-readme-edit-commit))
(3 keymap
(11 . org-readme-edit-cancel)
(3 . org-readme-edit-commit))
keymap
(menu-bar keymap
(text "Text" keymap
(center-line menu-item "Center Line" center-line :help "Center the current line")
(center-paragraph menu-item "Center Paragraph" center-paragraph :help "Center the current paragraph")
(center-region menu-item "Center Region" center-region :help "Center the marked region" :enable
(region-active-p))
(sep "--")
(paragraph-indent-minor-mode menu-item "Paragraph Indent" paragraph-indent-minor-mode :button
(:toggle bound-and-true-p paragraph-indent-minor-mode)
:help "Toggle paragraph indent minor mode")
(toggle-text-mode-auto-fill menu-item "Auto Fill" toggle-text-mode-auto-fill :button
(:toggle memq 'turn-on-auto-fill text-mode-hook)
:help "Automatically fill text while typing in text modes (Auto Fill mode)")
"Text"))
(27 keymap
(9 . ispell-complete-word)))


Loading

0 comments on commit 75114ec

Please sign in to comment.