Description of problem: Running: 'rvim' produces error at startup if vim-syntastic is enabled. Version-Release number of selected component (if applicable): vim-common-8.1.2234-1.fc31.x86_64 vim-enhanced-8.1.2234-1.fc31.x86_64 vim-filesystem-8.1.2234-1.fc31.noarch vim-minimal-8.1.2234-1.fc31.x86_64 vim-syntastic-3.10.0-1.fc31.noarch vim-syntastic-sh-3.10.0-1.fc31.noarch How reproducible: Steps to Reproduce: 1. Install packages sudo dnf install -y vim-enhanced vim-filesystem vim-syntastic-sh vim-syntastic vim-common vim-minimal 2. Run rvim rvim Actual results: Vim prints following lines: syntastic: error: exception running system('uname'): Vim(let):E145: Shell commands and some functionality not allowed in rvim Error detected while processing function syntastic#util#system: line 19: E121: Undefined variable: g:_SYNTASTIC_DEBUG_CHECKERS E116: Invalid arguments for function syntastic#log#debug Press ENTER or type command to continue Expected results: Vim starts in restricted mode Additional info: I tried to disable all my local vim configs so this should be easily reproducible. I want to use 'rvim' as SYSTEMD_EDITOR to disable suspend C-z when editing systemd unit files. Problem is when you first remove 'nano' and then try to use systemd to edit unit file. sudo systemd edit foo.service And if you now press C-z you jump out of vim, but without any way to go back without killing vim process. Using rvim prevents this.
systemd-243-4.gitef67743.fc31.x86_64
Thanks for the report. Why do you think this is bug in vim-syntastic, and not rvim?
Ah, I see. rvim stands for restricted vim. Still vim-enhanced package.
Mostly because when I run rvim without vim-syntastic installed it works just fine.
From the manual vim(1): rvim rview rgvim rgview Like the above, but with restrictions. It will not be possible to start shell commands, or suspend Vim. Can also be done with the "-Z" argument.
I guess error comes from /usr/share/vim/vimfiles/plugin/syntastic.vim line 59. Maybe just change lines 55-68: 55 if s:_running_windows 56 let g:_SYNTASTIC_UNAME = 'Windows' 57 elseif executable('uname') 58 try 59 let g:_SYNTASTIC_UNAME = split(syntastic#util#system('uname'), "\n")[0] 60 catch /\m^Vim\%((\a\+)\)\=:E484/ 61 call syntastic#log#error("can't run external programs (misconfigured shell options?)") 62 finish 63 catch /\m^Vim\%((\a\+)\)\=:E684/ 64 let g:_SYNTASTIC_UNAME = 'Unknown' 65 endtry 66 else 67 let g:_SYNTASTIC_UNAME = 'Unknown' 68 endif to: let g:_SYNTASTIC_UNAME = 'Linux' As far as I can see all Fedora is 'Linux' and so are all other Red Hat variants. And so there is no need to run uname at startup at all.
I filled an upstream ticket, please continue the discussion there: https://github.com/vim-syntastic/syntastic/issues/2288 I'm afraid I won't have enough time to solve this. So if you find some reasonable solution, please open PR against: https://src.fedoraproject.org/rpms/vim-syntastic
(In reply to Markus Linnala from comment #6) > As far as I can see all Fedora is 'Linux' and so are all other Red Hat > variants. And so there is no need to run uname at startup at all. That sounds like reasonable downstream-patch. Can you please open a PR with patch (and test that it actually helps)?
I've ported upstream patch: https://github.com/vim-syntastic/syntastic/commit/39b35b23b952d620b8ec7cabb13110f586663837 And built package and now result is: sudo systemctl edit grafana-server.service syntastic: error: can't run in rvim Press ENTER or type command to continue According to comments here: https://github.com/vim-syntastic/syntastic/issues/2288 and current situation of syntastic being autoloaded I think this would be acceptable operations. I'm not going to change autoload situation. I'll shortly publish PR to: https://src.fedoraproject.org/rpms/vim-syntastic
https://src.fedoraproject.org/rpms/vim-syntastic/pull-request/2
FEDORA-2019-6705f27e76 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6705f27e76
FEDORA-2019-e0092ab76e has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-e0092ab76e
FEDORA-2019-f3abc065f3 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-f3abc065f3
vim-syntastic-3.10.0-3.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-f3abc065f3
vim-syntastic-3.10.0-3.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-e0092ab76e
vim-syntastic-3.10.0-3.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-6705f27e76
I updated in F31 and it does what I expect. $ rpm -q vim-syntastic vim-syntastic-3.10.0-3.fc31.noarch $ sudo systemctl edit grafana-server.service syntastic: error: can't run in rvim Press ENTER or type command to continue
vim-syntastic-3.10.0-3.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.
vim-syntastic-3.10.0-3.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.