Comments (11)
Thanks for reporting the bug!
The option is available for almost all file types supported by the plugin: r, rnoweb, rhelp, rrst and rmd. The error message means that the option is active (otherwise, nothing would happen).
I have just tested \rv in Linux and it works. Because I don't have access to a Mac OS X, I can't test and fix the bug you have reported. So, we have to wait until someone fixes the bug and sends a patch to me.
from vim-r-plugin.
I would need some guidance, as i've not written a vim plug before, but i am happy to help where i can.
Let me know.
On 09/10/2013, at 9:17 AM, Jakson Alves de Aquino [email protected] wrote:
Thanks for reporting the bug!
The option is available for almost all file types supported by the plugin: r, rnoweb, rhelp, rrst and rmd. The error message means that the option is active (otherwise, nothing would happen).
I have just tested \rv in Linux and it works. Because I don't have access to a Mac OS X, I can't test and fix the bug you have reported. So, we have to wait until someone fix the bug and send a patch to me.
—
Reply to this email directly or view it on GitHub.
from vim-r-plugin.
The most relevant line to debug this problem is the line 737 of r-plugin/common_global.vim:
let rlog = system("open " . rcmd)
To debug this code you can do at least two things:
(1) Add the following line just before the line 737 to know what is the command that is being executed:
call RWarningMsg(rcmd)
Then, when you do \rv the value of rcmd variable will be printed in Vim's as a warning message.
(2) Change the code until it works. You may start by typing the following in Vim (Normal mode):
:echo system("open R --vanilla")
from vim-r-plugin.
HI, sorry for the time gap. I added
call RWarning(rcmd)
and at the head of the error i see: /Applications/R.app --vanilla
.
I tried :! open R --vanilla
and it returned open: unrecognized option
--vanilla'` and more error code.
A bit of searching turned up this link: https://stat.ethz.ch/pipermail/r-sig-mac/2013-February/009978.html
In particular, Simon Urbanck commented that:
" ... command line arguments are only supported in command line tools, and R.app is not a command line tool.
Given that this is something very obscure we don't have any plans to support this, but we may entertain a patch. Beware, though, that applications fall under different rules that command line tools, so you cannot just pass-on argv to R."
To check this, i tried :! R --vanilla
from macvim and it worked.
The issue seems to be that the R.app is not a command line application; so if folks want to run the R.app as vanilla from vim, it's not going to work. Perhaps you can change the defaults so it spawns a non-R.app instance when \rv
is given.
from vim-r-plugin.
Thanks for your investigation! Now, instead of trying to pass arguments to R.app, the plugin shows a warning: "We cannot pass arguments to R.app (arguments here)."
from vim-r-plugin.
I think that it would be unexpected for users to see R starting in a terminal emulator when they are used to see R.app being started by the Vim-R-plugin. This surely would be reported as bug. So, Mac OS X users wanting to run R in a terminal emulator have to put in their vimrc:
let vimrplugin_applescript = 0
The above command may also be done when Vim is already running. Type in Normal mode before starting R:
:let vimrplugin_applescript = 0
from vim-r-plugin.
Perhaps for mac users rather than the uninformative error it should tell them that they need to set that flag to get R --vanilla to work?
It does not seem like there is any other way to make this feature work with the R.app
On 20/10/2013, at 12:42 AM, Jakson Alves de Aquino [email protected] wrote:
I think that it would be unexpected for users to see R starting in a terminal emulator when they are used to see R.app being started by the Vim-R-plugin. This surely would be reported as bug. So, Mac OS X users wanting to run R in a terminal emulator have to put in their vimrc:
let vimrplugin_applescript = 0
The above command may also be done when Vim is already running. Type in Normal mode before starting R::let vimrplugin_applescript = 0
—
Reply to this email directly or view it on GitHub.
from vim-r-plugin.
I have never used a Mac and unfortunately I don't have one to make testes. So, could you please write the message that you think should be displayed? Note: the message will be displayed whenever the user tries to pass arguments to R and not only when trying to run R vanilla. Thanks!
from vim-r-plugin.
I have just changed the vimrplugin_applescript
flag, and that gives the desired result.
Given that apple has taken out the xterm client, I think the message ought to be something like:
R.app does not support --vanilla. To use this option, you must run R in a console. Set "vimrplugin_applescript = 0" (you may need to install XQuartz)
from vim-r-plugin.
Thanks! I have done a small change in the message to make it more generic because the argument being passed to R may not be "--vanilla": 97ce4f1
from vim-r-plugin.
Awesome. Very informative.
On 20/10/2013, at 2:00 PM, Jakson Alves de Aquino [email protected] wrote:
Thanks! I have done a small change in the message to make it more generic because the argument being passed to R may not be "--vanilla": 97ce4f1
—
Reply to this email directly or view it on GitHub.
from vim-r-plugin.
Related Issues (20)
- \aa \ae and echo HOT 4
- Sporadic failures to send code chunks to R HOT 6
- vim-r & vim-markdown Rmd syntax highlighting no longer working HOT 13
- omnicompletion not working in .Rmd, .rnw HOT 11
- E364: Library call failed for "SendToRConsole()" HOT 7
- Rhelp is not working with vimpager HOT 4
- tmux settings have changed HOT 12
- \o not working for some cases. HOT 2
- Clear R console input before send R code from vim HOT 4
- ReplaceUnderS() not compatible with vim macros or repeat insert. HOT 4
- Sending command starting with a - (minus) sign HOT 3
- Ignoring Environment Variables on Windows HOT 9
- Running R code in Roxygen example sections does not work for visual selections HOT 12
- To remove extra spaces in vimrplugin_assign_map HOT 2
- tmux -V not available on OpenBSD HOT 2
- Issue with clipboard HOT 2
- [Regression] StartR fails with vim-r 1.2.9 HOT 2
- Vim-R-plugin was replaced by Nvim-R HOT 3
- Start 'tmux' before Vim. The X Window system is required to run R in an external terminal. HOT 1
- Can't see R documentation and plots HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-r-plugin.