Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added pandoc markdown table support (optional)

  • Loading branch information...
commit 7b4647a3e69d64fee92fa7b3ad6d6cddf6377533 1 parent 0b11701
Matthew Fidler authored August 20, 2012
34  Readme.md
Source Rendered
@@ -8,11 +8,11 @@
8 8
 - __Author__ --  Matthew L. Fidler
9 9
 - __Maintainer__ --  Matthew L. Fidler
10 10
 - __Created__ --  Fri Aug  3 22:33:41 2012 (-0500)
11  
-- __Version__ --  0.22
  11
+- __Version__ --  0.23
12 12
 - __Package-Requires__ --  ((http-post-simple "1.0") (yaoddmuse "0.1.1")(header2 "21.0") (lib-requires "21.0"))
13  
-- __Last-Updated__ --  Mon Aug 13 21:53:01 2012 (-0500)
  13
+- __Last-Updated__ --  Mon Aug 20 09:33:57 2012 (-0500)
14 14
 - __By__ --  Matthew L. Fidler
15  
-- __Update #__ --  680
  15
+- __Update #__ --  685
16 16
 - __URL__ --  https:__github.com_mlf176f2_org-readme
17 17
 - __Keywords__ --  Header2, Readme.org, Emacswiki, Git
18 18
 - __Compatibility__ --  Tested with Emacs 24.1 on Windows.
@@ -56,26 +56,18 @@ would generate a page of OrgReadme.
56 56
 There are a few required libraries.  This is a list of the require
57 57
 libraries and why they are needed.
58 58
 
59  
-
60  
-<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
61  
-<caption></caption>
62  
-<colgroup><col align="left" /><col align="left" />
63  
-</colgroup>
64  
-<thead>
65  
-<tr><th scope="col" align="left">Library</th><th scope="col" align="left">Why it is needed</th></tr>
66  
-</thead>
67  
-<tbody>
68  
-<tr><td align="left">yaoddmuse</td><td align="left">Publish to emacswiki</td></tr>
69  
-<tr><td align="left">http-post-simple</td><td align="left">Publish to marmalade-repo.org</td></tr>
70  
-<tr><td align="left">header2</td><td align="left">To create header and changelog</td></tr>
71  
-<tr><td align="left">lib-requires</td><td align="left">To generate the library dependencies</td></tr>
72  
-</tbody>
73  
-</table>
74  
-
75  
-
  59
++------------------+--------------------------------------+
  60
+| Library          | Why it is needed                     |
  61
++------------------+--------------------------------------+
  62
+| yaoddmuse        | Publish to emacswiki                 |
  63
+| http-post-simple | Publish to marmalade-repo.org        |
  64
+| header2          | To create header and changelog       |
  65
+| lib-requires     | To generate the library dependencies |
  66
++------------------+--------------------------------------+
76 67
 
77 68
 ## History
78 69
 
  70
+- __20-Aug-2012__ --   Added pandoc markdown table support (optional) (Matthew L. Fidler)
79 71
 - __13-Aug-2012__ --   Another attempt to make texinfo documents. (Matthew L. Fidler)
80 72
 - __13-Aug-2012__ --   Added texinfo output. Allows native emacs documentation. (Matthew L. Fidler)
81 73
 - __13-Aug-2012__ --   Tried to post behind firewall. Reattempting. (Matthew L. Fidler)
@@ -114,7 +106,7 @@ libraries and why they are needed.
114 106
 - __11-Aug-2012__ --   Bug fix to upload to emacswiki and upload to marmalade-repo (Matthew L. Fidler)
115 107
 - __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)
116 108
 - __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)
