-- Originally posted by (AT sourceforge.net): markpadge -- -- This ticket was imported from http://sourceforge.net/p/rkward/bugs/62 on 2017-05-30 15:26:48 +0100 -- When editing functions or scripts saved within a workspace, the editor strips all white spaces and comments \(\#\). I'm pretty sure it's not a kate configuration problem, as it only occurs within RKWard. Losing all comments is a rather enormous problem, and any help in retrieving them would be appreciated\! Running RKWard 0.5.1 on KDE 4.3.2 with R 2.9.2 on an x86\_64.-- Labels: user interface --
Hello, I assume you mean this scenario: my.fun <- function \(\) \{ \# comment print \("hi"\) \} fix \(my.fun\) We were wrong on that, indeed. Thanks for pointing this out. This is now fixed in the SVN version of rkward \(http://p.sf.net/rkward/svn\). Until a fixed version is released, you may want to use this workaround: Source the following lines at the start of each session: "rk.edit.files" <- function \(file = file, title = file, name = NULL\) \{ if \(\!is.character \(file\)\) \{ nfile = tempfile\(\) env = environment \(file\) dput \(file, file=nfile, control=c \("useSource", "keepNA", "keepInteger", "showAttributes"\)\) .Call\("rk.edit.files", nfile, title, name\) x <- dget \(nfile\) environment \(x\) <- env return \(x\) \} invisible \(.Call \("rk.edit.files", file, title, name\)\) \} options \(editor=rk.edit.files\)
- **summary**: Editor removes comments --> FIXED IN SVN: Editor removes comments - **status**: open --> open-fixed
-- Originally posted by (AT sourceforge.net): markpadge -- Yep, that was exactly what i meant, and that workaround fixed it perfectly. Hugely appreciative\! Thanks\!
A fixed release \(0.5.3\) was created, today. The workaround should be no longer needed after updating. Thanks again for reporting.
- **status**: open-fixed --> closed-fixed