Re: [O] Markdown Export Manual Confusion

2018-08-09 Thread Berry, Charles



> On Aug 9, 2018, at 4:10 AM, Matthew Brecher  wrote:
> 
> Markdown export is disabled by default in org version 9.1.9. 
> As far as I can see the manual does not indicate any way to enable this.


As I read `Exporting' [1], the instruction is to load ox-md or customize 
`org-export-backends'. When I type

M-x customize-variable org-export-backends RET

a buffer pops up with boxes to check including one for 

;   md  Export buffer to Markdown format

checking this box and clicking on `Apply' turns on Markdown export. Clicking 
`Apply and Save' will also result in Markdown being enabled in future sessions.

>  
> Perhaps it would be prudent to include this info in the Markdown Export page 
> [0] of the manual. 
> The way it is currently written it appears as if this should work out of the 
> box. 
> 
> The only time the relevant inclusion is mentioned (require 'ox-md) is 
> mentioned int he manual is in the Exporting Chapter [1], but here it is not 
> explained what this does. 
> 
> [0] https://orgmode.org/manual/Markdown-export.html 
> [1] https://orgmode.org/org.html#Exporting
> -- 
>  Matthew Brecher
>  m...@yhete.com
> 
> 

HTH,

Chuck



[O] Markdown Export Manual Confusion

2018-08-09 Thread Matthew Brecher
Markdown export is disabled by default in org version 9.1.9. 
As far as I can see the manual does not indicate any way to enable this. 
Perhaps it would be prudent to include this info in the Markdown Export page 
[0] of the manual. 
The way it is currently written it appears as if this should work out of the 
box. 

The only time the relevant inclusion is mentioned (require 'ox-md) is mentioned 
int he manual is in the Exporting Chapter [1], but here it is not explained 
what this does. 

[0] https://orgmode.org/manual/Markdown-export.html 
[1] https://orgmode.org/org.html#Exporting
-- 
  Matthew Brecher
  m...@yhete.com



Re: [O] markdown export?

2015-06-03 Thread giles
Peter Davis p...@pfdstudio.com writes:

 I'm looking at http://orgmode.org/manual/Markdown-export.html, which
 says I can export to markdown, but these options don't exist in my org
 installation (8.2.10). If I type C-c C-e m, I get 'Invalid key'

 Do I have to install something else?

I believe that you have the backend installed but not loaded:

From: http://orgmode.org/manual/Export-back_002dends.html

  By default, the following four back-ends are loaded: ascii, html,
  icalendar and latex. It is possible to add more (or remove some) by
  customizing org-export-backends.

-- 
Giles Chamberlin




[O] markdown export?

2015-06-03 Thread Peter Davis

I'm looking at http://orgmode.org/manual/Markdown-export.html, which
says I can export to markdown, but these options don't exist in my org
installation (8.2.10). If I type C-c C-e m, I get 'Invalid key'

Do I have to install something else?

Thanks!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] markdown export?

2015-06-03 Thread Peter Davis
gi...@pexip.com writes:

 Peter Davis p...@pfdstudio.com writes:

 I'm looking at http://orgmode.org/manual/Markdown-export.html, which
 says I can export to markdown, but these options don't exist in my org
 installation (8.2.10). If I type C-c C-e m, I get 'Invalid key'

 Do I have to install something else?

 I believe that you have the backend installed but not loaded:

 From: http://orgmode.org/manual/Export-back_002dends.html

   By default, the following four back-ends are loaded: ascii, html,
   icalendar and latex. It is possible to add more (or remove some) by
   customizing org-export-backends.

Yup! Customizing the variable did it.

Thank you!

-pd

-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] markdown export?

2015-06-03 Thread John Kitchin
Maybe you need to (require 'ox-md) in your init file?

Peter Davis writes:

 I'm looking at http://orgmode.org/manual/Markdown-export.html, which
 says I can export to markdown, but these options don't exist in my org
 installation (8.2.10). If I type C-c C-e m, I get 'Invalid key'

 Do I have to install something else?

 Thanks!
 -pd

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] Markdown export (using org-export-generic)

2011-08-17 Thread Paul Sexton
Jambunathan K kjambunathan at gmail.com writes:
 May be you could cook something up with org-lparse? The file is in
 contrib dir and org-xhtml and ord-odt make use of it.

Thanks, it looks interesting, but I can't find any documentation?







Re: [O] Markdown export (using org-export-generic)

2011-08-17 Thread Jambunathan K
Paul Sexton psexton...@gmail.com writes:

 Jambunathan K kjambunathan at gmail.com writes:
 May be you could cook something up with org-lparse? The file is in
 contrib dir and org-xhtml and ord-odt make use of it.

 Thanks, it looks interesting, but I can't find any documentation?

