emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Ken Mankoff <mankoff@gmail.com>
Cc: Max Nikulin <manikulin@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: [PATCH] lisp/ob-screen.el: Support ~:var~ header args for babel blocks
Date: Sun, 26 Feb 2023 12:18:14 +0000	[thread overview]
Message-ID: <87lekkzkl5.fsf@localhost> (raw)
In-Reply-To: <87sfet7kul.fsf@t480.home>

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>


  parent reply	other threads:[~2023-02-26 12:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 17:03 [PATCH] lisp/ob-screen.el: Support ~:var~ header args for babel blocks Ken Mankoff
2023-02-24 18:33 ` Ken Mankoff
2023-02-25  3:51   ` Max Nikulin
2023-02-25 15:14     ` Ken Mankoff
2023-02-25 15:19       ` Ken Mankoff
2023-02-25 16:05       ` Max Nikulin
2023-02-25 16:47         ` Ken Mankoff
2023-02-26 10:11           ` Max Nikulin
2023-02-27  1:59             ` Ken Mankoff
2023-02-28 10:40               ` Ihor Radchenko
2023-03-16  4:12                 ` Ken Mankoff
2023-03-16 10:22                   ` Ihor Radchenko
2023-03-16 15:09                     ` [PATCH v4] " Max Nikulin
2023-03-17 11:41                       ` Max Nikulin
2023-03-18 12:08                       ` Ihor Radchenko
2023-03-19 14:42                       ` Ken Mankoff
2023-03-21 14:12                         ` Max Nikulin
2023-03-02 13:38               ` [PATCH] " Max Nikulin
2023-02-26 12:18           ` Ihor Radchenko [this message]
2023-02-27  1:59             ` Ken Mankoff
2023-02-27 19:43               ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lekkzkl5.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    --cc=mankoff@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).