tpapp / julia-repl

Run an inferior Julia REPL in a terminal inside Emacs
Other
170 stars 35 forks source link

Send region via include #62

Open nbrantut opened 5 years ago

nbrantut commented 5 years ago

This is an attempt at solving #18. I am new to elisp so I hope it is not too badly written; but it works. I made the function julia-repl-send-region-through-tmp-file with two optional arguments with region start and end, so it can be used programmatically if needed.

Let me know what you think. (again the code might probably be simplified, I am not used to elisp).

tpapp commented 5 years ago

Thanks for the PR. My problem with this approach is that

  1. if the tmp file is not deleted (which seems to be the case), the directory is cluttered with these things,

  2. if the tmp file would be deleted, then the code location for the methods defined there becomes invalid, as the file no longer exists.

Instead, I would recommend just putting things in a module and using Revise.jl, or possibly using includet once #64 is finalized.