emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] ob-shell: cmdline and stdin broken when used with TRAMP


From: Ihor Radchenko
Subject: Re: [BUG] ob-shell: cmdline and stdin broken when used with TRAMP
Date: Sun, 04 Sep 2022 17:49:08 +0800

Bruno Barbier <brubar.cs@gmail.com> writes:

>> You patch is >15LOC so we do need your copyright assignment before
>> merging. Let me know if you face any difficulties with the copyright
>> process. Note that FSF should reply within 5 working days.
>
> Done. I just learnt a few days ago the process is done.

Thanks!

Bastien, could you please check the FSF record.

>> > +                          (list shell-command-switch
>> > +                                (concat (file-local-name script-file)  " 
>> > " cmdline)))
>> 
>> Probably you do not need concat here.
>> AFAIU, (list shell-command-switch (file-local-name script-file) cmdline)
>> should be good enough as ARGS argument of `process-file'.
>
> The shell process should receive 2 arguments: the switch and the
> command to execute.  I think the 'concat' is mandatory here.
> Am I missing something?

You are probably right. `concat' does not heart anyway.

>>> +(defconst org-test-tramp-remote-dir "/mock::/tmp/"
>>> +  "Remote tramp directory.
>>> +We really should use 'tramp-test-temporary-file-directory', but that would 
>>> require TRAMP sources.")
>>
>> Since TRAMP sources are not normally available, we can add this variable
>> as defined in tramp-tests.el somewhere into testing/org-test.el, for
>> example.
>
>
> I've copy/pasted the logic used in GNU Emacs Tramp and added a macro.
> I've added (require 'tramp) in the body; should I move it to the top
> of the file ?

Should not be a big deal to keep the require inside.

> From d9abfb423bff620dee15d204f4bab48e2ec8dc4e Mon Sep 17 00:00:00 2001
> From: Bruno BARBIER <brubar.cs@gmail.com>
> Date: Sat, 18 Jun 2022 09:48:01 +0200
> Subject: [PATCH] ob-shell: Use 'process-file' when stdin or cmdline

'->` :: `process-file' 

> lib/ob-shell.el (org-babel-sh-evaluate): Use `process-file' (instead

lisp/ob-shell.el

> +                (with-connection-local-variables

I tried to test your patch on various Emacs versions.
`with-connection-local-variables' is not yet available in Emacs 26.
Emacs 26 has `with-connection-local-profiles' though I am not sure if it
is a full equivalent. If not, you may need to create a compatibility
wrapper for Emacs 26.

-- 
Ihor Radchenko,
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]