From: Ken Mankoff <mankoff@gmail.com>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] lisp/ob-screen.el: Support ~:var~ header args for babel blocks
Date: Sun, 26 Feb 2023 17:59:18 -0800 [thread overview]
Message-ID: <87k003swax.fsf@t480.home> (raw)
In-Reply-To: <0e841ec9-f770-4f4f-a5e6-eb15290ab8a7@gmail.com>
Hi Max,
On 2023-02-26 at 02:11 -08, Max Nikulin <manikulin@gmail.com> 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 of the debugger.
> It seems top level headings were separated by single empty line.
Fixed.
> ;; Reuse the variable assignment code from ob-shell
>> +(defalias 'org-babel-variable-assignments:screen
>> + 'org-babel-variable-assignments:shell)
>
> 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.
> P.S. My expectations based on the package name were that ob-screen is
> intended for running commands on remote hosts.
That too. But I also find it useful for running long commands on localhost without worrying about :async in emacs.
Another nice thing here is that this is, by default, session-based, and can be accessed outside of Org, while Bash blocks don't always play nice with sessions. I can, for example and all in Org Babel, spawn a screen session, ssh to a remote host, and then inject :var into the remote session. I find this quite powerful, and I haven't figured out how to do it with =BEGIN_SRC bash= or =BEGIN_SRC shell= blocks.
> Reading the code I noticed a couple of issues that may be fixed when
> you will decide to touch this file next time: -
> `org-babel-screen-session-socketname' does not respect
> `org-babel-screen-location' - `string-match' is used where it may be
> replaced by `string-match-p' since match data is not used.
Both fixed. Should these be separate patches (3 total), or two - one for the new feature, and one 'cleanup'?
> 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.
-k.
next prev parent reply other threads:[~2023-02-27 2:00 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 [this message]
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
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=87k003swax.fsf@t480.home \
--to=mankoff@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=manikulin@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).