You need to rely on the docstrings for the most part. Please take a look
at the initial commentary section of org-lparse.el.

The docstring for org-lparse-native-backends should a good starting
point [1]. You will start with adding an entry to this variable and
start exporting with M-x org-lparse.

Another way to proceed is 

- Start with a sample org file [2]
- Enable debug logs in the exported file

  (setq org-lparse-debug t)

- Do a org-export-as-xhtml

- Open the resulting html file and take a Look at the comments embedded
  in it. You will have a feel for how the format and entity callbacks
  are invoked (See docstring below for the format and entity callbacks)

- Keep modifying org-xhtml.el until it becomes a org-markdown.el

org-lparse is reasonably mature and you are less likely to burn your
fingers badly with it.

Jambunathan K.

Footnotes: 
[1]  org-lparse-native-backends

,[ C-h v org-lparse-native-backends RET ]
| org-lparse-native-backends is a variable defined in `org-lparse.el'.
| Its value is (odt xhtml)
| 
| 
| Documentation:
| List of native backends registered with `org-lparse'.
| A backend can use `org-lparse-register-backend' to add itself to
| this list.
| 
| All native backends must implement a get routine and a mandatory
| set of callback routines.
| 
| The get routine must be named as org-backend-get where backend
| is the name of the backend.  The exporter uses `org-lparse-get'
| and retrieves the backend-specific callback by querying for
| ENTITY-CONTROL and ENTITY-FORMAT variables.
| 
| For the sake of illustration, the html backend implements
| `org-xhtml-get'.  It returns
| `org-xhtml-entity-control-callbacks-alist' and
| `org-xhtml-entity-format-callbacks-alist' as the values of
| ENTITY-CONTROL and ENTITY-FORMAT settings.
| 
| [back]
`

[2] Download the test.org file in the link below
http://repo.or.cz/w/org-mode/org-jambu.git/blob_plain/HEAD:/contrib/odt/tests/

This is the unit test file that I used for developing the exporter. It
is a GOOD starting point and should give reasonably a COMPREHENSIVE
coverage.



-- 



Re: [O] Markdown export (using org-export-generic)

2011-08-17 Thread Jambunathan K

 [2] Download the test.org file in the link below
 http://repo.or.cz/w/org-mode/org-jambu.git/blob_plain/HEAD:/contrib/odt/tests/

The repo is refusing to a do dir listing. So here is the link to the
actual file

http://repo.or.cz/w/org-mode/org-jambu.git/blob_plain/HEAD:/contrib/odt/tests/test.org

Side note: For prototype purposes, you can start with the headline
titled * Sample Content (Proof Of Concept). Once that is marked as
done you can proceed to headline titled ODT Exporter. The tree under
later headline is complex in the sense that it tests the export of TODO,
tagged and timestamp entries.


 This is the unit test file that I used for developing the exporter. It
 is a GOOD starting point and should give reasonably a COMPREHENSIVE
 coverage.

-- 



[O] Markdown export (using org-export-generic)

2011-08-16 Thread Paul Sexton
Wes Hardaker's org-export-generic (in worg) does a pretty good job of 
exporting to markdown syntax. The following works (use C-c C-e g to 
run the exporter):

(require 'org-export-generic)
(org-set-generic-type
 markdown 
 '(:file-suffix .markdown
   :key-binding ?M
   :title-formatTitle: %s\n
   :date-format Date: %s\n
   :toc-export  nil
   :author-export   t
   :tags-export nil
   :drawers-export  nil
   :date-export t
   :timestamps-export  t
   :priorities-export  nil
   :todo-keywords-export t
   :body-line-fixed-format \t%s\n
   ;:body-list-prefix \n
   :body-list-format - %s
   :body-list-suffix \n
   :header-prefix (  ###    #  ## )
   :body-section-header-prefix (  ###    #  ## )
   :body-section-header-format %s\n
   :body-section-header-suffix (?= ?- )
   :body-header-section-numbers nil
   :body-header-section-number-format %s) 
   :body-line-format %s\n
   :body-newline-paragraph \n
   :bold-format **%s**
   :italic-format _%s_
   :verbatim-format `%s`
   :code-format `%s`
   :body-line-wrap   75
   ))

There are some defects however, which an't really be fixed without altering
the exporter code. The main ones are:

1. Nested lists don't seem to be supported.

2. Tables come out as:

col 1col 2
---+---
 1   2
 3   4

But need to look like this:

|col 1  | col 2 |
|---|---|
| 1 |  2|
| 3 |  4|

3. Links are not exported correctly.

A link [[http://www.google.com][like this]] comes out as

A link [like this]
...
[like this]: http://www.google.com

But need to look either like:

A link [like this][1]
...
[1]: http://www.google.com

Or like:

A link [like this](http://www.google.com)

Paul