Giter VIP home page Giter VIP logo

Comments (11)

jalvesaq avatar jalvesaq commented on July 22, 2024

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.

ricardianambivalence avatar ricardianambivalence commented on July 22, 2024

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.

jalvesaq avatar jalvesaq commented on July 22, 2024

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.

ricardianambivalence avatar ricardianambivalence commented on July 22, 2024

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.

jalvesaq avatar jalvesaq commented on July 22, 2024

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.

jalvesaq avatar jalvesaq commented on July 22, 2024

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.

ricardianambivalence avatar ricardianambivalence commented on July 22, 2024

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.

jalvesaq avatar jalvesaq commented on July 22, 2024

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.

ricardianambivalence avatar ricardianambivalence commented on July 22, 2024

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.

jalvesaq avatar jalvesaq commented on July 22, 2024

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.

ricardianambivalence avatar ricardianambivalence commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.