JustinSilverman · 2022-12-05 01:03
[https://github.com/jsilve24/ess-breakerofchains](https://github.com/jsilve24/ess-breakerofchains)
A very simple interface brining [MilesMcBain's breakerofchains R package](https://github.com/MilesMcBain/breakerofchains) to Emacs.
Very briefly, this package allows you to break long R pipes (chains) and work with the intermediate output. Great for debugging. See MilesMcBain's readme for an example. See ess-breakerofchains readme for the single function interface.
​
As always, feedback welcome. This works for me, no guarantees for others. That said, if there is something I can do to make this more useful to others I am all ears.
vinhdizzo · 2022-12-05 04:34
Will give it a spin this week!
vinhdizzo · 2022-12-05 18:34
Hi,
Tried it, and here are a few thoughts.
1. Had to install the `straight` package on emacs.
2. This gave an error: `(define-key 'ess-r-mode-map "<C-S-return>" #'ess-boc-break-chain)) ;; error`. I had to remove `'` in front of `ess-r-mode-map` to work: `(define-key ess-r-mode-map "<C-S-return>" #'ess-boc-break-chain))`
3. On Windows 10, the `C-S-return` key launched a "Narrator" app. I continued testing with just calling the `ess-breakerofchain` function.
4. To use, one has to install two R packages from github: `MilesMcBain/breakerofchains` and `jsilve24/ess-breakerofchains`. This wasn't obvious from the README.
Thanks.
JustinSilverman · 2022-12-05 18:48
I can give instructions not using straight. That should be easy.
You shouldn't have to install those R packages manually as the elisp package should do it automatically. No? Did that not work? Or are you saying you don't want those installed at all?
Will fix apostrophe.
Ya change keybinding to whatever you like.
vinhdizzo · 2022-12-05 19:06
Yes, the emacs package was smart enough to try to install those packages. However, what if the user does not have the \`devtools\` package? In my case, I have \`devtools\`, but had some issues with the the download. In all, had a lot of errors.
I wasn't expecting the emacs function to install anything, so was quite surprised when it tried to install things. It would be good to mention this in the README. A better practice would be to recommend R code for users to run and install the needed packages. That is, to be more transparent during the install.
JustinSilverman · 2022-12-05 19:18
Will do. Thanks, Actually, I wrote into the code to check / install the devtools package as well.
JustinSilverman · 2022-12-05 19:31
Updated.