[rkward-tracker] [ rkward-Feature Requests-1672562 ] Send pre-defined block to R console

SourceForge.net noreply at sourceforge.net
Fri Mar 2 17:38:44 UTC 2007


Feature Requests item #1672562, was opened at 2007-03-02 16:55
Message generated for change (Comment added) made by ddediu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=459010&aid=1672562&group_id=50231

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: RKWard user interface
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: ddediu (ddediu)
Assigned to: Nobody/Anonymous (nobody)
Summary: Send pre-defined block to R console

Initial Comment:
Hi,

I don't know if this suggestion makes any sense, but, as mostly a C/C++ developer used to this type of IDEs, I would prefer to have the possibility to send to the R console a predefined block (not necessarily contiguous) from a larger script file. 
Let me be more specific: I usually prefer to have large script files, split in functions and I mostly work by creating/debuging/modifying one or a couple of functions at a time, which I test by calling them with some params. Now, every time I modify such a function, I have to send its body to the R console and then its call, so that I test it. However, this involves selecting stuff from the script file every time, which gets rather tedious, especially when the function body grows across more than one screen.
Therefore, I think would be useful to have a way of defining in the editor window a sort of markers attached to specific lines (so that they move meaningfully when editing text) and a special "Send block to the R console" button which automatically sends to R only the defined block. Of course, this block does not have to be continuous...
I hope this is a good suggestion and, again, thanks for this amazing work,

Dan

----------------------------------------------------------------------

>Comment By: ddediu (ddediu)
Date: 2007-03-02 17:38

Message:
Logged In: YES 
user_id=1731761
Originator: YES

Hi, Thomas

I was actually thinking about having a single, let's call it, "run block",
but which could span across non-contiguous lines. More specifically, let's
say you have the following script file with numbered lines and you allow in
the left-hand number & folding margin of the editor to add three new
symbols, let's say "<" to mark the begining of a "run block segment", ">"
to mark the end of such a thing and "<>" to makr a one-line one. Then, your
file could look like:
  1
  2
< 3
  4
> 5
  6
<>7
  8
< 9
  10
  11
> 12
  13
which means that there is a single "run block" composed of 3 "run block
segments": lines 3-5, line 7 and lines 9-12. When the "run block" button
would be pressed, no matter where the cursor is in the editor window, the
entire block (i.e., the 3 segments) are send in sequence to the R console
(i.e., 3-5,7,9-12). They could represent, let's say, the body of a function
(3-5), its call (7) and a more complex call embedded in something else
(9-12). Does it make sense?
Now, I've never thought about having more than one such "run block", but
might be interesting (I cannot, for the moment, see the utility, but that's
my own limitation :( ).
If we agree that this feature is worth, and we also agree on its specs, I
could try to implement it :)

Thanks again, Dan


----------------------------------------------------------------------

Comment By: Thomas Friedrichsmeier (tfry)
Date: 2007-03-02 17:19

Message:
Logged In: YES 
user_id=300591
Originator: NO

Hi Dan,

thanks for your request.

This looks like a reasonable feature addition, although I can't quite
imagine how the UI to go with this would work. This particularily hinges on
the part about being able to select non-contiguous regions. The problem is
being able to specify which region to run. For contiguous regions, this
could be as simple, as having a shortcut to run whichever region the cursor
is in. For non-contiguous regions, I don't yet see a good way to allow
several different regions in the same file (i.e. have regions A.1, A.2, A.3
and B.1, B.2, where you'd typically want to either run all of A, or all of
B, but never all blocks at once). Do you have something on this in mind?

Roland Vollgraf proposed a similar idea a while ago (only continuous
regions, though), and started working on it. However, I have not heard back
from him since more than a month, now.

Again, it's probably a useful feature to have (whatever the details), but
I won't have the time to work on this anytime soon. If - as a C/C++
developer - you would like to look into this yourself, I'd be happy to
accept a patch. Main files to look into are
rkward/windows/rkcommandeditorwindow[part].[cpp|h]. You may also be
interested in this thread:
https://sourceforge.net/mailarchive/forum.php?thread_id=31467355&forum_id=12970
, which discusses Roland's proposal, and even has an almost complete patch
(missing some refinements, as discussed in the thread). Maybe you could
build on top of that.

Regards
Thomas

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=459010&aid=1672562&group_id=50231




More information about the rkward-tracker mailing list