emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Charles C. Berry" <ccberry@ucsd.edu>
To: Jarmo Hurri <jarmo.hurri@iki.fi>
Cc: emacs-orgmode@gnu.org
Subject: Re: Babel: RESULTS for no value
Date: Sat, 7 Mar 2015 13:53:35 -0800	[thread overview]
Message-ID: <alpine.OSX.2.00.1503071316310.984@charles-berrys-macbook.local> (raw)
In-Reply-To: <87oao4zp45.fsf@iki.fi>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1807 bytes --]

On Sat, 7 Mar 2015, Jarmo Hurri wrote:

>
> Aaron Ecay <aaronecay@gmail.com> writes:
>
>> It might be a little distracting to see it there, but it shouldn’t
>> interfere with the functionality in any way (for example, it should be
>> invisible on export).  It the line’s presence causing any problems for
>> your code?
>
> It is a nuisance. To summarize, in my current implementation of
> Processing support, whenever I execute a Processing code with C-c C-c to
> view the resulting sketch in an external window, the following lines
> appear in the org file:
>
> #+RESULTS:
> #+BEGIN_HTML
> #+END_HTML
>
> Furthermore, the HTML lines are replaced on every new execution of the
> code, making the org buffer change on every execution. That is not very
> convenient.
>
> Let me try to explain how I have implemented support for
> Processing. When Processing code is executed with C-c C-c, it does not
> return any value: the sketch (graphics) is shown in an external
> window. But when the results of the code are exported, the code is
> written as html, embedded in a processing.js script. The html code then
> draws the sketch when viewed in a browser. It works really well, and I
> am mighty proud of that idea. ;-)
>
> To achieve this behaviour, I have set
>
> (defvar org-babel-default-header-args:processing
>  '((:results . "html") (:exports . "results"))
>  "Default arguments when evaluating a Processing source block.")


I think you can replace

: (:results . "html")

with

: (:results . (or (and org-export-current-backend "html")  "none"))


in your defvar and get the desired result.

If you want export to succeed under other backends, you can replace "html" 
with (symbol-name org-export-current-backend) and then the result will be 
wrapped if (say) latex or ascii is used.

HTH,

Chuck

  reply	other threads:[~2015-03-07 21:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-07 11:40 Babel: RESULTS for no value Jarmo Hurri
2015-03-07 14:26 ` Aaron Ecay
2015-03-07 17:36   ` Jarmo Hurri
2015-03-07 21:53     ` Charles C. Berry [this message]
2015-03-09 10:43       ` Jarmo Hurri

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.OSX.2.00.1503071316310.984@charles-berrys-macbook.local \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=jarmo.hurri@iki.fi \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).