pimentel / atom-r-exec Goto Github PK
View Code? Open in Web Editor NEWSend R code to various R consoles from the Atom editor
Home Page: https://atom.io/packages/r-exec
License: MIT License
Send R code to various R consoles from the Atom editor
Home Page: https://atom.io/packages/r-exec
License: MIT License
It would be nice if the code can be sent to RStudio like the R-Box package in Sublime Text.
https://github.com/randy3k/R-Box
Thanks!
Mac OS X 10.10, most recent R binaries. Most recent Atom versions.
I don't know where to start debugging.
Any hints would be welcomed.
Thanks for the great package. I am very happy to find the way to send a selected text to iTerm.
Now that iTerm and Terminal.app can receive the command, non-R users will also be able to enjoy the advantage of this package. I think that the package should get more attention (or search hits) by more general name like send-to-console
or exec-in-console
, or by short description that contains the relevant words like "terminal".
Hi, fantastic package. I was trying to get my scripts sent over to iTerm, but couldn't get it to work. Any thoughts?
For some reason, cmd-return
skipped over the line models(so)
in the following block:
so <- sleuth_fit(so)
models(so)
so <- sleuth_wt(so, 'conditionB')
Thanks so much for your work, which is very useful for working in atom.
And I failed to send line/section with cmd + enter. But, the menu works.
I've been using this Atom package for quite a while, and while there have been many enhancements to the range of tools that it supports, I thought it might be worth requesting an extension to the Hyper terminal emulator.
I'm not quite familiar enough with the structure of the package to necessarily be useful, but I would gladly contribute toward a pull request that might make this happen in the near future. Sorry about any potential overlap with previous enhancement requests of this nature.
If I send (cmd-enter) a large chunk of R code to iTerm2, iTerm2 does not recognize the original code.
For example, R is supposed to recognize test
as a function (although the function itself is meaningless),
test <- function(){
rnorm(100)
rnorm(100)
rnorm(100)
# ...(please repeat these 100 times)...#
rnorm(100)
rnorm(100)
}
but this will return something like below.
+ rnorm(100)
+ rnorm(100)
+ rnorm(100)
+ rnorm(100)
+ rnorm(100)
+ r r r r r r r10 r r r 10 r r r 10 r r r 10 r r r 10 r rnorm(100)
Error: unexpected symbol in:
" rnorm(100)
r r"
> rnorm(10 rnorm(10(100)
Error: unexpected symbol in " rnorm(10 rnorm"
> rnorm(10 rnorm(10 10 rnorm(10 10 rnorm(10 10 rnorm(1m(10 rnorm(10(10 rnorm(rm(100)
Error: unexpected symbol in " rnorm(10 rnorm"
It does not happen when I use R.app or Terminal. I'm not sure if it's just me or bug of iTerm2 or r-exec. Thanks.
Atom: 1.12.9
r-exec: 0.4.1
iTerm2: Build 3.0.13
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.2
I get the following error when trying to send the last line of a file (cmd-enter
):
/Users/hjp/github/r-exec/lib/r-exec.coffee:309 Uncaught TypeError: Cannot read property 'replace' of undefined
I am using advancePosition
and R.app
Hi, am using atom-r-exec for mac, running on iterm. have been trying to keep the cursor focused on the terminal, but this doesn't seem to work. have tried to setings page as well as adding 'atom.config.set('r-exec.focusWindow', false)' to init.coffee
any thoughts? thanks
currently, only the name of the current tab is checked and code is rejected if doesn't match "RStudio". If only 1 tab is open with the title "RStudio", then it should automatically send it there.
advancePosition
should skip comments when advancing.
cmd-return
advances when code is not being sent because RStudio server is not active in the browser
Hi, I just cant figure out how to insert the pipe %>% via some key binding. I have tried the usual suspect shift+command+M. But that is already taken. After disabling the default key bindings of the r-exec I still could not use that binding (I suppose I have to define it explicitly somehow.) Nevertheless, I have loaded dplyr and pasted %>% which however returned "unknown function". DO I miss something here?
Appreciate your help!
I'm working with an iMac OS Sierra 10.12.16 and atom version 1.18.0 x64 and the command to send code to other platforms is just not working . I tried sending it to R.app, Rstudio and iTerm. It won't work with any of them.
When trying to execute a line of code from Atom to Mac terminal (Shift+CMD+T) the following code works:
devtools::install_github("adamvi/SGP")
while this does not:
devtools::install_github('adamvi/SGP')
Exchangeable usage of single and double quotes would be most appreciated!
It would be nice to have support to automatically knit files as in vim-r-plugin. Support should be for:
Anything else?
I might take a stab at this next week.
Any other app in the Which App menu works, except iTerm2.
There is an issue when sending code to RStudio server (chrome) when sending a paragraph. For example, the following code fails (inserts additional \
):
source("gene_common.R")
but does not fail when sending only the line
[Enter steps to reproduce below:]
Atom Version: 1.7.3
System: Unknown Windows Version
Thrown From: r-exec package, v0.3.4
Uncaught Error: write EPIPE
At events.js:141
Error: write EPIPE
at exports._errnoException (util.js:856:11)
at Socket._writeGeneric (net.js:675:26)
at Socket._write (net.js:694:8)
at doWrite (_stream_writable.js:292:12)
at writeOrBuffer (_stream_writable.js:278:5)
at Socket.Writable.write (_stream_writable.js:207:11)
at Socket.write (net.js:618:40)
at execute (C:\Users\wjsbean\.atom\packages\r-exec\node_modules\node-osascript\lib\index.js:56:12)
at Object.module.exports.execute (C:\Users\wjsbean\.atom\packages\r-exec\node_modules\node-osascript\lib\index.js:64:5)
at Object.module.exports.terminal (file:///C:/Users/wjsbean/.atom/packages/r-exec/lib/r-exec.coffee:450:15)
at Object.module.exports.sendCode (file:///C:/Users/wjsbean/.atom/packages/r-exec/lib/r-exec.coffee:109:32)
at Object.module.exports.sendCommand (file:///C:/Users/wjsbean/.atom/packages/r-exec/lib/r-exec.coffee:91:6)
at atom-workspace.<anonymous> (file:///C:/Users/wjsbean/.atom/packages/r-exec/lib/r-exec.coffee:40:34)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\wjsbean\AppData\Local\atom\app-1.7.3\resources\app.asar\src\command-registry.js:260:29)
at CommandRegistry.handleCommandEvent (C:\Users\wjsbean\AppData\Local\atom\app-1.7.3\resources\app.asar\src\command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Users\wjsbean\AppData\Local\atom\app-1.7.3\resources\app.asar\src\command-registry.js:160:19)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (C:\Users\wjsbean\AppData\Local\atom\app-1.7.3\resources\app.asar\src\atom-environment.js:1100:28)
at EventEmitter.outerCallback (C:\Users\wjsbean\AppData\Local\atom\app-1.7.3\resources\app.asar\src\application-delegate.js:314:25)
at emitTwo (events.js:87:13)
at EventEmitter.emit (events.js:172:7)
-1:03.4.0 command-palette:toggle (atom-text-editor.editor.is-focused)
-0:49.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:12.9.0 r-exec:send-knitr (atom-text-editor.editor.is-focused)
-0:07.1.0 r-exec:send-command (atom-text-editor.editor.is-focused)
{
"core": {
"disabledPackages": [
"language-gfm"
]
},
"r-exec": {
"whichApp": "Terminal"
}
}
# User
atom-python-test, v0.1.7
autocomplete-python, v1.7.2
language-markdown, v0.13.0
language-r, v0.4.1
linter, v1.11.4
linter-lintr, v1.0.4
linter-python-pep8, v0.2.0
minimap, v4.23.5
python-autopep8, v0.1.3
python-debugger, v0.1.0
python-indent, v0.4.3
python-jedi, v0.3.6
r-exec, v0.3.4
# Dev
No dev packages
Hi,
I was trying to avoid sending the working directory every time some code is sent to the R console, and I saw that in the new version (0.3.0) there's an option for that, besides some other changes. Yet, I couldn't install or update the new version, is there any way to do that? And in case it is not, where could I find the line of code to change the setwd
feature?
By the way, thanks a lot for this package!!
Use activationCommands
instead of activationEvents
in your package.json
Commands should be grouped by selector as follows:
"activationCommands": {
"atom-workspace": ["foo:bar", "foo:baz"],
"atom-text-editor": ["foo:quux"]
}
Package.getActivationCommands (c:\Users\ahendrickson\AppData\Local\atom\app-0.200.0\resources\app.asar\src\package.js:808:9)
Package.hasActivationCommands (c:\Users\ahendrickson\AppData\Local\atom\app-0.200.0\resources\app.asar\src\package.js:733:20)
<unknown> (c:\Users\ahendrickson\AppData\Local\atom\app-0.200.0\resources\app.asar\src\package.js:185:24)
Package.measure (c:\Users\ahendrickson\AppData\Local\atom\app-0.200.0\resources\app.asar\src\package.js:163:15)
Package.load (c:\Users\ahendrickson\AppData\Local\atom\app-0.200.0\resources\app.asar\src\package.js:177:12)
PackageManager.loadPackage (c:\Users\ahendrickson\AppData\Local\atom\app-0.200.0\resources\app.asar\src\package-manager.js:355:14)
I haven't decided how to do this yet, but allow users to behind specific programs to specific keys.
Thus, essentially have a command that look something like this:
`r-exec:send-line-iterm2`
which will always send the line to iterm2
.
(suggested in #38)
Argument to path.dirname
must be a string
path.dirname (/Applications/Atom.app/Contents/Resources/app.asar/src/electron-shims.js:9:10)
execute (/Users/hjp/.atom/packages/r-exec/node_modules/node-osascript/lib/index.js:24:52)
Object.execute (/Users/hjp/.atom/packages/r-exec/node_modules/node-osascript/lib/index.js:64:5)
Object.getBrowserTitle (/Users/hjp/.atom/packages/r-exec/lib/r-exec.coffee:614:24)
Object.browser (/Users/hjp/.atom/packages/r-exec/lib/r-exec.coffee:634:19)
Object.sendCode (/Users/hjp/.atom/packages/r-exec/lib/r-exec.coffee:200:23)
head(inertial_signals_test[[1]])
nrow(inertial_signals_test[[1]]) # 2947 samples
ncol(inertial_signals_test[[1]]) # 128 cols
table(y_test)
In the above code, if the Cursor is on the first line, and Advance Position == TRUE, then it skips over line 2,3 to line 5.
Atom will no longer load this package after June 1st without changes. There are a couple deprecations on the latest version (0.1.0
) of this package:
styles/
directory instead of stylesheets/
in the <pack-name>
packageactivationCommands
instead of activationEvents
in your package.json Commands should be grouped by selector as follows: json "activationCommands": { "atom-workspace": ["foo:bar", "foo:baz"], "atom-text-editor": ["foo:quux"] }
atom.views.getView(atom.workspace)
, which returns an HTMLElement.Visit https://gist.github.com/benogle/6d09e295c84b717ef9b4 and search for your package name to see up-to-date deprecations.
If this package has been replaced by another package or functionality in core, please reply with this information.
See atom/atom#6867 for more info. Thanks!
When in Rmd
or Rnw
blocks, write a command which allows sending the entire block to R. For example, send code in between the following types of blocks when the cursor is in on the block:
```r
# code goes here
```
or
<<<myBlock>>>
# code goes here
@
Hello,
thank you for bridging R to atom
! I'm new to atom and hence apologize for the triviality of my question.
While using atom I could r-exec
and pass the code to r-studio server
via chrome and to iterm
as well as toterminal
. However, I could't pass code to R.app
I installed R.app
via brew install R
.
Do I have to consider to determine the path to R.app
explicitly?
How could I pass r-exec
of R-code to Atom Term 3
,for example, to keep everything in Atom?
Thank you!
Eugene
OSX El Capitan 10.11.4 Atom 1.6.2
Store package style sheets in the styles/
directory instead of stylesheets/
in the r-exec
package
Package.getStylesheetsPath (c:\Users\ahendrickson\AppData\Local\atom\app-0.200.0\resources\app.asar\src\package.js:460:9)
Package.getStylesheetPaths (c:\Users\ahendrickson\AppData\Local\atom\app-0.200.0\resources\app.asar\src\package.js:471:32)
Package.loadStylesheets (c:\Users\ahendrickson\AppData\Local\atom\app-0.200.0\resources\app.asar\src\package.js:453:38)
<unknown> (c:\Users\ahendrickson\AppData\Local\atom\app-0.200.0\resources\app.asar\src\package.js:183:19)
Package.measure (c:\Users\ahendrickson\AppData\Local\atom\app-0.200.0\resources\app.asar\src\package.js:163:15)
Package.load (c:\Users\ahendrickson\AppData\Local\atom\app-0.200.0\resources\app.asar\src\package.js:177:12)
I select some text and press command-enter. I have a group of iTerm tabs but the text is sent to one of the non-selected (non-foreground, non-focused tabs).
I would be grateful if you could consider removing bindings with Alt+Letter from the package's Mac key bindings.
Using the alt-modifier alone without any other modifier (Cmd, Ctrl) โ shift does not count! โ shadows additional symbols available on the keyboard. E.g., on a German or even US keyboard, I now cannot type the en-dash (Alt+Minus) anymore due to the r-exec keybinding, which is also active in Markdown mode, where it is quite useless. I would be grateful if the default configuration would not break keyboard behaviour; such grave changes should be opt-in in my opinion.
Is there a way to stop that from sending every time?
sometimes if the focus isn't on the command line prompt when sending to browser (RStudio server) code is not sent correctly.
this is a simple fix: send the keystrokes ctrl-2
before pasting code
[Enter steps to reproduce below:]
Atom Version: 1.2.4
System: Mac OS X 10.10.5
Thrown From: r-exec package, v0.3.0
Uncaught TypeError: Cannot read property 'substring' of undefined
At /Users/xiangxiangzeng/.atom/packages/r-exec/lib/r-exec.coffee:79
TypeError: Cannot read property 'substring' of undefined
at Object.module.exports.setWorkingDirectory (/Users/xiangxiangzeng/.atom/packages/r-exec/lib/r-exec.coffee:79:14)
at atom-workspace.<anonymous> (/Users/xiangxiangzeng/.atom/packages/r-exec/lib/r-exec.coffee:31:27)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:987:28)
at emitOne (events.js:77:13)
at EventEmitter.emit (events.js:169:7)
-2:59.7.0 core:select-up (atom-text-editor.editor.is-focused)
-2:57.9.0 editor:newline-below (atom-text-editor.editor.is-focused)
-2:56.9.0 core:move-down (atom-text-editor.editor.is-focused)
-2:55.4.0 core:select-up (atom-text-editor.editor.is-focused)
-2:54.9.0 editor:newline-below (atom-text-editor.editor.is-focused)
7x -2:54.1.0 core:backspace (atom-text-editor.editor.is-focused)
2x -2:50.7.0 core:select-down (atom-text-editor.editor.is-focused)
-2:47.9.0 core:backspace (atom-text-editor.editor.is-focused)
-2:41.9.0 tree-view:add-folder (span.name.icon.icon-file-directory)
-2:40.8.0 core:cancel (atom-text-editor.editor.mini.is-focused)
-2:40.3.0 tool-panel:unfocus (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
2x -1:47.6.0 core:cancel (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
-1:07.6.0 r-exec:send-command (ul.list-inline.tab-bar.inset-panel)
-1:03.5.0 core:select-up (atom-text-editor.editor.is-focused)
-1:01.8.0 editor:newline-below (atom-text-editor.editor.is-focused)
-0:00.4.0 r-exec:setwd (atom-text-editor.editor.is-focused)
{
"core": {}
}
# User
language-r, v0.4.0
r-exec, v0.3.0
# Dev
No dev packages
Hello Harold,
thx again for putting your time into a deeper R
& Atom
integration.
Im not 100% sure whether that is something one can adjust quickly, but how do you advance to next line after hitting cmd
enter
? I expect (at least from the Rstudio behaviour) that after hitting cmd
enter
one should advancing to the next line of code. Currently, after hitting that keys the cursor just disappears forcing the user to set it one new line manually.
Additionally, I was wondering whether you had some time to move further with #32 #36 and your opinion on autocompletion of external packages. Do you have some recommendation on how to do that? Im looking forward to finally move from Rstudio to Atom :)
Thx
Eugene
Works with Terminal. Tried closing iTerm fully, then opening again, going to project dir, opening file with atom, starting R, then cmd+enter. Only one iTerm window, and its running R. Where to start looking?
For the time being its fine, I'll just have to use terminal lol
[Enter steps to reproduce below:]
Atom Version: 0.165.0
System: Mac OS X 10.10.1
Thrown From: r-exec package, v0.1.0
Uncaught TypeError: Cannot read property 'getSelection' of undefined
At /Users/therimalaya/.atom/packages/r-exec/lib/r-exec.coffee:45
TypeError: Cannot read property 'getSelection' of undefined
at Object.module.exports.rstudioserver (/Users/therimalaya/.atom/packages/r-exec/lib/r-exec.coffee:45:49)
at atom-workspace.<anonymous> (/Users/therimalaya/.atom/packages/r-exec/lib/r-exec.coffee:8:69)
at atom-workspace.handler (/Applications/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:115:32)
at atom-workspace.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4681:9)
at atom-workspace.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4359:46)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:549:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:391:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:167:20)
-0:27.6 emmet:expand-abbreviation (input.hidden-input)
-0:26.3 core:undo (input.hidden-input)
-0:24.5 grammar-selector:show (atom-text-editor.editor.editor-colors)
2x -0:21.2 core:backspace (input.hidden-input)
-0:19.9 core:confirm (input.hidden-input)
-0:18.7 emmet:expand-abbreviation (input.hidden-input)
-0:17.8 core:undo (input.hidden-input)
-0:15.9 emmet:expand-abbreviation (input.hidden-input)
-0:14.8 core:undo (input.hidden-input)
-0:00.0 r-exec:send-to-rstudio-server (input.hidden-input)
{
"core": {}
}
# User
atom-beautify, v0.17.3
autocomplete-bibtex, v0.4.1
autocomplete-paths, v0.9.1
autocomplete-plus, v1.1.0
autocomplete-snippets, v0.3.2
color-picker, v1.2.6
emmet, v2.3.0
language-knitr, v0.1.0
language-latex, v0.4.1
language-r, v0.1.1
linter, v0.9.0
minimap, v3.4.9
project-manager, v1.14.1
sassbeautify, v0.2.0
wordpress, v0.2.0
wordpress-api, v1.0.0
# Dev
No dev packages
/cc @atom/core
Really need to write some specs:
[Enter steps to reproduce below:]
Atom Version: 0.190.0
System: Mac OS X 10.10.2
Thrown From: r-exec package, v0.1.0
Failed to load the r-exec package
At Cannot read property 'getPath' of null
TypeError: Cannot read property 'getPath' of null
at Object.<anonymous> (/Users/indu/.atom/packages/r-exec/lib/r-exec.coffee:58:13)
at Object.<anonymous> (/Users/indu/.atom/packages/r-exec/lib/r-exec.coffee:1:1)
at Module._compile (module.js:452:26)
at Object.requireCoffeeScript (/Applications/Atom.app/Contents/Resources/app/node_modules/coffee-cash/lib/coffee-cash.js:85:19)
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app/src/package.js:665:34)
at /Applications/Atom.app/Contents/Resources/app/src/package.js:174:28
at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:152:15)
at Package.module.exports.Package.load (/Applications/Atom.app/Contents/Resources/app/src/package.js:166:12)
at PackageManager.module.exports.PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:355:14)
at PackageManager.module.exports.PackageManager.loadPackages (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:325:14)
at Atom.module.exports.Atom.startEditorWindow (/Applications/Atom.app/Contents/Resources/app/src/atom.js:631:21)
at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:12:8)
at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:23:4)
at Module._compile (module.js:452:26)
at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app/src/babel.js:162:21)
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at window.onload (file:///Applications/Atom.app/Contents/Resources/app/static/index.js:54:25)
{
"core": {
"themes": [
"atom-dark-ui",
"atom-dark-syntax"
],
"disabledPackages": [
"vim-mode"
]
}
}
# User
color-picker, v1.4.4
linter, v0.11.1
merge-conflicts, v1.2.10
r-exec, v0.1.0
run-command, v0.1.1
# Dev
No dev packages
[Enter steps to reproduce below:]
Atom Version: 1.4.3
System: Mac OS X 10.11.3
Thrown From: r-exec package, v0.3.3
Uncaught TypeError: Cannot read property 'getBuffer' of undefined
At /Users/wolfemd/.atom/packages/r-exec/lib/r-exec.coffee:81
TypeError: Cannot read property 'getBuffer' of undefined
at Object.module.exports._getEditorAndBuffer (/Users/wolfemd/.atom/packages/r-exec/lib/r-exec.coffee:81:20)
at Object.module.exports.sendCommand (/Users/wolfemd/.atom/packages/r-exec/lib/r-exec.coffee:86:25)
at atom-workspace.<anonymous> (/Users/wolfemd/.atom/packages/r-exec/lib/r-exec.coffee:40:34)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:36)
at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)
-2:22.8.0 r-exec:send-paragraph (atom-text-editor.editor.is-focused)
-2:19 core:move-left (atom-text-editor.editor.is-focused)
-2:17.7.0 r-exec:send-paragraph (atom-text-editor.editor.is-focused)
-2:12.6.0 core:select-down (atom-text-editor.editor.is-focused)
-2:09.8.0 editor:newline-above (atom-text-editor.editor.is-focused)
-2:08.9.0 core:move-up (atom-text-editor.editor.is-focused)
-2:08.3.0 editor:newline-below (atom-text-editor.editor.is-focused)
-2:07.6.0 core:move-up (atom-text-editor.editor.is-focused)
-2:06.7.0 core:move-right (atom-text-editor.editor.is-focused)
-2:06.3.0 editor:newline-below (atom-text-editor.editor.is-focused)
-2:04.5.0 core:undo (atom-text-editor.editor.is-focused)
-2:03.6.0 core:move-left (atom-text-editor.editor.is-focused)
-2:03.2.0 core:select-down (atom-text-editor.editor.is-focused)
-2:02.7.0 editor:newline-below (atom-text-editor.editor.is-focused)
2x -1:59.3.0 core:move-up (atom-text-editor.editor.is-focused)
3x -0:16.9.0 r-exec:send-command (atom-text-editor.editor.mini.is-focused)
{
"core": {},
"r-exec": {
"whichApp": "Terminal"
}
}
# User
language-r, v0.4.0
minimap, v4.19.0
r-exec, v0.3.3
# Dev
No dev packages
Nice work on this. reminds me of r-box from Sublime. it's super useful in my case because I have to run a lot of things on a cluster and can't stand being handcuffed by emacs/vim etc.
i've slowly added some keymappings to resemble rstudio but one feature I'd love to see is "resend last command", e.g. when you're working on a block of code and need to constantly rerun something. Thanks!
atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace)
,
which returns an HTMLElement.
Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:54:11)
Object.activate (/Users/trevi/Dropbox/Data/.atom/packages/r-exec/lib/r-exec.coffee:6:9)
While I do develop in R, I also develop in other languages.
Sending text from atom to the terminal (or other user-designated app) is very useful in general, not only with R. Sublime Text has SendText a general-purpose plugin for sending any kind of text to the terminal.
Is there any reason why atom-r-exec could not be used with any language (or even plain text)? If so I would suggest the name and documentation change to reflect its general purpose nature.
Also perhaps some features could be generalized, for example the "advancing past comments" could take into account the different comment symbols in different languages.
If a markdown block is only of length 1 (only 1 line) sending the knitr command does not work correctly (gives an error that no knitr block is found)
Instead of sending the R code outside of Atom, is it possible to use a built-in console (as in Juno) to send the code to? A workspace with all the variables and a plotting area, which are also features in Juno (and that hopefully you can leverage!) would be awesome. Indeed, this would put Atom on par with (or really, beyond) RStudio. Thanks for the great package.
[Enter steps to reproduce below:]
Atom Version: 1.0.19
System: Mac OS X 10.11.1
Thrown From: r-exec package, v0.2.0
Uncaught Error: Cannot find module 'node-osascript'
At module.js:336
Error: Cannot find module 'node-osascript'
at Module._resolveFilename (module.js:334:15)
at Function.Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app.asar/src/module-cache.js:383:52)
at Function.Module._load (module.js:284:25)
at Module.require (module.js:363:17)
at require (module.js:382:17)
at Object.module.exports.rapp (/Users/stoelzle/.atom/packages/r-exec/lib/r-exec.coffee:108:17)
at Object.module.exports.sendCode (/Users/stoelzle/.atom/packages/r-exec/lib/r-exec.coffee:52:28)
at Object.module.exports.sendCommand (/Users/stoelzle/.atom/packages/r-exec/lib/r-exec.coffee:38:6)
at atom-workspace.<anonymous> (/Users/stoelzle/.atom/packages/r-exec/lib/r-exec.coffee:29:34)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:245:29)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:145:19)
at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:70:30)
at emitOne (events.js:77:13)
at EventEmitter.emit (events.js:169:7)
-0:22.2.0 r-exec:send-command (atom-text-editor.editor.is-focused)
-0:09.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
-0:09.0 core:cancel (atom-text-editor.editor.is-focused)
-0:05.6.0 symbols-view:toggle-project-symbols (atom-text-editor.editor.is-focused)
-0:04.7.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
-0:04.7.0 core:cancel (atom-text-editor.editor.mini.is-focused)
-0:00.5.0 r-exec:send-command (atom-text-editor.editor.is-focused)
{
"core": {
"themes": [
"atom-dark-ui",
"base16-tomorrow-dark-theme"
],
"packagesWithKeymapsDisabled": [
"r-exec"
]
},
"r-exec": {
"whichApp": "R.app",
"advancePosition": true,
"focusWindow": true
}
}
# User
gtk-dark-theme, v0.1.4
language-r, v0.3.0
r-exec, v0.2.0
# Dev
No dev packages
Steps to reproduce:
I get this error reliably, regardless of the content of the line. The line is sent to the terminal and evaluated by R, but a red box pops up telling me to file an issue.
Atom Version: 1.4.3
System: Mac OS X 10.11.3
Thrown From: r-exec package, v0.3.3
Uncaught Error: Undefined screen line when clipping screen position
At /Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:886
Error: Undefined screen line when clipping screen position
at DisplayBuffer.module.exports.DisplayBuffer.clipScreenPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:874:15)
at DisplayBuffer.module.exports.DisplayBuffer.bufferPositionForScreenPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:826:20)
at TextEditorMarker.module.exports.TextEditorMarker.setHeadScreenPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-marker.js:185:60)
at /Applications/Atom.app/Contents/Resources/app.asar/src/cursor.js:67:31
at Cursor.module.exports.Cursor.changePosition (/Applications/Atom.app/Contents/Resources/app.asar/src/cursor.js:673:7)
at Cursor.module.exports.Cursor.setScreenPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/cursor.js:65:19)
at /Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1448:23
at TextEditor.module.exports.TextEditor.moveCursors (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1652:9)
at TextEditor.module.exports.TextEditor.setCursorScreenPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1447:19)
at Object.module.exports.sendCommand (/Users/davidharris/.atom/packages/r-exec/lib/r-exec.coffee:98:14)
at atom-workspace.<anonymous> (/Users/davidharris/.atom/packages/r-exec/lib/r-exec.coffee:40:34)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1013:28)
at emitOne (events.js:77:13)
at EventEmitter.emit (events.js:169:7)
-0:21.2.0 pane:reopen-closed-item (atom-text-editor.editor.is-focused)
-0:11.9.0 editor:newline-below (atom-text-editor.editor.is-focused)
-0:11.2.0 core:move-up (atom-text-editor.editor.is-focused)
-0:10.8.0 editor:select-to-end-of-line (atom-text-editor.editor.is-focused)
-0:10.5.0 editor:newline-below (atom-text-editor.editor.is-focused)
-0:09.8.0 core:move-up (atom-text-editor.editor.is-focused)
-0:02.2.0 r-exec:send-command (atom-text-editor.editor.is-focused)
{
"core": {
"themes": [
"one-light-ui",
"one-light-syntax"
]
},
"r-exec": {
"advancePosition": true,
"whichApp": "Terminal"
}
}
# User
language-r, v0.4.0
r-exec, v0.3.3
# Dev
No dev packages
In keymaps\r-exec.cson: Use the atom-text-editor
tag instead of the editor
class.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.