pdeffebach / ClipData.jl

Move data to and from the clipboard in Julia
https://pdeffebach.github.io/ClipData.jl/stable/
MIT License
82 stars 6 forks source link

Missing print in `mwetable(t)` / Nothing happens #29

Closed svilupp closed 7 months ago

svilupp commented 1 year ago

First of all, thank you for this awesome package.

Could you please confirm the expected usage of mwetable(t)?

Expected: As in docs, entering mwetable(t) will print the string of what to copy

julia> t = (a = [1, 2, 3], b = [100, 200, 300])
(a = [1, 2, 3], b = [100, 200, 300])

julia> mwetable(t)
df = \"\"\"
a,b
1,100
2,200
3,300
\"\"\" |> IOBuffer |> CSV.File

Current: Nothing happens (unless you set returnstring=true)


Solution: I suspect that the issue is a missing print(stdout,s) statement on this line. Otherwise, it's not clear why we would have kwarg returnstring=false (no outputs/no effects)

Should I create the PR?

pdeffebach commented 1 year ago

You are correct. Please add a PR!