all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] org-manual: Document `org-babel-default-inline-header-args'
@ 2022-07-20 12:18 Ihor Radchenko
  2022-08-22 11:59 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Ihor Radchenko @ 2022-07-20 12:18 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi,

In https://orgmode.org/list/87ee927emf.fsf@localhost I proposed to
document org-babel-default-inline-header-args in the manual.

Here is the patch.

WDYT?

Also, I noticed that org-babel-default-header-args has :hlines "no"
while org-babel-default-inline-header-args has :hlines "yes"

The "yes" value can cause errors as documented in the manual (16.6
Results of Evaluation). I am not sure if it is a good default. Also, the
commit introducing the change does not provide any details on why it was
there to start with:

c67e3cda1 default to preserving hlines in call lines
* lisp/ob-core.el (org-babel-default-inline-header-args):
  Added (:hlines "yes") to the default value.

Does anyone know any reason why "yes" value should be kept for inline
src blocks in contrast with "no" for normal src blocks?

I'd be better if we can explain this in the manual.

Best,
Ihor


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-manual-Document-org-babel-default-inline-header-.patch --]
[-- Type: text/x-patch, Size: 1804 bytes --]

From 51b10e5ca5bb368e71655466a4be5267e6e99d0f Mon Sep 17 00:00:00 2001
Message-Id: <51b10e5ca5bb368e71655466a4be5267e6e99d0f.1658319102.git.yantar92@gmail.com>
From: Ihor Radchenko <yantar92@gmail.com>
Date: Wed, 20 Jul 2022 20:03:37 +0800
Subject: [PATCH] org-manual: Document `org-babel-default-inline-header-args'

* doc/org-manual.org (System-wide header arguments): Update the
default value of `org-babel-default-header-args'.  Document that
inline source blocks use a different set of the default arguments.
---
 doc/org-manual.org | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 26d18f533..7823fbd74 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -17015,8 +17015,31 @@ *** System-wide header arguments
 :exports    => "code"
 :cache      => "no"
 :noweb      => "no"
+:hlines     => "no"
+:tangle     => "no"
 #+end_example
 
+#+vindex: org-babel-default-inline-header-args
+Inline source blocks (see [[*Structure of Code Blocks]]) use slightly
+different default header arguments defined in
+~org-babel-default-inline-header-args~:
+
+#+begin_example
+:session    => "none"
+:results    => "replace"
+:exports    => "results"
+:hlines     => "yes"
+#+end_example
+
+The most notable difference between default header arguments for
+inline and normal source blocks is =:exports= argument.  For inline
+source blocks, results of evaluation are exported by default; not the
+code.
+
+Unlike the default values, header arguments set using Org mode
+properties (see [[*Header arguments in Org mode properties]]) do apply to
+both the normal source blocks and inline source blocks.
+
 The example below sets =:noweb= header arguments to =yes=, which makes
 Org expand =:noweb= references by default.
 
-- 
2.35.1


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

* Re: [PATCH] org-manual: Document `org-babel-default-inline-header-args'
  2022-07-20 12:18 [PATCH] org-manual: Document `org-babel-default-inline-header-args' Ihor Radchenko
@ 2022-08-22 11:59 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2022-08-22 11:59 UTC (permalink / raw)
  To: emacs-orgmode

Ihor Radchenko <yantar92@gmail.com> writes:

> In https://orgmode.org/list/87ee927emf.fsf@localhost I proposed to
> document org-babel-default-inline-header-args in the manual.
>
> Here is the patch.

Applied onto main via 1b5ccb109.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=1b5ccb10971f67c7f80052ddb32b5e5cf2dba71d

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


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

end of thread, other threads:[~2022-08-22 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-20 12:18 [PATCH] org-manual: Document `org-babel-default-inline-header-args' Ihor Radchenko
2022-08-22 11:59 ` Ihor Radchenko

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.