emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Riley <rileyrg@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: org-babel and empty code blocks : publishing html
Date: Thu, 09 Sep 2010 19:24:27 +0200	[thread overview]
Message-ID: <i6b58b$91g$1@dough.gmane.org> (raw)
In-Reply-To: 4C890EBE.3080906@ccbr.umn.edu

Erik Iverson <eriki@ccbr.umn.edu> writes:

> Eric Schulte wrote:
>> I'd think adding an ":exports none" header argument should be
>> sufficient.
>> 
>
> If the code block is empty, I doesn't appear so.
>
> If you put in a literal
>
> nil
>
> in the code block, then :exports none does as expected.
>
>> Best -- Eric
>> 
>> Richard Riley <rileyrg@gmail.com> writes:
>> 
>>> On my journal capture template I include a #begin_src and #end_src block
>>> as I frequently want to journal code. Being lazy I dont
>>> necessarily want to delete this block even if I have no code in that
>>> org-entry. Is it possible to suppress the output "nil" which is
>>> generated for the html export for empty code blocks?
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>> 
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

Hmm, I think maybe I am getting confused here then. Maybe its better if
I show an example:-

,----
| **** TODO weather in agenda
|      SCHEDULED: <2010-09-10 Fri>
| :PROPERTIES:
|  :DateCreated: <2010-09-09 Thu 15:07>
| :END:
| 
| test me one two 3
| 
| #+begin_src emacs-lisp
| #+end_src
| 
| More test
`----

Note the empty src block. When I export to html I dont want this code
evaled (it isnt when there IS elisp in there - I just see the code as
nicely HTML'd) and I dont want a nil in the output when its empty.

cheers,

r.

  parent reply	other threads:[~2010-09-09 17:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-09 16:20 org-babel and empty code blocks : publishing html Richard Riley
2010-09-09 16:28 ` Erik Iverson
2010-09-09 16:31 ` Eric Schulte
2010-09-09 16:43   ` Erik Iverson
2010-09-09 17:16     ` Richard Riley
2010-09-09 17:24     ` Richard Riley [this message]
2010-09-09 20:43       ` org-babel and empty code blocks : publishing html -- Side note Sébastien Vauban
2010-09-09 20:58         ` Richard Riley
2010-09-10 18:37       ` Re: org-babel and empty code blocks : publishing html Eric Schulte

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='i6b58b$91g$1@dough.gmane.org' \
    --to=rileyrg@gmail.com \
    --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 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).