Ken Mankoff <[email protected]> writes:

> Hi Ihor,
>
> On 2025-11-15 at 05:28 -08, Ihor Radchenko <[email protected]> wrote...
>>> Subject: [PATCH 1/3] lisp/ob-screen.el (org-babel-screen-test): Test
>>> now passes
>>>
>>> * lisp/ob-screen.el (org-babel-screen-test): Test now passes
>>
>> There is no need to duplicate the changelog entry.
>
> I'm not sure what you mean by this.

lisp/ob-screen.el (org-babel-screen-test): Test now passes

is repeated by

* lisp/ob-screen.el (org-babel-screen-test): Test now passes

The second instance can be omitted.

>>> +         (var-helper (intern-soft
>>> +           (format "org-babel--variable-assignments:%s" shell))))
>>
>> Why not simply calling `org-babel-variable-assignments:shell'?
>
> I think this is because of non-standard shells like fish, but I am not sure 
> how I came to this code at this point. It's been a few years. 

org-babel-variable-assignments:shell can handle those just fine. You
just need to let-bind `shell-file-name' around.

> There has been some LLM use in patch #3. If that is not OK, please let me 
> know. I hope #1 and #2 are OK even if not #3.

LLMs are NOT OK for now, until GNU provides official guidance.
Maybe unless it is minimal, but I presume that the whole function came
from LLM in this patch - that's not ok because licensing is not clear.

> +(defun org-babel-variable-assignments:screen (params)
> +  "Return variable assignment strings for a screen source block.
> +
> +PARAMS is the header argument alist. Dispatches to a

Double space between sentences.

> +shell-specific helper of the form
> +`org-babel--variable-assignments:CMD' based on the :cmd header
> +argument, falling back to a generic NAME=VALUE assignment when no
> +such helper is found or bound."
> +  (let* ((cmd        (cdr (assq :cmd params)))
> +         (helper-sym (and cmd
> +                          (intern-soft
> +                           (format "org-babel--variable-assignments:%s" 
> cmd))))
> +         (helper     (and (fboundp helper-sym) helper-sym)))
> +    (mapcar
> +     (lambda (pair)
> +       (let ((name (symbol-name (car pair)))
> +             (val  (cdr pair)))
> +         (if helper
> +             (funcall helper name val)
> +           (format "%s=%s" name (org-babel-sh-var-to-sh val)))))
> +     (org-babel--get-vars params))))

Note that fallback will also be handled automatically by 
`org-babel-variable-assignments:shell'.

-- 
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>

Reply via email to