[rkward-devel] UI wishlist

Prasenjit Kapat kapatp at gmail.com
Wed Apr 18 21:46:08 UTC 2007


HI,

On 4/18/07, Michel Lang <michellang at gmail.com> wrote:
> I've made some thoughts on the user interface. Here are my suggestions:

They are always welcome.. I will try to comment on only a few of your
suggestion, and let others handle the rest.

> - buttons: add close this file/tab button.

Taking mouse cursor to the left end of the file-tab should show an "X"
icon, clicking on which should close the file/tab, like Kile.

> - save size/proportions of R script file and R console. Save editor
> preferences (e.g. show line numbers)

Yes, this always bugged me. Everytime I start RKWard, and open the R
Console, a huge part of the workspace and script file area is taken
over by this console.

> - project/session handling (for dealing with multiple files all part of a
> single project) as already integrated into kate. Session handling may include
> saving the current working dir, workspace and folding

That would be really nice.

> - file system browser tab, as included in kate, to easy access generated files
> as PDFs from within rkward.

That would be nice, but viewing non-R (.R, .RData, etc) files would
need to spawn a different process (not a child process), like kpdf (or
xpdf or..) for PDFs, which will have to be outside RKWard. Does any
IDE do that? Kate (ok, kate is not an IDE) doesnot. If you try to open
a pdf file from kate's file browser tab, it will try open it as a text
file in the editor, rather than starting a completely different
process with kpdf (or xpdf or..). I do not remember if Kile does
that.. Will try it when I get home.

> - add option to automatically setwd() to location of script file, or to only
> setwd() to first opened script file (or drop this with session support)

Firstly, the current setwd() is just a plugin, which needs to be
modified into a C++ menu entry. Secondly, I personally think your
suggested way of automatically changing/setting the working directory
(WD) this is not the right way to go. If a user (including me) has
script files open from different directories, then everytime a file is
in focus, the WD changes. It seems like an unwanted overhead on the
running R process, even when all the open files are  from the same WD.

My suggestion was to save the working directory as a part of the "Save
Workspace" process. So that when next time you open an existing
workspace, you are already in the right directory.
Let us see what the current process is:
1. If you start RKWard from KMenu then it takes $HOME as the working directory..
    [ good enough]
2. If you start RKWard from konsole, it takes pwd as the working directory...
    [ good enough]
3. Now you open an existing workspace.. No change in WD. This is where
my suggestion might be helpful.
4. Instead of opening a workspace, you might open an existing script
file. No change in WD. This is where your second suggestion (to
setwd() to the first opened script file) might be helpful though :)
5. Suppose I open an existing workspace (and suppose this setwd()
automatically), and then I open an existing script file. Should
setwd() be called again?
6. The vice-versa situation of 5...

> - shortcut to switch between script file and R console window (or is there
> already one? if not, it is badly needed)

As of now, Alt+4 works to show/hide the R consolde window. So, if you
are in a script file, and R console is in hide mode then, pressing
Alt+4 (once) will pull up the R console and set the cursor focus to
it; if R console is already shown, then pressing Alt+4 (TWICE, hide
and then show) will do the job. Other option (as I sometimes do) is to
detach the R console window and use Alt+Tab.




More information about the Rkward-devel mailing list