[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Bastien
Hi Jambunathan,

Jambunathan K kjambunat...@gmail.com writes:

 This is a formal request to integrate my org-html.el  org-odt.el
 changes in to the master branch. 

Thanks a *LOT* for this work!  I'm willing to help as much as possible
to get this integrated.

 This patch introduces 3 major features:
 1. A generic exporter

Let me understand: this is more a generalization of the HTML export than
a true generic exporter, right?  The docstring of org-do-export suggests
so.  Rewriting org-html.el so that the HTML export is done in a more
generic way is a *good* thing, but we should be careful with the naming
of the functions here.

 2. All new html backend re-implemented as a plugin to (1).
 3. A odt backend as a plugin to (1).

This makes sense.

 The patch is based on git commit 3d802.

Please everyone test it and report any problem.  I was kept away from
Org due to personal issues the last week, but I'm available again.

All best,

-- 
 Bastien



Re: [O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Christian Moe

Hi,

I'd love to try it out, but I'm not good at git. Would someone be kind 
enough to post directions?


I thought this would do it:

git checkout 3d802
git checkout -b ooo
git apply 
../0001-Re-implement-org-export-as-html-and-add-support-for-.patch


But I got:

error: patch failed: lisp/org.el:8711
error: lisp/org.el: patch does not apply

Yours,
Christian


On 3/21/11 9:21 AM, Bastien wrote:

Hi Jambunathan,

Jambunathan Kkjambunat...@gmail.com  writes:


This is a formal request to integrate my org-html.el  org-odt.el
changes in to the master branch.


Thanks a *LOT* for this work!  I'm willing to help as much as possible
to get this integrated.


This patch introduces 3 major features:
1. A generic exporter


Let me understand: this is more a generalization of the HTML export than
a true generic exporter, right?  The docstring of org-do-export suggests
so.  Rewriting org-html.el so that the HTML export is done in a more
generic way is a *good* thing, but we should be careful with the naming
of the functions here.


2. All new html backend re-implemented as a plugin to (1).
3. A odt backend as a plugin to (1).


This makes sense.


The patch is based on git commit 3d802.


Please everyone test it and report any problem.  I was kept away from
Org due to personal issues the last week, but I'm available again.

All best,






[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Jambunathan K

Christian

Thanks being the first one here (again). 

I have tried incorporating some subset (and not all) of your feedback on
the new odt exporter. My priority was to get the html exporter and the
generic interface right.

 Hi,

 I'd love to try it out, but I'm not good at git. Would someone be kind
 enough to post directions?

(1) You can checkout via git: 

#+begin_src sh
  git remote add org-odt http://repo.or.cz/r/org-mode/org-jambu.git
  git fetch org-odt
  git checkout -b org-odt org-odt/staging [Note the word `staging']
#+end_src

(2) You can download a snapshot. (Search for .tar.gz and .zip)
http://repo.or.cz/w/org-mode/org-jambu.git/shortlog/refs/heads/staging

The above instructions are the same as one that I shared with
Release-0.6 [1] with one important change - instead of `master' the
changes are in `staging' branch.

Footnotes:
[1] http://lists.gnu.org/archive/html/emacs-orgmode/2011-01/msg01210.html

Jambunathan K.




[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Rustom Mody
How does this relate to the docbook exporter?
I ask because I needed a generic exporter (this was more than a year ago)
and I made do with the docbook exporter for that purpose


[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Jambunathan K
Christian Moe m...@christianmoe.com writes:

 Hi,

 I'd love to try it out, but I'm not good at git. Would someone be kind
 enough to post directions?

 I thought this would do it:

 git checkout 3d802
 git checkout -b ooo
 git apply
 ../0001-Re-implement-org-export-as-html-and-add-support-for-.patch

 But I got:

 error: patch failed: lisp/org.el:8711
 error: lisp/org.el: patch does not apply

One of the reasons the patch fails to apply is because I have hand
edited it and removed the hunks that correspond to new files (all
org-odt related). 

In my experience, `git apply' is quite intelligent in figuring out that
the patch has been tampered with. May be you should try plain old patch
utility.

#+begin_src sh
  patch  my.patch
#+end_src

should provide a good starting point. It is likely to ask some questions
just answer them.

As noted previously, I have stripped off all the odt related changes
from the patch I circulated. The patching route is recommended for
existing html users. The checkout route is recommended for html + odt
users.

Jambunathan K.






[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Jambunathan K

 How does this relate to the docbook exporter?

(In principle), Docbook exporter can move to the new core. This would
considerably reduce the size of the org-docbook.el.

 I ask because I needed a generic exporter (this was more than a year
 ago) and I made do with the docbook exporter for that purpose

There are lots of generic exporters for Org. There is a Wes's generic
exporter C-c C-e g and Bastien's very own org-export.el. There is this
new one. 

With my new patches, org-html.el and org-odt.el share a common core to
 which they plug in using callbacks. This common core is right now part
 of my new org-html.el.

If you are a developer and have some use-cases in mind may be you could
help with refining the new core. The exporter is line-oriented (unlike
the LaTeX exporter) - whatever that means :-).

Jambunathan K.

--



[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Jambunathan K

 1. A generic exporter

There is lots of generic exporter floating around and I don't want to
add to confusion. Let's call the new patch `newhtml' with the
understanding that the patch does much more than offer a new html and
odt backends.

For the developers among us, refer to the following post for a quick
overview.
http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg00839.html

For those of you, who have used org-special-blocks a near equivalent
entity is ENVIRONMENT.

Jambunathan K.





[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Christian Moe

Hi, Jambunathan,

Thanks, I should have tested first if the previous instructions 
worked. I think I have it set up now.


With a minimal Emacs as per the old instructions, and with one minor 
change to your test file (`LaTeX:verbatim' -- I don't have dvipng 
installed), I get this:



Debugger entered--Lisp error: (invalid-function 
with-org-html-preserve-paragraph-state)

  with-org-html-preserve-paragraph-state(nil)
  byte-code([...THIS LINE DIDN'T COPY-PASTE WELL... CHRISTIAN]
  org-do-export(nil nil nil nil nil nil)
  (let* ((org-parse-get-callback ...) 
(org-export-html-special-string-regexps 
org-export-odt-special-string-regexps)) (org-do-export arg hidden 
ext-plist to-buffer body-only pub-dir))

  org-export-as-odt(nil)
  call-interactively(org-export-as-odt)
  org-export(nil)
  call-interactively(org-export nil nil)


Yours,
Christian

On 3/21/11 10:31 AM, Jambunathan K wrote:


Christian

Thanks being the first one here (again).

I have tried incorporating some subset (and not all) of your feedback on
the new odt exporter. My priority was to get the html exporter and the
generic interface right.


Hi,

I'd love to try it out, but I'm not good at git. Would someone be kind
enough to post directions?


(1) You can checkout via git:

#+begin_src sh
   git remote add org-odt http://repo.or.cz/r/org-mode/org-jambu.git
   git fetch org-odt
   git checkout -b org-odt org-odt/staging [Note the word `staging']
#+end_src

(2) You can download a snapshot. (Search for .tar.gz and .zip)
http://repo.or.cz/w/org-mode/org-jambu.git/shortlog/refs/heads/staging

The above instructions are the same as one that I shared with
Release-0.6 [1] with one important change - instead of `master' the
changes are in `staging' branch.

Footnotes:
[1] http://lists.gnu.org/archive/html/emacs-orgmode/2011-01/msg01210.html

Jambunathan K.







[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Jambunathan K

Hello Christian

Thanks for your first bug report. I have the habit of not using
byte-compilation. 

The reason for the crash you have reported is that
`with-org-html-preserve-paragraph-state' is a macro and some of the
references to it preceded the definition. As a result the byte compiler
was mistaken in to thinking that this was a function.

Jambnathan K.

 With a minimal Emacs as per the old instructions, and with one minor
 change to your test file (`LaTeX:verbatim' -- I don't have dvipng
 installed), I get this:


 Debugger entered--Lisp error: (invalid-function
 with-org-html-preserve-paragraph-state)
   with-org-html-preserve-paragraph-state(nil)
   byte-code([...THIS LINE DIDN'T COPY-PASTE WELL... CHRISTIAN]
   org-do-export(nil nil nil nil nil nil)
   (let* ((org-parse-get-callback ...)
 (org-export-html-special-string-regexps
 org-export-odt-special-string-regexps)) (org-do-export arg hidden
 ext-plist to-buffer body-only pub-dir))
   org-export-as-odt(nil)
   call-interactively(org-export-as-odt)
   org-export(nil)
   call-interactively(org-export nil nil)



Re: [O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Christian Moe

Hi,

I see. Would you like to continue to receive bug reports based on 
byte-compilation, or should I just load the sources for now?


Yours,
Christian

On 3/21/11 2:31 PM, Jambunathan K wrote:


Hello Christian

Thanks for your first bug report. I have the habit of not using
byte-compilation.

The reason for the crash you have reported is that
`with-org-html-preserve-paragraph-state' is a macro and some of the
references to it preceded the definition. As a result the byte compiler
was mistaken in to thinking that this was a function.

Jambnathan K.


With a minimal Emacs as per the old instructions, and with one minor
change to your test file (`LaTeX:verbatim' -- I don't have dvipng
installed), I get this:


Debugger entered--Lisp error: (invalid-function
with-org-html-preserve-paragraph-state)
   with-org-html-preserve-paragraph-state(nil)
   byte-code([...THIS LINE DIDN'T COPY-PASTE WELL... CHRISTIAN]
   org-do-export(nil nil nil nil nil nil)
   (let* ((org-parse-get-callback ...)
(org-export-html-special-string-regexps
org-export-odt-special-string-regexps)) (org-do-export arg hidden
ext-plist to-buffer body-only pub-dir))
   org-export-as-odt(nil)
   call-interactively(org-export-as-odt)
   org-export(nil)
   call-interactively(org-export nil nil)








[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Jambunathan K

 Hi,

 I see. Would you like to continue to receive bug reports based on
 byte-compilation, or should I just load the sources for now?

The one you reported is a serious error and I have fixed it. 

Anything amounting to a crash or a crash in waiting has to be
immeditately addressed. As for warnings, they are better taken up just
before the actualy merge with the reposiory.

That said I welcome all bug reports and I will address all of them.

Jambunathan K.




Re: [O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Jambunathan K

Hi,

 I see. Would you like to continue to receive bug reports based on
 byte-compilation, or should I just load the sources for now?


Just pushed a fix that nukes all the warnings that the byte-compiler was
generating.

Jambunathan K.