Bug 380740 - FIXED IN SVN: Editor removes comments
Summary: FIXED IN SVN: Editor removes comments
Status: RESOLVED FIXED
Alias: None
Product: rkward
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: RKWard Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-30 10:57 UTC by RKWard Team
Modified: 2010-04-30 13:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 <- 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\)
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