all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-babel and empty code blocks : publishing html
@ 2010-09-09 16:20 Richard Riley
  2010-09-09 16:28 ` Erik Iverson
  2010-09-09 16:31 ` Eric Schulte
  0 siblings, 2 replies; 9+ messages in thread
From: Richard Riley @ 2010-09-09 16:20 UTC (permalink / raw)
  To: emacs-orgmode


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?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: org-babel and empty code blocks : publishing html
  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
  1 sibling, 0 replies; 9+ messages in thread
From: Erik Iverson @ 2010-09-09 16:28 UTC (permalink / raw)
  To: Richard Riley; +Cc: emacs-orgmode

What are your buffer-wide values for
:exports  and :results ?

Richard Riley wrote:
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: org-babel and empty code blocks : publishing html
  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
  1 sibling, 1 reply; 9+ messages in thread
From: Eric Schulte @ 2010-09-09 16:31 UTC (permalink / raw)
  To: Richard Riley; +Cc: emacs-orgmode

I'd think adding an ":exports none" header argument should be
sufficient.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: org-babel and empty code blocks : publishing html
  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
  0 siblings, 2 replies; 9+ messages in thread
From: Erik Iverson @ 2010-09-09 16:43 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode, Richard Riley



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: org-babel and empty code blocks : publishing html
  2010-09-09 16:43   ` Erik Iverson
@ 2010-09-09 17:16     ` Richard Riley
  2010-09-09 17:24     ` Richard Riley
  1 sibling, 0 replies; 9+ messages in thread
From: Richard Riley @ 2010-09-09 17:16 UTC (permalink / raw)
  To: Erik Iverson; +Cc: emacs-orgmode, Richard Riley

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
>

Thanks fellas.


-- 
☘ http://www.shamrockirishbar.com, http://www.richardriley.net

"Learning French is trivial: the word for horse is 'cheval' and
 everything follows thusly."

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: org-babel and empty code blocks : publishing html
  2010-09-09 16:43   ` Erik Iverson
  2010-09-09 17:16     ` Richard Riley
@ 2010-09-09 17:24     ` Richard Riley
  2010-09-09 20:43       ` org-babel and empty code blocks : publishing html -- Side note Sébastien Vauban
  2010-09-10 18:37       ` Re: org-babel and empty code blocks : publishing html Eric Schulte
  1 sibling, 2 replies; 9+ messages in thread
From: Richard Riley @ 2010-09-09 17:24 UTC (permalink / raw)
  To: emacs-orgmode

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: org-babel and empty code blocks : publishing html -- Side note
  2010-09-09 17:24     ` Richard Riley
@ 2010-09-09 20:43       ` 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
  1 sibling, 1 reply; 9+ messages in thread
From: Sébastien Vauban @ 2010-09-09 20:43 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Richard,

Richard Riley wrote:
> 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:

As a side note, I'd use an inactive timestamp here, in the capture template.
Just to be sure no negative effect would occur once because of that...

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: org-babel and empty code blocks : publishing html -- Side note
  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
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Riley @ 2010-09-09 20:58 UTC (permalink / raw)
  To: emacs-orgmode

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com>
writes:

> Hi Richard,
>
> Richard Riley wrote:
>> 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:
>
> As a side note, I'd use an inactive timestamp here, in the capture template.
> Just to be sure no negative effect would occur once because of that...
>
> Best regards,
>   Seb

I use an active one so that it appears at the time it was created in my
journal.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: org-babel and empty code blocks : publishing html
  2010-09-09 17:24     ` Richard Riley
  2010-09-09 20:43       ` org-babel and empty code blocks : publishing html -- Side note Sébastien Vauban
@ 2010-09-10 18:37       ` Eric Schulte
  1 sibling, 0 replies; 9+ messages in thread
From: Eric Schulte @ 2010-09-10 18:37 UTC (permalink / raw)
  To: Richard Riley; +Cc: emacs-orgmode

Hi Richard,

Richard Riley <rileyrg@gmail.com> writes:

[...]
>
> 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.
>

When I export the above to html, I get the following...
--8<---------------cut here---------------start------------->8---
<p>
test me one two 3
</p>

<p>
More test
</p></li>
--8<---------------cut here---------------end--------------->8---

In my case the code block is not evaluated.  Do you have any buffer wide
header arguments?  What does the following print for you?

#+begin_src emacs-lisp
  (mapcar
   (lambda (pair)
     (list (car pair) (cdr pair)))
   params)
#+end_src

for me it returns the following
#+results:
| :cache    | no      |
| :colnames | no      |
| :comments |         |
| :exports  | code    |
| :hlines   | yes     |
| :noweb    | no      |
| :results  | replace |
| :session  | none    |
| :shebang  |         |
| :tangle   | no      |

Best -- Eric

>
> cheers,
>
> r.
>
>
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-09-10 18:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.