emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Header-args :results output of code block don't take precedence above headline header-args [9.6 (release_9.6-32-gc59d6d @ /tmp/org/org-mode/lisp/)]
@ 2022-12-07 17:47 Rens Oliemans
  2022-12-09 18:01 ` Berry, Charles
  0 siblings, 1 reply; 2+ messages in thread
From: Rens Oliemans @ 2022-12-07 17:47 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi all,

A code block with ":results output" as header argument still has its
output silenced if it's inside a headline with ":results none". MWE:

1. Create an .org file with the following content:

* Sub-tree with =:results none=
:PROPERTIES:
:header-args: :results none
:END:

#+BEGIN_SRC bash :results output
  echo "is silent"
#+END_SRC

2. Use a minimal config, attached is the one I used. Bug is present on
at least Org 9.6 and 9.5

3. Evaluate the code block(s) and see that their output is silenced.

Attached is a file much like this, but with an additional code block
with a #+HEADER style argument. Also included is the minimal-org.el I
used to reproduce this.

I tried bisecting this, but I can't find a good commit that's recent
enough to compile on my machine without changing Emacs versions. This
might be a clue that this is not a bug but a configuration issue on my
side, but I did my best to rule that out. This is the first time posting
in a (and by extension, this) mailing list, please highlight any errors
I made/things I can do better.

All the best,
Rens Oliemans

Emacs : GNU Emacs 28.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version
 3.24.34, cairo version 1.17.6) of 2022-07-21
Package: Org mode version 9.6 (release_9.6-32-gc59d6d @
 /tmp/org/org-mode/lisp/)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: bug.org --]
[-- Type: text/org, Size: 220 bytes --]

* Sub-tree with =:results none=
:PROPERTIES:
:header-args: :results none
:END:

#+BEGIN_SRC bash :results output
  echo "is silent"
#+END_SRC

#+HEADER: :results output
#+BEGIN_SRC bash
  echo "is also silent"
#+END_SRC

[-- Attachment #3: minimal-org.el --]
[-- Type: text/plain, Size: 215 bytes --]

;; Add latest Org mode to load path.
(add-to-list 'load-path (expand-file-name "/tmp/org/org-mode/lisp"))

;; Relevant settings for bug repro
(org-babel-do-load-languages
 'org-babel-load-languages
 '((shell . t)))

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

* Re: [BUG] Header-args :results output of code block don't take precedence above headline header-args [9.6 (release_9.6-32-gc59d6d @ /tmp/org/org-mode/lisp/)]
  2022-12-07 17:47 [BUG] Header-args :results output of code block don't take precedence above headline header-args [9.6 (release_9.6-32-gc59d6d @ /tmp/org/org-mode/lisp/)] Rens Oliemans
@ 2022-12-09 18:01 ` Berry, Charles
  0 siblings, 0 replies; 2+ messages in thread
From: Berry, Charles @ 2022-12-09 18:01 UTC (permalink / raw)
  To: Rens Oliemans; +Cc: emacs-orgmode@gnu.org

Rens,

This is not a bug. Seee below.

> On Dec 7, 2022, at 9:47 AM, Rens Oliemans <hallo@rensoliemans.nl> wrote:
> 
> Hi all,
> 
> A code block with ":results output" as header argument still has its
> output silenced if it's inside a headline with ":results none". MWE:
> 
> 1. Create an .org file with the following content:
> 
> * Sub-tree with =:results none=
> :PROPERTIES:
> :header-args: :results none
> :END:
> 
> #+BEGIN_SRC bash :results output
>  echo "is silent"
> #+END_SRC


This is the correct handling.

See (info "(org) Results of Evaluation").

`output' is a `Collection' option. `none' is a `Handling' option. 

If you want to override a `Handling' option you need another `Handling' option. e.g.

#+BEGIN_SRC bash :results output replace
  echo "is silent"
#+END_SRC

HTH,

Chuck







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

end of thread, other threads:[~2022-12-09 18:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-07 17:47 [BUG] Header-args :results output of code block don't take precedence above headline header-args [9.6 (release_9.6-32-gc59d6d @ /tmp/org/org-mode/lisp/)] Rens Oliemans
2022-12-09 18:01 ` Berry, Charles

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).