Bug 380740

Summary: FIXED IN SVN: Editor removes comments
Product: [Applications] rkward Reporter: RKWard Team <rkward-devel>
Component: generalAssignee: RKWard Team <rkward-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: All   
Latest Commit: Version Fixed In:

Description RKWard Team 2009-11-30 10:57:36 UTC
-- 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 --
Comment 1 Thomas Friedrichsmeier 2009-11-30 17:30:23 UTC
Hello,

I assume you mean this scenario:

my.fun &lt;- 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" &lt;- 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 &lt;- dget \(nfile\)
		environment \(x\) &lt;- env
		return \(x\)
	\}
	invisible \(.Call \("rk.edit.files", file, title, name\)\)
\}
options \(editor=rk.edit.files\)
Comment 2 Thomas Friedrichsmeier 2009-11-30 17:30:24 UTC
- **summary**: Editor removes comments --> FIXED IN SVN: Editor removes comments
- **status**: open --> open-fixed
Comment 3 RKWard Team 2009-12-01 08:44:48 UTC
-- Originally posted by (AT sourceforge.net): markpadge --
Yep, that was exactly what i meant, and that workaround fixed it perfectly. Hugely appreciative\! Thanks\!
Comment 4 Thomas Friedrichsmeier 2010-04-30 13:23:30 UTC
A fixed release \(0.5.3\) was created, today. The workaround should be no longer needed after updating. Thanks again for reporting.
Comment 5 Thomas Friedrichsmeier 2010-04-30 13:23:31 UTC
- **status**: open-fixed --> closed-fixed