The following list of TODO-items is NOT complete!
Also, plans change frequently. If something is listed for a specific release, that's no more than a rough plan.
All in all, this TODO list is mostly for internal purposes, and many parts may not necessarily be intellegible to anybody but the authors.

KF5 port:
Things to do:
- Grep for "KF5 TODO"
Things to test at the end:
- Everthing concerning loading / saving, from recent files, scripts, workspace, etc.
  - Moved installations, moved workspaces.
Knwon issues to fix:
- ???

Minor layout stuff to fix in plugins:
- Barplot: "Display values" should be checkable frame
- Sort data: optionset should simply use vertical stacking, or fix the horizontal alignment

Upcoming porting efforts: Port from QtScript to QJSEngine:
- Unforunately, QJSEngine lacks support for pre-compiled JS (QScriptProgram), ATM (Qt 5.5). We'll need some other optimization.
- Idea: Use _one_ engine for each plugin, _including_ any embedded plugins. Wrap existing JS code into a closure, exporting only the "primary" functions as properties of an object.
  - Then, the scriptbackend will call plugin_a.preprocess(), etc.
  - The scriptbackend knows which of the plugins it is currently dealing with, and thus can trivially relay all getValue()-calls as appropriate.
- Same approach for UI scripting.

Port from QtWebKit to QtWebEngine
- Should be mostly unproblematic
  - Gah, QWebEngine does not compile with MinGW! Need some entirely custom solution, instead? https://github.com/GreatTux/CefMinGWQt
- Somewhat unfortunate that QWebElement will be gone. We might be using this to amend the context menu, e.g. for copying one section to clipboard / deleting one section, etc.
  - Could perhaps be done by catching contextmenu event in JS, instead, then send to frontend, somehow.

New features in R 3.1.0 to make use of / support:

- A new browser command s has been added, to “step into” function calls.
- A new browser command f has been added, to “finish” the current loop or function.

Simple stuff to do soon:
	- RKConsole: Show a notice (with "don't show again"-box, of course) when first using Ctrl+C shortcut

i18n-Thoughts:
  + Notes:
    - Is it a problem to sync KDE_LANG and LANGUAGE? Should that also be set for the backend?
    - Lifetime of RKMessageCatalogs? Should probably be destructable, at least when reloading pluginmaps. Should be possible to implement in a sane ways 
      using QSharedPointer magic.
    - Don't forget to write documentation
      - Also general documentation for JS-functions is missing!
    - What should be the policy regarding installing translations (80% criterion)
    - i18n'ed plugins vs. automated tests
      - Sure, we can run automated tests under C locale. But it would be nice to have an additional check that translations don't cause
        any obvious problems.
        - At least we could check for errors
        - Perhaps a special diff of the generated R commands, where all quoted strings and comments are stripped?

MacOS:
  - Avoiding mis-placment of certain menu-entries: QAction::menuRole()

Bugs outside RKWard:
	- KDE 4
		- why is the icon style only honored for mainToolBar (in KXMLGUIBuilder)? It looks like this is done on purpose, but why???
			- http://lists.kde.org/?l=kde-core-devel&m=103307809508725&w=2

Bugs:
	- XMLGUI:
		- The edit menu is broken in the main window, but not detached windows (for script editor, console)
			- Ok in KDE 4.3.4 / Linux
			- Broken in KDE 4.4.1 / Windows
			- Apparently it is the *switching* of parts that is the problem. For the very first part, the GUI is ok, after that all DefineGroups seem to be forgotten
	- There is definitely a memory leak in handling output!
		- Produce lots and lots of output -> watch mem usage grow
		- Probably the RKConsole is to blame (run outside console -> no significant increase)
			- Maybe the kate-part needs to be reset (syntax parse tree) every once in a while?
	- RKEditorDataFrame:
		- sometimes the current cell indicator (the box around the current cell) gets lost.
			- Navigation and editing is still fine
			- seems to happen more often with larger data frames
			- more precisely: seems to happen after scrolling
			- no idea, why this happens
		- The editor is prone to race conditions of the type:
			- 1. user edits something in the editor
			- 2. before the edit has been synced to the backend, a different command touches the data
			- The editor should keep track of which / how many synchronisation commands are still outstanding.
			- If an edited object was touched while sync commands are still outstanding, complain and let the user handle the situation
	- options ("pager") is currently broken in RKWard. May not be a problem, but we offer a GUI to configure it in Settings->Configure RKWard...

