OK. I haven't done this before, so please bear with me -- and redirection
is welcome(!)

These patches improve customization metadata for language-specific
`org-babel-default-header-args:*` variables.

Problem:
- Many language defaults are declared as plain `defvar`.
- These vars are intended to hold header-args alists.
- Without explicit custom types, variable help/customization paths are
inconsistent.

Patch 1 (focused):
- Converts selected vars to typed `defcustom`:
  - `org-babel-default-header-args:shell`
  - `org-babel-default-header-args:sql`
  - `org-babel-default-header-args:js`
- In `ob-shell.el`, also assigns customize metadata for dynamically created
shell aliases (`:sh`, `:bash`, `:zsh`, `:ash`, `:csh`, `:dash`, `:ksh`,
`:mksh`, `:posh`, etc.).

Patch 2 (mechanical follow-up):
- Converts remaining `org-babel-default-header-args:*` language vars in
`ob-*.el` from `defvar` to typed `defcustom` with the same alist-like type.

Note:
- `M-x customize-variable` now consistently presents the expected list/cons
editor for these vars.
- However, `C-h v` still exposes a generic “Toggle” action; that appears to
be an Emacs Help/UI behavior, which I'll report separately.

Thanks for review.

Best,
Matthew

On Sun, Feb 22, 2026 at 5:38 AM Ihor Radchenko <[email protected]> wrote:

> Matthew Weymar <[email protected]> writes:
>
> > Would it make sense to define `org-babel-default-header-args:*` as
> > `defcustom` with an explicit alist type (similar in spirit to typed Babel
> > vars like `org-babel-tangle-lang-exts`), so Customize does not present
> > boolean-style toggle behavior here?
>
> Yes, it would make sense.
> Patches welcome!
>
> --
> Ihor Radchenko // yantar92,
> Org mode maintainer,
> 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>
>

Attachment: 0001-ob-add-customize-types.patch
Description: Binary data

Attachment: org-header-args-custom-v2.patch
Description: Binary data

Reply via email to