[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Passing table to Ruby session
From: |
Ihor Radchenko |
Subject: |
Re: Passing table to Ruby session |
Date: |
Mon, 14 Aug 2023 10:18:46 +0000 |
Mike Gauland <mikelygee@gmail.com> writes:
> I've redefined org-babel-ruby-var-to-ruby in my init.el to add a newline
> after each element in an array, which I think will work for anything
> less than a 4k-long string. Ideally, the hard-coded \n would follow the
> EOL convention of the buffer, but I haven't gotten that far yet.
>
>
> (defun org-babel-ruby-var-to-ruby (var)
> "Convert VAR into a ruby variable.
> Convert an elisp value into a string of ruby source code
> specifying a variable of the same value."
> (if (listp var)
> (concat "[" (mapconcat #'org-babel-ruby-var-to-ruby var ", \n") "]")
I think Emacs should handle it automatically.
Also, it looks like ruby sessions are broken now:
#+begin_src ruby :session org-test-ruby :results output
s = "1"
s = "2"
s = "3"
puts s
s = "4"
#+end_src
yields nothing.
--
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>
- Passing table to Ruby session, Mike Gauland, 2023/08/09
- Re: Passing table to Ruby session, Ihor Radchenko, 2023/08/09
- Re: Passing table to Ruby session, Mike Gauland, 2023/08/09
- Re: Passing table to Ruby session, Mike Gauland, 2023/08/09
- Re: Passing table to Ruby session, Mike Gauland, 2023/08/10
- Re: Passing table to Ruby session, Ihor Radchenko, 2023/08/10
- Re: Passing table to Ruby session, Mike Gauland, 2023/08/10
- Re: Passing table to Ruby session, Ihor Radchenko, 2023/08/11
- Re: Passing table to Ruby session, Mike Gauland, 2023/08/13
- Re: Passing table to Ruby session,
Ihor Radchenko <=
- Re: Passing table to Ruby session, Ihor Radchenko, 2023/08/25
- Re: Passing table to Ruby session, Ihor Radchenko, 2023/08/31