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

2023-03-16 Thread Ihor Radchenko
Ken Mankoff writes: > Just a follow-up note that I am unlikely to be able to complete this patch > anytime soon. Re-alignment of priorities because my need for :var header > support in Org Babel is mitigated by a different method of injecting > variables into Org Babel sections: Use noweb. Ok

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

2023-03-15 Thread Ken Mankoff
Hi Ihor and Max, Just a follow-up note that I am unlikely to be able to complete this patch anytime soon. Re-alignment of priorities because my need for :var header support in Org Babel is mitigated by a different method of injecting variables into Org Babel sections: Use noweb. I find this mo

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

2023-03-02 Thread Max Nikulin
On 27/02/2023 08:59, Ken Mankoff wrote: Have you tried to compile using make? I expect a warning due to missed (require 'ob-shell). Make did not complain about this, but did suggest mapcar -> mapc. I did not expect it. However I still think, it is better to add such require. It should not be

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

2023-02-28 Thread Ihor Radchenko
Ken Mankoff writes: >> I noticed that ob-core besides org-babel-default-header-args:LANG uses >> org-babel-header-args:LANG. The latter is not defined in ob-screen, >> however I am unsure concerning its effect (completion?). > > I don't understand this either. It defines the expected values of h

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

2023-02-27 Thread Ihor Radchenko
Ken Mankoff writes: >> To archive this, you can define a full >> org-babel-variable-assignments:screen function that does what I >> described. > > You're pushing my lisp skills here. Which is fine, but I might need some help. > > In ob-shell I see > > (defcustom org-babel-shell-names > '("sh" "

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

2023-02-26 Thread Ken Mankoff
Hi Max, On 2023-02-26 at 02:11 -08, Max Nikulin wrote: > As to `org-babel-screen-test' perhaps the issue is additional newline > added after random number. I have not tried stepping through the > function in debugger though. I haven't either. I'll see if I can figure out the issue with the help

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

2023-02-26 Thread Ken Mankoff
Hi Ihor, On 2023-02-26 at 04:18 -08, Ihor Radchenko wrote: >> +;; 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

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

2023-02-26 Thread Ihor Radchenko
Ken Mankoff writes: > From f7ca0258d72b3da5743b1134718b1d1f0d74491d Mon Sep 17 00:00:00 2001 > From: "Kenneth D. Mankoff" > 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! &g

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

2023-02-26 Thread Max Nikulin
On 25/02/2023 23:47, Ken Mankoff wrote: On 2023-02-25 at 08:05 -08, Max Nikulin wrote: I believe, it is safer to define `org-babel-variable-assignments:screen' some way: alias, substitution, function that calls `org-babel-variable-assignments:shell'. I am unsure which variant is better. I see a

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

2023-02-25 Thread Ken Mankoff
couple of callers for specific > language in ob-core.el. How's this with a defalias? -k. >From f7ca0258d72b3da5743b1134718b1d1f0d74491d Mon Sep 17 00:00:00 2001 From: "Kenneth D. Mankoff" Date: Mon, 20 Feb 2023 21:40:39 -0800 Subject: [PATCH] lisp/ob-screen.el: Support var h

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

2023-02-25 Thread Max Nikulin
On 25/02/2023 22:14, Ken Mankoff wrote: On 2023-02-24 at 19:51 -08, Max Nikulin wrote: The code still depends on on ob-shell. Is there a reason why calling `org-babel-variable-assignments:shell' is a worse variant than copy of the whole function body? I didn't realize that was a dependency. I

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

2023-02-25 Thread Ken Mankoff
I note that `org-babel-screen-test` fails, but it appears to fail before this change too... -k. On Sat, Feb 25, 2023 at 7:14 AM Ken Mankoff wrote: > Hi Max, > > On 2023-02-24 at 19:51 -08, Max Nikulin wrote: > > On 25/02/2023 01:33, Ken Mankoff wrote: > > I am unsure if Org markup is suitabl

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

2023-02-25 Thread Ken Mankoff
md sh" because sh doesn't support "declare", but it works with ":cmd bash". Improved patch attached. Thanks, -k. >From 580499925644cdb9c2dd8c783ec03c095bec7a86 Mon Sep 17 00:00:00 2001 From: "Kenneth D. Mankoff" Date: Mon, 20 Feb 2023 21:40:39

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

2023-02-24 Thread Max Nikulin
On 25/02/2023 01:33, Ken Mankoff wrote: Subject: [PATCH] lisp/ob-screen.el: Support ~:var~ header args for babel blocks Thank you for the patch. I suppose, suggestion to send patches as attachments is added mostly to prevent patches inside HTML message body. If a message could be feed to

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

2023-02-24 Thread Ken Mankoff
n.el: Support ~:var~ header args for babel blocks * ob-screen.el: (org-babel-execute:screen): Parse header params for `:var', then inject into screen session. (org-babel-variable-assignments:screen): Copied from ob-shell.el org-babel-variable-assignments:shell * etc/ORG-NEWS: Document as New Fe

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

2023-02-24 Thread Ken Mankoff
* ob-screen.el: (org-babel-execute:screen): Parse header params for `:var', then inject into screen session. (org-babel-variable-assignments:screen): Copied from ob-shell.el org-babel-variable-assignments:shell * etc/ORG-NEWS: Document as New Feature This change only supports single-value varia