From mboxrd@z Thu Jan 1 00:00:00 1970 From: Willem Rein Oudshoorn Subject: Re: HTML --> Org-mode? Date: Tue, 27 Jan 2015 19:59:36 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGBMe-0003vB-M3 for emacs-orgmode@gnu.org; Tue, 27 Jan 2015 13:59:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGBMZ-0004bj-KH for emacs-orgmode@gnu.org; Tue, 27 Jan 2015 13:59:52 -0500 Received: from plane.gmane.org ([80.91.229.3]:52609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGBMZ-0004bW-EO for emacs-orgmode@gnu.org; Tue, 27 Jan 2015 13:59:47 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YGBMU-0008U0-HP for emacs-orgmode@gnu.org; Tue, 27 Jan 2015 19:59:42 +0100 Received: from ironhead.xs4all.nl ([80.101.115.122]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Jan 2015 19:59:42 +0100 Received: from woudshoo by ironhead.xs4all.nl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Jan 2015 19:59:42 +0100 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: emacs-orgmode@gnu.org 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. Wim Oudshoorn