emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mike Gauland <mikelygee@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: Passing table to Ruby session
Date: Thu, 10 Aug 2023 07:06:38 +1200	[thread overview]
Message-ID: <69e49c6b-62fe-f49c-2ac3-b1a57d2dea73@gmail.com> (raw)
In-Reply-To: <87350so731.fsf@localhost>

On 9/08/23 22:14, Ihor Radchenko wrote:
> Mike Gauland <mikelygee@gmail.com> 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 demonstrates the problem on my system. I've run 
with my init files disabled, and that makes no difference. Also, I've 
taken the data as it is sent to the session, and pasted into irb in  a 
terminal window, and it ran just fine (which I think rules out any 
problems with line length, or with the session code generating a bad 
script for the longer variable).  I'm keen to find out if anyone else 
can reproduce this, or if there's something quirky about my system.

# Without a session, this works even when the table isn't shortened:
#
#+begin_src ruby :var raw_data=raw-data :colnames no :exports code 
:results output
   puts(raw_data.count)
#+end_src

#+RESULTS:
: 75

# The next two blocks *only* work when the table is cut off at 73. If the
# last two lines are added back in to the table, the ruby session does not
# return.
# Also, even with a truncated table, I don't get any output without the
# extra call to puts() to print a blank line.
#
#+begin_src ruby :var raw_data=raw-data :session :colnames no :exports 
code :results output
   puts(raw_data.count)
   puts()
#+end_src

#+RESULTS:
: 75


#+begin_src ruby :var raw_data=raw-data :session :colnames no :exports 
code :results value
   raw_data.count
#+end_src

#+RESULTS:
: 75


#+NAME: raw-data
| Column 1 | Column 2 | Notes |
|----------+----------+-------------------------------------------|
|        0 |        0 | This is note #0. It just takes up space. |
|        1 |        1 | This is note #1. It just takes up space. |
|        2 |        2 | This is note #2. It just takes up space. |
|        3 |        3 | This is note #3. It just takes up space. |
|        4 |        4 | This is note #4. It just takes up space. |
|        5 |        5 | This is note #5. It just takes up space. |
|        6 |        6 | This is note #6. It just takes up space. |
|        7 |        7 | This is note #7. It just takes up space. |
|        8 |        8 | This is note #8. It just takes up space. |
|        9 |        9 | This is note #9. It just takes up space. |
|       10 |       10 | This is note #10. It just takes up space. |
|       11 |       11 | This is note #11. It just takes up space. |
|       12 |       12 | This is note #12. It just takes up space. |
|       13 |       13 | This is note #13. It just takes up space. |
|       14 |       14 | This is note #14. It just takes up space. |
|       15 |       15 | This is note #15. It just takes up space. |
|       16 |       16 | This is note #16. It just takes up space. |
|       17 |       17 | This is note #17. It just takes up space. |
|       18 |       18 | This is note #18. It just takes up space. |
|       19 |       19 | This is note #19. It just takes up space. |
|       20 |       20 | This is note #20. It just takes up space. |
|       21 |       21 | This is note #21. It just takes up space. |
|       22 |       22 | This is note #22. It just takes up space. |
|       23 |       23 | This is note #23. It just takes up space. |
|       24 |       24 | This is note #24. It just takes up space. |
|       25 |       25 | This is note #25. It just takes up space. |
|       26 |       26 | This is note #26. It just takes up space. |
|       27 |       27 | This is note #27. It just takes up space. |
|       28 |       28 | This is note #28. It just takes up space. |
|       29 |       29 | This is note #29. It just takes up space. |
|       30 |       30 | This is note #30. It just takes up space. |
|       31 |       31 | This is note #31. It just takes up space. |
|       32 |       32 | This is note #32. It just takes up space. |
|       33 |       33 | This is note #33. It just takes up space. |
|       34 |       34 | This is note #34. It just takes up space. |
|       35 |       35 | This is note #35. It just takes up space. |
|       36 |       36 | This is note #36. It just takes up space. |
|       37 |       37 | This is note #37. It just takes up space. |
|       38 |       38 | This is note #38. It just takes up space. |
|       39 |       39 | This is note #39. It just takes up space. |
|       40 |       40 | This is note #40. It just takes up space. |
|       41 |       41 | This is note #41. It just takes up space. |
|       42 |       42 | This is note #42. It just takes up space. |
|       43 |       43 | This is note #43. It just takes up space. |
|       44 |       44 | This is note #44. It just takes up space. |
|       45 |       45 | This is note #45. It just takes up space. |
|       46 |       46 | This is note #46. It just takes up space. |
|       47 |       47 | This is note #47. It just takes up space. |
|       48 |       48 | This is note #48. It just takes up space. |
|       49 |       49 | This is note #49. It just takes up space. |
|       50 |       50 | This is note #50. It just takes up space. |
|       51 |       51 | This is note #51. It just takes up space. |
|       52 |       52 | This is note #52. It just takes up space. |
|       53 |       53 | This is note #53. It just takes up space. |
|       54 |       54 | This is note #54. It just takes up space. |
|       55 |       55 | This is note #55. It just takes up space. |
|       56 |       56 | This is note #56. It just takes up space. |
|       57 |       57 | This is note #57. It just takes up space. |
|       58 |       58 | This is note #58. It just takes up space. |
|       59 |       59 | This is note #59. It just takes up space. |
|       60 |       60 | This is note #60. It just takes up space. |
|       61 |       61 | This is note #61. It just takes up space. |
|       62 |       62 | This is note #62. It just takes up space. |
|       63 |       63 | This is note #63. It just takes up space. |
|       64 |       64 | This is note #64. It just takes up space. |
|       65 |       65 | This is note #65. It just takes up space. |
|       66 |       66 | This is note #66. It just takes up space. |
|       67 |       67 | This is note #67. It just takes up space. |
|       68 |       68 | This is note #68. It just takes up space. |
|       69 |       69 | This is note #69. It just takes up space. |
|       70 |       70 | This is note #70. It just takes up space. |
|       71 |       71 | This is note #71. It just takes up space. |
|       72 |       72 | This is note #72. It just takes up space. |
|       73 |       73 | This is note #73. It just takes up space. |

|       74 |       74 | This is note #74. It just takes up space. |
|       75 |       75 | This is note #75. It just takes up space. |







  reply	other threads:[~2023-08-09 19:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-09  8:17 Passing table to Ruby session Mike Gauland
2023-08-09 10:14 ` Ihor Radchenko
2023-08-09 19:06   ` Mike Gauland [this message]
2023-08-09 21:24     ` Mike Gauland
2023-08-10  4:40       ` Mike Gauland
2023-08-10  9:11       ` Ihor Radchenko
2023-08-11  1:24         ` Mike Gauland
2023-08-11  7:47           ` Ihor Radchenko
2023-08-13 20:26             ` Mike Gauland
2023-08-14 10:18               ` Ihor Radchenko
2023-08-25 13:19                 ` Ihor Radchenko
2023-08-31  9:58             ` 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=69e49c6b-62fe-f49c-2ac3-b1a57d2dea73@gmail.com \
    --to=mikelygee@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /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).