Re: Passing table to Ruby session

2023-08-31 Thread Ihor Radchenko
Ihor Radchenko writes: > On Org side, the best we might do is splitting the long command into > multiline (if ruby REPL supports line continuation like \ > this or similar). Of course, it will be a workaround. Fixed, on main.

Re: Passing table to Ruby session

2023-08-25 Thread Ihor Radchenko
Ihor Radchenko writes: > Also, it looks like ruby sessions are broken now: At least, this one is fixed. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=430c72924 -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support

Re: Passing table to Ruby session

2023-08-14 Thread Ihor Radchenko
Mike Gauland 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

Re: Passing table to Ruby session

2023-08-13 Thread Mike Gauland
On 11/08/23 19:47, Ihor Radchenko wrote: On Org side, the best we might do is splitting the long command into multiline (if ruby REPL supports line continuation like \ this or similar). Of course, it will be a workaround. I've redefined org-babel-ruby-var-to-ruby in my init.el to add a

Re: Passing table to Ruby session

2023-08-11 Thread Ihor Radchenko
Mike Gauland writes: > I've reported it to the inf-ruby project: > https://github.com/nonsequitur/inf-ruby/issues/172 > > I wasn't aware that Emacs would insert EOF in a stream, but that doesn't > seem to be the problem (if it is even occurring here). AFAIK, it has nothing to do with Emacs

Re: Passing table to Ruby session

2023-08-10 Thread Mike Gauland
On 10/08/23 21:11, Ihor Radchenko wrote: Mike Gauland writes: Just to follow up on my problem sending a table to ruby. It doesn't' seem to be an org problem, but with inf-ruby. ... As long as the code to set the variable is under 4k, it works. When it's longer than that,  process-send-region

Re: Passing table to Ruby session

2023-08-10 Thread Ihor Radchenko
Mike Gauland writes: > Just to follow up on my problem sending a table to ruby. It doesn't' > seem to be an org problem, but with inf-ruby. > ... > As long as the code to set the variable is under 4k, it works. When it's > longer than that,  process-send-region sends it in pieces, and inf-ruby

Re: Passing table to Ruby session

2023-08-09 Thread Mike Gauland
On 10/08/23 09:24, Mike Gauland wrote: Just to follow up on my problem sending a table to ruby. It doesn't' seem to be an org problem, but with inf-ruby. I copied the ruby code that org generates to set the variable, and pasted it in to an inf-ruby session, and that works fine. However,

Re: Passing table to Ruby session

2023-08-09 Thread Mike Gauland
Just to follow up on my problem sending a table to ruby. It doesn't' seem to be an org problem, but with inf-ruby. I copied the ruby code that org generates to set the variable, and pasted it in to an inf-ruby session, and that works fine. However, when I select it as a region, and do

Re: Passing table to Ruby session

2023-08-09 Thread Mike Gauland
On 9/08/23 22:14, Ihor Radchenko wrote: Mike Gauland writes: I'll work on putting together a minimal example, if anyone is interested in testing it on their system. A minimal example would certainly help. See https://orgmode.org/manual/Feedback.html#Feedback Here is an example that

Re: Passing table to Ruby session

2023-08-09 Thread Ihor Radchenko
Mike Gauland writes: > I'll work on putting together a minimal example, if anyone is interested > in testing it on their system. A minimal example would certainly help. See https://orgmode.org/manual/Feedback.html#Feedback -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about

Passing table to Ruby session

2023-08-09 Thread Mike Gauland
I'm trying to pass a table to a ruby code block. The table is 211 lines, of four columns. I want to pass it to a session, so I can use the data in subsequent blocks.  I've done this successfully on my work laptop, running Windows emacs (28.2), with ruby 3.2. On my linux box (NixOS),