all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Default silent results
@ 2017-03-13 15:30 Jarmo Hurri
  2017-03-13 15:39 ` Jérémie Juste
  0 siblings, 1 reply; 4+ messages in thread
From: Jarmo Hurri @ 2017-03-13 15:30 UTC (permalink / raw)
  To: emacs-orgmode


Greetings.

An old org-code of mine stopped working, and while trying to fix it I
bumped into the following. What am I missing here?

Jarmo

* test
  A simple code block.
  #+name: org-block
  #+BEGIN_SRC org
  | foo | bar |
  |-----+-----|
  |   1 |   2 |
  #+END_SRC

  A silent call produces no results as expected.
  #+call: org-block() :results silent

  This produces results as expected.
  #+call: org-block() :results replace

  #+RESULTS:
  | foo | bar |
  |-----+-----|
  |   1 |   2 |

  But this also behaves like silent, while the manual says that the
  default is "replace."
  #+call: org-block()

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

* Re: Default silent results
  2017-03-13 15:30 Default silent results Jarmo Hurri
@ 2017-03-13 15:39 ` Jérémie Juste
  2017-03-13 15:46   ` Jarmo Hurri
  0 siblings, 1 reply; 4+ messages in thread
From: Jérémie Juste @ 2017-03-13 15:39 UTC (permalink / raw)
  To: Jarmo Hurri; +Cc: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]

Hello

you can tweek the default behaviour  using
org-babel-default-header-args:org variable

My default configuration for org is the following. I did not modify it.

org-babel-default-header-args:org is a variable defined in ‘ob-org.el’.
Its value is ((:results . "raw silent") (:exports . "code"))


Best regards

Jeremie

On Mon, Mar 13, 2017 at 4:30 PM, Jarmo Hurri <jarmo.hurri@iki.fi> wrote:

>
> Greetings.
>
> An old org-code of mine stopped working, and while trying to fix it I
> bumped into the following. What am I missing here?
>
> Jarmo
>
> * test
>   A simple code block.
>   #+name: org-block
>   #+BEGIN_SRC org
>   | foo | bar |
>   |-----+-----|
>   |   1 |   2 |
>   #+END_SRC
>
>   A silent call produces no results as expected.
>   #+call: org-block() :results silent
>
>   This produces results as expected.
>   #+call: org-block() :results replace
>
>   #+RESULTS:
>   | foo | bar |
>   |-----+-----|
>   |   1 |   2 |
>
>   But this also behaves like silent, while the manual says that the
>   default is "replace."
>   #+call: org-block()
>
>
>


-- 
Jérémie Juste

[-- Attachment #2: Type: text/html, Size: 1686 bytes --]

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

* Re: Default silent results
  2017-03-13 15:39 ` Jérémie Juste
@ 2017-03-13 15:46   ` Jarmo Hurri
  2017-03-13 17:29     ` Nick Dokos
  0 siblings, 1 reply; 4+ messages in thread
From: Jarmo Hurri @ 2017-03-13 15:46 UTC (permalink / raw)
  To: emacs-orgmode

Jérémie Juste <jeremiejuste@gmail.com> writes:

Greetings.

> you can tweek the default behaviour using
> org-babel-default-header-args:org variable
>
> My default configuration for org is the following. I did not modify
> it.
>
> org-babel-default-header-args:org is a variable defined in ‘ob-org.el’.
> Its value is ((:results . "raw silent") (:exports . "code"))

So the default value is really language dependent, not always "replace"
as the manual suggested. Ok, that explains it. Thanks!

Jarmo

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

* Re: Default silent results
  2017-03-13 15:46   ` Jarmo Hurri
@ 2017-03-13 17:29     ` Nick Dokos
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Dokos @ 2017-03-13 17:29 UTC (permalink / raw)
  To: emacs-orgmode

Jarmo Hurri <jarmo.hurri@iki.fi> writes:

> Jérémie Juste <jeremiejuste@gmail.com> writes:
>
> Greetings.
>
>> you can tweek the default behaviour using
>> org-babel-default-header-args:org variable
>>
>> My default configuration for org is the following. I did not modify
>> it.
>>
>> org-babel-default-header-args:org is a variable defined in ‘ob-org.el’.
>> Its value is ((:results . "raw silent") (:exports . "code"))
>
> So the default value is really language dependent, not always "replace"
> as the manual suggested. Ok, that explains it. Thanks!
>

I wonder if that's intended behavior though: what's the reason for org
blocks to have non-default behavior?

Most languages set org-babel-default-header-args:<LANG> to '(),
although some do non-trivial stuff (abc, asymptote, ditaa, dot,
gnuplot, mscgen, plantuml all set :results to file e.g.), but it's not
clear to me why org sets it to "raw silent".

--
Nick

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

end of thread, other threads:[~2017-03-13 17:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-13 15:30 Default silent results Jarmo Hurri
2017-03-13 15:39 ` Jérémie Juste
2017-03-13 15:46   ` Jarmo Hurri
2017-03-13 17:29     ` Nick Dokos

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.