Thank you Willem,

This looks very helpful.

I am trying the code out in a scratch buffer and I am unable to gnerate org
syntax, e.g. with this test string:

(h-2-o-insert-org-source-for-html  "<p><a
href=\"http://example.org/\";>hello</a>
<span style=\"font-style:italic;\">world<br/> foo</span></p>" )


Am I doing something wrong?  Thanks,
Matt


On Tue, Jan 27, 2015 at 3:23 AM, Willem Rein Oudshoorn <wouds...@xs4all.nl>
wrote:

> Matt Price <mopto...@gmail.com> writes:
>
> > Hmm,
> >
> > Looks like I asked this about a year ago and didn't follow up on it.
> Does
> > anyone know a way to generate org-mode syntax from an html string? I
> would
> > like to extend zotxt slightly (see my last post) and at present zotxt can
> > pull citations 7 bibliography entries from Zotero only in plain-text and
> > HTML form.  The plaintext form loses information, so I would like to
> > translate the HTML into org-mode syntax.
> >
> > Since this would have to happen in the context of an
> >
> > (org-add-link-type  )
> >
> > invocation, it would be best if this could be done directly in emacs
> > somehow...
> >
> > Thanks as always,
>
> Not sure if this helps, but I recently hacked some code to convert a
> simple subset of HTML to org.   It is quite hackish and not nearly
> finished (and I might never finish).
>
> However it is pure elisp.
>
> Code is at:
>
> http://github.com/woudshoo/html-2-org
>
> Usage is:
>
>  (h-2-o-insert-org-source-for-html HTML-STRING)
>
> which inserts a org blob in the current buffer at point.
>
> Wim Oudshoorn.
>
>
>
>

Reply via email to