Compilation / technical
	- Incorporate FreeBSD patches http://www.freshports.org/math/rkward/files.php?message_id=200609172111.k8HLBiob081349@repoman.freebsd.org
	- eventually the whole RData-structure should be made to use QList-types

R backend:
	- tcl/tk can evaluate all sorts of R stuff, even if there is no "command". It would help, if we simply defined a "default" command to be active at such times.

UI-stuff
	- find/create a set of menu icons (https://sourceforge.net/mailarchive/message.php?msg_id=37891606)
	- "First-run wizard"
		- pre-install R packages
		- notify if r-base-html package is not installed
	- Snippets library
		- pre-defined snippets to base scripts on
		- custom snippets
		- can be categorized by keywords / search
	- RKEditorDataFrame
		- undo/redo
		- deletion of multiple columns in one step
		- when pasting a large array, rows should not be added one by one. Suggested algorithm:
			- if we find out we've already pasted 100 rows, first check, how many more are to come and add this many both to the variable and to the R workspace. Can potentially avoid *lots* of work
	- Twintable/RKEditorDataFrame
		- merge the two classes
		- more efficient syncing: fetch only the values actually needed instead of the whole table. How?
		- make configurable:
			- invalid color (global and per variable)
			- unused color (global and per variable)
			- default alignment (per var type)
			- default precision
			- display of factor level labels (global and per variable)
				- might default to "only for factors"
			- delay of factor-level popup
		- highlighting of value ranges
	- Create an editor for single vectors/factors, or rework RKEditorDataFrame to handle those as well
	- Package management dialog
		- auto-updating functionality (every x days, every new session, never; see https://sourceforge.net/mailarchive/message.php?msg_id=37960665)
		- What about the checkBuilt-option to old.packages()
	- RObjectListView
		- double click action should be configurable: View, Edit, insert name into current script, insert name into console, nothing
	- RKConsole:
		- is tab completion for file names still crashy?
			- currently, problem seems to be inside KUrlCompletion
		- Fix pasting at other positions than line end
		- Prevent cursor from venturing into lines other than the last line
		- Allow multi-line command editing?
	- Script editor:
		- code completion
			- probably we can trim down the completion widget by providing custom headerData()? (Low priority)
		- placement of menu options?
		- new action "Source file"
		- deal better with overlapping blocks in the script editor (brush merging?)
	- RKConsole / Script editor:
		- highlight only valid function names
	- RKVarslot:
		- when adding vars to a multi varslot, these should become selected (so you can removed them again with a single click)
	- RKVarselector:
		- pop-up-able selectors (maybe more generic, not only for varselectors): Like a "Browse" button
	- RKCommandLog:
		- optionally keep a file log!
	- find out how to save toolbar states properly in parts-GUI
		- also setting the toolbar state for all windows with that toolbar
	- from Ralf:
		- show first few values of vectors/scalars in tool-tip in workspace browser
	- Graphics Device List window
		- (see http://sourceforge.net/mailarchive/message.php?msg_id=37825223)
		- par (no.readonly=TRUE) and par () to fetch available parameters and determine read-only state
		- device list would only be fetched when opening the window, not kept up to date?
		- access to graphics device plugins
	- Help system
		- find a good way to open R help pages in the same window
	- Working directory
		- show current wd in <browser>, somewhere
	- Settings UI:
		- see https://mail.kde.org/pipermail/rkward-devel/2007-March/001139.html
		- R-Backend-Settings:
			- the options should gain a "use default" checkbox to cope with changing R option defaults
			- tooltips for the options on "R-Backend" tab about the internal R-function call
	- project/session handling: files, workspace, current working directory.
	- file system browser tab
		- a way to inline pdf/ps/jpg/png files like in KDevelop?
	- Quitting:
		- instead of closing windows one by one, and asking to save changes if necessary, first list all windows that might need to be saved, let the user chose to save them, then close all windows without further questions.
	- Vignettes:
		- any means of fetching a description of the package before installing?
		- Add a vignettes browser to the help menu
		- Add context menu with vignettes to package environments in object browser
			- likely, package environments should try to fetch vignettes, when "updating"

Internal stuff:
	- RCommand deletion
		- dealing synchronously with commands (e.g. via a modal RKProgressControl) would be so much easier, if the commands would not be deleted quite as soon!
	- rklocalesupport:
		- does locale switching / detection work? Does Qt have something, yet?
	- Handling fonts:
		- http://sourceforge.net/mailarchive/forum.php?thread_id=31631211&forum_id=12970
	RKVariable:
		- True Support for Logicals
		- In the current design, RKVariable would not handle storage mode changes from outside well at all
	RCommandReceiver:
		- add virtual rCommandStarted () function, so receivers can find out, when their command becomes active
	REmbedInternal:
		- probably we do not need na_double at all (just any NaN) => less confusion
	Detecting object modifications inside R:
		- left TODO:
			- detection hole:
				x is 1
				user does
				rm (x); x <- function () {}
				(object list remains the same, watch was not active, but symbol changed)
				- will need to put an extra notification inside .rk.watch.globalenv ()? Will that get run?
	- RExpressionObject as an abstraction for R-Expressions (i.e. manually edited expressions).
		- It will be possible to "store" these in the RObjectList and select them just like any other object
		- RKVarslot will allow editing the selected value by hand (or just typing the name in)
			- How to do this nicely UI wise?
	- RThread:
		- Detection of commands that run for a suspiciously long time
			- Show "do you want to cancel ..." option after configurable amount of time
	- Object editing / modification tracking:
		- functions to set double/int/string-vectors directly. Use in paste-operations
	- error-handling/raising in .rk.do.call
	- I've changed the simple RInterface::issueCommand (QString, ...) command to return a pointer to the RCommand created. This will allow for lots of small cleanups. Do them.
		- well, on second thought, it might be better to rely more on RCommand::id () instead of pointers. Why? The id is unique (until integer overflow). The pointer may be reused after a delete -> potential problem when trying to cancel command which is actually already deleted (and potentially other cases)
		- let's set this back for a while
	- .rk.get.available.packages ()
		- use external (file) storage for cache to save mem
	- Always save workplace layout to a file, never to config. Even for the "global" option.
	- all RKComponents:
		- in the documentation we call the return value of value() the "default property". Why not simply define a "default property" for each component, instead of reimplementing value()?

General code:
	- get rid of all the superflous dependencies: http://lists.debian.org/debian-devel/2005/12/msg00439.html
	- remove classes/files:
		- RKGlobals
			- static members should be moved to the respective classes. Much cleaner!
	- remove all the passing around of KGlobal::config() as a parameter
	- grep sources for "KDE4"

R plugins:
	- distribution plugins (probabilities and quantiles)
		- probably all these could use an option "Store result (to name) / Print result / print and store"
	- plugin help files:
		- It would be nice to add the <id="..."> fetaure like <settings id=".."> in the technical section too. Also may be add something like <tag=".."> for the tags or variable which can be in italics, grey color.
		- Find a way to make help searchable, preferentially within the R help search window
	- import plugins:
		- standardized? checkbox to open imported object for editing
			- would be nice, if this box could be affected (default) by a global setting
	- Generalized preview:
		- E.g. for data import plugins
	- Ability to pre-select some default values with a single option
	- Spinbox:
		- find a solution for "pending changes". Currently, if the user enters a value, manually, then presses submit, the old value will be used (the new value is only set, when the focus changes to another widget). Probably the RKSpinbox should emit signals for "pending" and "ready". The plugin spinbox should listen to those and not be satisfied as long as a change is pending. Maybe mark the spinbox in yellow, while a change is pending.
		- options min_inclusive / max_inclusive for real number spinboxes (defaulting to true)
	- use SVG device for graphics output
	- X11->Export:
		- provide SVG export option
	- provide context menu / other UI to export to different formats / edit
	- plugins (general)
		- ODS filter (try to find someone to implement one in R)
	- formula-widget:
		- use smart sorting, esp. of generated string
		- add labels, add "up to level" option
		- add constant term option

API documentation:
	- add page containing a rough overview of general architecture
	- RCommandStack

Configuration:
	- additional console/log options:
		- color highlighting for warnings/errors
	- additional R engine options:
		- stack size (commandline arg --map-ppsize)
		- disable html help
	- new dataeditor options:
		- see comments on RKEditorDataFrame
