From: daimrod <daimrod@gmail.com>
To: "Charles C. Berry" <ccberry@ucsd.edu>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: bug in orgmode parsing of results
Date: Wed, 28 Dec 2016 15:03:29 +0100 [thread overview]
Message-ID: <40f4760d-ab74-3512-5353-295a72ead774@gmail.com> (raw)
In-Reply-To: <alpine.OSX.2.20.1612271004350.729@charles-berrys-macbook.local>
[-- Attachment #1.1: Type: text/plain, Size: 1933 bytes --]
On 12/27/16 19:11, Charles C. Berry wrote:
> On Tue, 27 Dec 2016, daimrod wrote:
>
>> 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:
>>
>
> [snip]
>
>>
>> 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:
>>
>
> [deleted]
>
>> That is, it generates a PARAGRAPH which seems incorrect.
>>
>> WDYT?
>>
>
> What I think is that you should run org-lint on your document. It will
> say something like this (but with different line numbers):
>
> 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:"
>
> 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:
>
> #+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,
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 829 bytes --]
prev parent reply other threads:[~2016-12-28 14:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-27 13:36 bug in orgmode parsing of results daimrod
2016-12-27 18:09 ` Nicolas Goaziou
2016-12-28 13:56 ` daimrod
2016-12-27 18:11 ` Charles C. Berry
2016-12-28 14:03 ` daimrod [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40f4760d-ab74-3512-5353-295a72ead774@gmail.com \
--to=daimrod@gmail.com \
--cc=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.