Bug 339127 - r-backend tries to start $EDITOR on fix(), this is unusable for EDITOR=nano and vim
Summary: r-backend tries to start $EDITOR on fix(), this is unusable for EDITOR=nano a...
Status: RESOLVED FIXED
Alias: None
Product: cantor
Classification: Applications
Component: r-backend (other bugs)
Version First Reported In: 0.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Rieder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-16 19:22 UTC by hoea
Modified: 2018-06-03 08:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 18.04.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hoea 2014-09-16 19:22:36 UTC
#set EDITOR to vim or nano on your shell, or even unset EDITOR
# in your bash
export EDITOR=/usr/bin/vim
cantor

# create some object, try to fix it
Example:
a <- c(1,2,3,4,5.5)
fix(a)
--> the $EDITOR is started on the parent shell, $EDITOR is not usable 




Reproducible: Always


Actual Results:  
unusable editor



Expected Results:  
I would expect to get an graphical editor like kwrite or kate

this works:
EDITOR=/usr/bin/kwrite
cantor

but this is not possible if cantor is started via the startmenue
Comment 1 Nikita Sirgienko 2018-05-08 20:29:59 UTC
Git commit 3b4363d41cbeb993c6d5975d5cd5c93669fdcc66 by Nikita Sirgienko.
Committed on 08/05/2018 at 20:29.
Pushed by sirgienko into branch 'master'.

Add GUI editor for R backend

Summary:
Before, if we have called `fix` function and our `EDITOR` was console editor, we have had problems: editor starts as child process and we never can end it. This commit fix it, by building cantor script editor as executable file and setting the editor as editor for R.
FIXED-IN: 18.04.1

Test Plan:
1) Open terminal, set console editor as EDITOR (`export EDITOR=/bin/nano`, for example) and start cantor in this terminal session.
2) Start R backend, create array (`a <- c(1,2,3)`, for example)
3) Call `fix(a)` and check, that you have the problem
4) Apply the patch
5) Do 1)-2) again and check, that you start edit `a` in kate

Reviewers: #cantor, asemke

Reviewed By: #cantor, asemke

Subscribers: #cantor, #kde_edu

Tags: #kde_edu, #cantor

Differential Revision: https://phabricator.kde.org/D12721

M  +2    -1    src/CMakeLists.txt
M  +3    -0    src/backends/R/rserver/rserver.cpp
M  +1    -1    src/cantor_part.cpp
A  +10   -0    src/scripteditor/CMakeLists.txt
A  +44   -0    src/scripteditor/main.cpp     [License: GPL (v2+)]
R  +4    -0    src/scripteditor/scripteditorwidget.cpp [from: src/scripteditorwidget.cpp - 098% similarity]
R  +1    -0    src/scripteditor/scripteditorwidget.h [from: src/scripteditorwidget.h - 098% similarity]

https://commits.kde.org/cantor/3b4363d41cbeb993c6d5975d5cd5c93669fdcc66
Comment 2 Alexander Semke 2018-06-03 08:23:40 UTC
Git commit b2ba96b6425a2a9ed84ee48dd938bc35af0a0c41 by Alexander Semke, on behalf of Nikita Sirgienko.
Committed on 03/06/2018 at 08:23.
Pushed by asemke into branch 'Applications/18.04'.

Add GUI editor for R backend

Summary:
Before, if we have called `fix` function and our `EDITOR` was console editor, we have had problems: editor starts as child process and we never can end it. This commit fix it, by building cantor script editor as executable file and setting the editor as editor for R.
FIXED-IN: 18.04.1

Test Plan:
1) Open terminal, set console editor as EDITOR (`export EDITOR=/bin/nano`, for example) and start cantor in this terminal session.
2) Start R backend, create array (`a <- c(1,2,3)`, for example)
3) Call `fix(a)` and check, that you have the problem
4) Apply the patch
5) Do 1)-2) again and check, that you start edit `a` in kate

Reviewers: #cantor, asemke

Reviewed By: #cantor, asemke

Subscribers: #cantor, #kde_edu

Tags: #kde_edu, #cantor

Differential Revision: https://phabricator.kde.org/D12721

M  +2    -1    src/CMakeLists.txt
M  +3    -0    src/backends/R/rserver/rserver.cpp
M  +1    -1    src/cantor_part.cpp
A  +10   -0    src/scripteditor/CMakeLists.txt
A  +44   -0    src/scripteditor/main.cpp     [License: GPL (v2+)]
R  +4    -0    src/scripteditor/scripteditorwidget.cpp [from: src/scripteditorwidget.cpp - 098% similarity]
R  +1    -0    src/scripteditor/scripteditorwidget.h [from: src/scripteditorwidget.h - 098% similarity]

https://commits.kde.org/cantor/b2ba96b6425a2a9ed84ee48dd938bc35af0a0c41