117  
-- __07-Aug-2012__ --   To use, put (require 'ess-smart-underscore) in your ~/.emacs file 7-Aug-2012 Matthew L. Fidler Last-Updated: Mon Aug 13 21:53:20 2012 (-0500)
  109
+- __07-Aug-2012__ --   To use, put (require 'ess-smart-underscore) in your ~/.emacs file 7-Aug-2012 Matthew L. Fidler Last-Updated: Mon Aug 20 09:34:27 2012 (-0500)
118 110
 - __06-Aug-2012__ --   Added support for uploading Readme.org files to emacswiki without having to have a single associated lisp file. (Matthew L. Fidler)
119 111
 - __06-Aug-2012__ --   Bug fix for syncing from the single lisp file. (Matthew L. Fidler)
120 112
 - __06-Aug-2012__ --   Added the ability to call `org-readme-sync` from Readme.org (Matthew L. Fidler)
9  Readme.org
Source Rendered
@@ -8,11 +8,11 @@
8 8
  - Author :: Matthew L. Fidler
9 9
  - Maintainer :: Matthew L. Fidler
10 10
  - Created :: Fri Aug  3 22:33:41 2012 (-0500)
11  
- - Version :: 0.22
  11
+ - Version :: 0.23
12 12
  - Package-Requires :: ((http-post-simple "1.0") (yaoddmuse "0.1.1")(header2 "21.0") (lib-requires "21.0"))
13  
- - Last-Updated :: Mon Aug 13 21:53:01 2012 (-0500)
  13
+ - Last-Updated :: Mon Aug 20 09:33:57 2012 (-0500)
14 14
  -           By :: Matthew L. Fidler
15  
- -     Update # :: 680
  15
+ -     Update # :: 685
16 16
  - URL :: https://github.com/mlf176f2/org-readme
17 17
  - Keywords :: Header2, Readme.org, Emacswiki, Git
18 18
  - Compatibility :: Tested with Emacs 24.1 on Windows.
@@ -67,6 +67,7 @@ libraries and why they are needed.
67 67
 
68 68
 * History
69 69
 
  70
+ - 20-Aug-2012 ::  Added pandoc markdown table support (optional) (Matthew L. Fidler)
70 71
  - 13-Aug-2012 ::  Another attempt to make texinfo documents. (Matthew L. Fidler)
71 72
  - 13-Aug-2012 ::  Added texinfo output. Allows native emacs documentation. (Matthew L. Fidler)
72 73
  - 13-Aug-2012 ::  Tried to post behind firewall. Reattempting. (Matthew L. Fidler)
@@ -105,7 +106,7 @@ libraries and why they are needed.
105 106
  - 11-Aug-2012 ::  Bug fix to upload to emacswiki and upload to marmalade-repo (Matthew L. Fidler)
106 107
  - 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)
107 108
  - 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)
108  
- - 07-Aug-2012 ::  To use, put (require 'ess-smart-underscore) in your ~/.emacs file 7-Aug-2012 Matthew L. Fidler Last-Updated: Mon Aug 13 21:53:20 2012 (-0500)
  109
+ - 07-Aug-2012 ::  To use, put (require 'ess-smart-underscore) in your ~/.emacs file 7-Aug-2012 Matthew L. Fidler Last-Updated: Mon Aug 20 09:34:27 2012 (-0500)
109 110
  - 06-Aug-2012 ::  Added support for uploading Readme.org files to emacswiki without having to have a single associated lisp file. (Matthew L. Fidler)
110 111
  - 06-Aug-2012 ::  Bug fix for syncing from the single lisp file. (Matthew L. Fidler)
111 112
  - 06-Aug-2012 ::  Added the ability to call =org-readme-sync= from Readme.org (Matthew L. Fidler)
32  org-readme.el
@@ -5,11 +5,11 @@
5 5
 ;; Author: Matthew L. Fidler
6 6
 ;; Maintainer: Matthew L. Fidler
7 7
 ;; Created: Fri Aug  3 22:33:41 2012 (-0500)
8  
-;; Version: 0.22
  8
+;; Version: 0.23
9 9
 ;; Package-Requires: ((http-post-simple "1.0") (yaoddmuse "0.1.1")(header2 "21.0") (lib-requires "21.0"))
10  
-;; Last-Updated: Mon Aug 13 21:53:26 2012 (-0500)
  10
+;; Last-Updated: Mon Aug 20 09:34:36 2012 (-0500)
11 11
 ;;           By: Matthew L. Fidler
12  
-;;     Update #: 681
  12
+;;     Update #: 686
13 13
 ;; URL: https://github.com/mlf176f2/org-readme
14 14
 ;; Keywords: Header2, Readme.org, Emacswiki, Git
15 15
 ;; Compatibility: Tested with Emacs 24.1 on Windows.
@@ -69,6 +69,9 @@
69 69
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
70 70
 ;; 
71 71
 ;;; Change Log:
  72
+;; 20-Aug-2012    Matthew L. Fidler  
  73
+;;    Last-Updated: Mon Aug 20 09:33:22 2012 (-0500) #684 (Matthew L. Fidler)
  74
+;;    Added pandoc markdown table support (optional)
72 75
 ;; 13-Aug-2012    Matthew L. Fidler  
73 76
 ;;    Last-Updated: Mon Aug 13 21:52:37 2012 (-0500) #679 (Matthew L. Fidler)
74 77
 ;;    Another attempt to make texinfo documents.
@@ -297,6 +300,11 @@
297 300
   :type 'boolean
298 301
   :group 'org-readme)
299 302
 
  303
+(defcustom org-readme-use-pandoc-markdown t
  304
+  "Uses pandoc's grid tables instead of transferring the tables to html."
  305
+  :type 'boolean
  306
+  :group 'org-readme)
  307
+
300 308
 (defcustom org-readme-build-texi t
301 309
   "Builds 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."
302 310
   :type 'boolean
@@ -641,10 +649,15 @@ Returns file name if created."
641 649
         (end-of-line)
642 650
         (save-restriction
643 651
           (narrow-to-region p1 (point))
644  
-          (org-replace-region-by-html (point-min) (point-max))
645  
-          (goto-char (point-min))
646  
-          (while (re-search-forward "class" nil t)
647  
-            (replace-match "align"))))
  652
+          (if org-readme-use-pandoc-markdown
  653
+              (progn
  654
+                (goto-char (point-min))
  655
+                (while (re-search-forward "^\\([ \t]*\\)|\\(-.*?-\\)|\\([ \t]*\\)$" nil t)
  656
+                  (replace-match "\\1+\\2+\\3")))
  657
+            (org-replace-region-by-html (point-min) (point-max))
  658
+            (goto-char (point-min))
  659
+            (while (re-search-forward "class" nil t)
  660
+              (replace-match "align")))))
648 661
       
649 662
       ;; Lists are the same.
650 663
       (setq readme (buffer-string)))
