emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] lisp/ob-screen.el: Support ~:var~ header args for babel bloc


From: Ihor Radchenko
Subject: Re: [PATCH] lisp/ob-screen.el: Support ~:var~ header args for babel blocks
Date: Sun, 26 Feb 2023 12:18:14 +0000

Ken Mankoff <mankoff@gmail.com> writes:

> From f7ca0258d72b3da5743b1134718b1d1f0d74491d Mon Sep 17 00:00:00 2001
> From: "Kenneth D. Mankoff" <mankoff@gmail.com>
> Date: Mon, 20 Feb 2023 21:40:39 -0800
> Subject: [PATCH] lisp/ob-screen.el: Support var header args for babel blocks

Thanks for the patch!

> +;; Reuse the variable assignment code from ob-shell
> +(defalias 'org-babel-variable-assignments:screen
> +  'org-babel-variable-assignments:shell)

This will work, but you are relying on implementation detail of
ob-shell.el. A more safe approach would be calling
org-babel-variable-assignments:LANG depending on the :cmd header arg.
For :cmd bash - org-babel-variable-assignments:bash, for :cmd fish -
org-babel-variable-assignments:fish.

To archive this, you can define a full
org-babel-variable-assignments:screen function that does what I described.

-- 
Ihor Radchenko // yantar92,
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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]