From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: HTML --> Org-mode? Date: Tue, 27 Jan 2015 21:12:48 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bf0f6666d4fde050dace881 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGI7i-0002mg-L0 for emacs-orgmode@gnu.org; Tue, 27 Jan 2015 21:12:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGI7d-0002DJ-Jn for emacs-orgmode@gnu.org; Tue, 27 Jan 2015 21:12:54 -0500 Received: from mail-lb0-x22c.google.com ([2a00:1450:4010:c04::22c]:65139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGI7d-0002DA-7s for emacs-orgmode@gnu.org; Tue, 27 Jan 2015 21:12:49 -0500 Received: by mail-lb0-f172.google.com with SMTP id l4so16330672lbv.3 for ; Tue, 27 Jan 2015 18:12:48 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Willem Rein Oudshoorn Cc: Org Mode --047d7bf0f6666d4fde050dace881 Content-Type: text/plain; charset=UTF-8 On Tue, Jan 27, 2015 at 1:59 PM, Willem Rein Oudshoorn wrote: > Matt Price writes: > > > 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 "

> href=\"http://example.org/\">hello > > world
foo

" ) > > > > Am I doing something wrong? Thanks, > > I added the conversion, so that part should work now. > However, I am not sure I want to do the thing. > It seems that this requires some CSS parsing to do the right thing. > > Also in this example, the italics would span multiple lines, for which I > think the only way to represent this in org is by enclosing each line in > a pair of '/'. > > However, is there a specific use case where you need the conversion from > the to be precise? (At the moment it will still > output the content of the but it will not be formatted. > > If there is a specific use case, I could maybe make it work for that. > > Personally, I use it to edit text fields in salesforce. > For which I do not care too much if the round trip yields perfect > results. > > Hi Wim, I am trying to parse the output of citeproc-js, which does produce those spans -- not veyr elegant, I must say, but that's what I'm working with. I will try this again in about a day, when I am done with the hard part of my week! Thank you very much, Matt > > Wim Oudshoorn > > > --047d7bf0f6666d4fde050dace881 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Tue, Jan 27, 2015 at 1:59 PM, Willem Rein Oudshoorn <woudshoo@xs4a= ll.nl> wrote:
Matt Price <moptop99@gmail.c= om> writes:

> Thank you Willem,
>
> This looks very helpful.
>
> I am trying the code out in a scratch buffer and I am unable to gnerat= e org
> syntax, e.g. with this test string:
>
> (h-2-o-insert-org-source-for-html=C2=A0 "<p><a
> href=3D\"http:= //example.org/\">hello</a>
> <span style=3D\"font-style:italic;\">world<br/> = foo</span></p>" )
>
> Am I doing something wrong?=C2=A0 Thanks,

I added the <a href...> conversion, so that part should work n= ow.
However, I am not sure I want to do the <span style=3D...> thing.
It seems that this requires some CSS parsing to do the right thing.

Also in this example, the italics would span multiple lines, for which I think the only way to represent this in org is by enclosing each line in a pair of '/'.

However, is there a specific use case where you need the conversion from the <span style=3D'...'> to be precise?=C2=A0 =C2=A0(At the m= oment it will still
output the content of the <span> but it will not be formatted.

If there is a specific use case, I could maybe make it work for that.

Personally, I use it to edit text fields in salesforce.
For which I do not care too much if the round trip yields perfect
results.

Hi Wim,

I am trying to parse the ou= tput of citeproc-js, which does produce those spans -- not veyr elegant, I = must say, but that's what I'm working with.=C2=A0
I = will try this again in about a day, when I am done with the hard part of my= week!=C2=A0 Thank you very much,
Matt
=C2=A0

Wim Oudshoorn



--047d7bf0f6666d4fde050dace881--