@@ -910,11 +923,6 @@ When COMMENT-ADDED is non-nil, the comment has been added and the syncing should
910 923
         (when org-readme-build-texi
911 924
           (when (executable-find "pandoc")
912 925
             (let ((default-directory (file-name-directory (buffer-file-name))))
913  
-              (message "%s\n%s" default-directory
914  
-                       (concat "pandoc Readme.md -s -o "
915  
-                               (file-name-sans-extension
916  
-                                (file-name-nondirectory (buffer-file-name)))
917  
-                               ".texi"))
918 926
               (shell-command (concat "pandoc Readme.md -s -o "
919 927
                                      (file-name-sans-extension
920 928
                                       (file-name-nondirectory (buffer-file-name)))
27  org-readme.texi
@@ -27,15 +27,15 @@ Matthew L. Fidler ## Library Information @strong{org-readme.el} --- Integrates R
27 27
 @item
28 28
 @strong{Created} -- Fri Aug 3 22:33:41 2012 (-0500)
29 29
 @item
30  
-@strong{Version} -- 0.22
  30
+@strong{Version} -- 0.23
31 31
 @item
32 32
 @strong{Package-Requires} -- ((http-post-simple "1.0") (yaoddmuse "0.1.1")(header2 "21.0") (lib-requires "21.0"))
33 33
 @item
34  
-@strong{Last-Updated} -- Mon Aug 13 21:53:01 2012 (-0500)
  34
+@strong{Last-Updated} -- Mon Aug 20 09:33:57 2012 (-0500)
35 35
 @item
36 36
 @strong{By} -- Matthew L. Fidler
37 37
 @item
38  
-@strong{Update #} -- 680
  38
+@strong{Update #} -- 685
39 39
 @item
40 40
 @strong{URL} -- https:__github.com_mlf176f2_org-readme
41 41
 @item
@@ -97,22 +97,21 @@ When @code{org-readme-sync} is called in a @code{Readme.org} file that is not a
97 97
 @subsection Why each required library is needed
98 98
 There are a few required libraries. This is a list of the require libraries and why they are needed.
99 99
 
100  
-  
  100
+@multitable @columnfractions 0.26 0.54 
  101
+@item 
101 102
 Library
102  
-Why it is needed
103  
-yaoddmuse
104  
-Publish to emacswiki
105  
-http-post-simple
106  
-Publish to marmalade-repo.org
107  
-header2
108  
-To create header and changelog
109  
-lib-requires
110  
-To generate the library dependencies
  103
+ @tab Why it is needed
  104
+@item 
  105
+yaoddmuse http-post-simple header2 lib-requires
  106
+ @tab Publish to emacswiki Publish to marmalade-repo.org To create header and changelog To generate the library dependencies
  107
+@end multitable
111 108
 
112 109
 @node History
113 110
 @section History
114 111
 @itemize
115 112
 @item
  113
+@strong{20-Aug-2012} -- Added pandoc markdown table support (optional) (Matthew L. Fidler)
  114
+@item
116 115
 @strong{13-Aug-2012} -- Another attempt to make texinfo documents. (Matthew L. Fidler)
117 116
 @item
118 117
 @strong{13-Aug-2012} -- Added texinfo output. Allows native emacs documentation. (Matthew L. Fidler)
@@ -191,7 +190,7 @@ To generate the library dependencies
191 190
 <_pre> instead of
192 191
 <_pre>. This makes the emacswiki page display correctly. (Matthew L. Fidler)
193 192
 @item
194  
-@strong{07-Aug-2012} -- To use@comma{} put (require 'ess-smart-underscore) in your ~/.emacs file 7-Aug-2012 Matthew L. Fidler Last-Updated: Mon Aug 13 21:53:20 2012 (-0500)
  193
+@strong{07-Aug-2012} -- To use@comma{} put (require 'ess-smart-underscore) in your ~/.emacs file 7-Aug-2012 Matthew L. Fidler Last-Updated: Mon Aug 20 09:34:27 2012 (-0500)
195 194
 @item
196 195
 @strong{06-Aug-2012} -- Added support for uploading Readme.org files to emacswiki without having to have a single associated lisp file. (Matthew L. Fidler)
197 196
 @item

0 notes on commit 7b4647a

Please sign in to comment.
Something went wrong with that request. Please try again.