From mboxrd@z Thu Jan 1 00:00:00 1970 From: daimrod Subject: Re: bug in orgmode parsing of results Date: Wed, 28 Dec 2016 15:03:29 +0100 Message-ID: <40f4760d-ab74-3512-5353-295a72ead774@gmail.com> References: <38887d7f-355f-65c4-b3f9-ab347780b9c4@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kGltIbfek3iQmPQiG97Qt7OW6F3TITOv1" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMEpT-0000ih-T2 for emacs-orgmode@gnu.org; Wed, 28 Dec 2016 09:03:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMEpQ-0002QM-O8 for emacs-orgmode@gnu.org; Wed, 28 Dec 2016 09:03:43 -0500 Received: from mail-wj0-x232.google.com ([2a00:1450:400c:c01::232]:34969) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cMEpQ-0002Q9-Hx for emacs-orgmode@gnu.org; Wed, 28 Dec 2016 09:03:40 -0500 Received: by mail-wj0-x232.google.com with SMTP id v7so338479308wjy.2 for ; Wed, 28 Dec 2016 06:03:40 -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" To: "Charles C. Berry" Cc: emacs-orgmode This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kGltIbfek3iQmPQiG97Qt7OW6F3TITOv1 Content-Type: multipart/mixed; boundary="2bSk1EovCjIo3QV26Kwp9kO8HtW2EEdMk"; protected-headers="v1" From: daimrod To: "Charles C. Berry" Cc: emacs-orgmode Message-ID: <40f4760d-ab74-3512-5353-295a72ead774@gmail.com> Subject: Re: [O] bug in orgmode parsing of results References: <38887d7f-355f-65c4-b3f9-ab347780b9c4@gmail.com> In-Reply-To: --2bSk1EovCjIo3QV26Kwp9kO8HtW2EEdMk Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 12/27/16 19:11, Charles C. Berry wrote: > On Tue, 27 Dec 2016, daimrod wrote: >=20 >> Hi, >> >> I've found what I think is a bug in orgmode parsing. >> When the following file is parsed : >> >> * Test >> #+BEGIN_SRC emacs-lisp :exports results :results raw drawer >> (format "- Test2") >> #+END_SRC >> >> #+RESULTS: >> :RESULTS: >> - Test2 >> :END: >> >=20 > [snip] >=20 >> >> That is, it generates a DRAWER, which seems correct. >> >> However, when the following file is parsed : >> >> * Test >> #+BEGIN_SRC emacs-lisp :exports results :results raw drawer >> (format "* Test2") >> #+END_SRC >> >> #+RESULTS: >> :RESULTS: >> * Test2 >> :END: >> >=20 > [deleted] >=20 >> That is, it generates a PARAGRAPH which seems incorrect. >> >> WDYT? >> >=20 > What I think is that you should run org-lint on your document. It will > say something like this (but with different line numbers): >=20 > Line Trust Warning > 2 low Forbidden combination in header ":results": raw, drawer > 12 low Forbidden combination in header ":results": raw, drawer > 17 low Possible incomplete drawer ":RESULTS:" >=20 > The last one should catch your eye. Didn't know about org-lint. Thanks. > If you want to generate results that have lines that start with `*' you= > need to protect them. A good way to do this is to wrap them in a src > block or export block like this: >=20 > #+BEGIN_SRC emacs-lisp :exports results :wrap export latex > (format "* Test2") > #+END_SRC The thing about :wrap export html is that I've to generate the HTML myself, whereas when I export the :RESULTS: drawer, org-mode generates the HTML. AFAIK there is no export block for org (no begin_export org). As a workaround I can always use `:results raw` but then it can not replace the result automatically. However, that's not a problem for my use case I think... Thanks for your help. Best, --2bSk1EovCjIo3QV26Kwp9kO8HtW2EEdMk-- --kGltIbfek3iQmPQiG97Qt7OW6F3TITOv1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIvBAEBCAAZBQJYY8YxEhxkYWltcm9kQGdtYWlsLmNvbQAKCRATc1R3K2UYlJ7v D/wIffEQNsdCPYVb1n+EZRIGpZFyDQXXFTocGfucFzKW7rsKM/DwsH73VDmIGHDa g1z1iYkLAOwXTovFOd2HlO/3gfQLNLXQ2PlagS0YQ44TjoN1wqIPx5ngTvVeCF1+ 9rHxsxJ0UljFnEgBY5PMQat7Jh/5ephox1i/7QvEb2USreB/TQYA21bxwVHUUgya 8kbcSMN/7BHCOJoydKpeTuDXAb0X4bWQgCzCq1+Uky7+jT1lPN2mOh3nwZ4aX2+O tiOBqj5F/aB2gzh8OKvFhH6TC3TrZlTtt0oA382+gOAdoYfzRAPa5AogJ1hE/N74 WwdbcfOyFEQ7lqnwtirz4Fr5m7D6/A4D4RaETFxjmGhpKcMAhYNME7rWUR94mLxo UWHJQ2U6PGjZhGW7hMJzw9LGhf46vTt/h0b6ddpy4KEWedloa0NvcHzvz3CbH5e9 dUYJiwe/7AeZ7a+TZ52TihUkZ5mhymnts4gQMnx1bBu2lhn15Jw3gmszFel9TBKY 3x3mFIybDujFBjdaaVcbCPa5mzEUQA3PVOPAjBZrJf450tk7NiydQGKlQUzePAEE 3KVUUpVcPzuEp1kPfsCNdT6Cguk6l1BJ8edBFI4EANxZ8yyivMkQClmBsXPxhnt0 q08Swjx5h41ygQP19Fpo3G7bN4I28+EEMJffs6YJnDnhdA== =Kc3E -----END PGP SIGNATURE----- --kGltIbfek3iQmPQiG97Qt7OW6F3TITOv1--