I was thinking of writing a lisp function that does something like

(comment-dwim)
(ess-eval-region)
(comment-dwim)

or maybe something along the lines of eval-line-and-step, but which removes
leading comment symbols.

Kevin



On Fri, Jan 18, 2013 at 11:25 AM, Richard M. Heiberger <rmh@temple.edu>wrote:

> Does highlighting a region and then
> M-;
> do what you want?
>
>
> M-; runs the command comment-dwim, which is an interactive compiled
> Lisp function in `newcomment.el'.
>
>
> Rich
>
>
> On Fri, Jan 18, 2013 at 11:40 AM, Kevin Wright <kw.stat@gmail.com> wrote:
>
>> When I write scripts for analyzing data, I often comment out lines of
>> code.
>>  For example I might have something like:
>>
>> dat=read.csv()
>> plot(y~x, data) # check for outliers
>>
>> Once I've made the plot, I don't want to make it again, so I'll comment it
>> out.  And then my client sends me a revision of the data and I'll want to
>> check it again, so I uncomment the plot statement and then evaluate it,
>> and
>> then comment the line again.
>>
>> It occurred to me today that it would be handy to have a key-combination
>> similar to ess-eval-* that removes comment characters before sending the
>> code line/block/paragraph to the inferior ess process.
>>
>> Has anyone written code to this?
>>
>> Kevin Wright
>>
>>
>>
>>
>> --
>> Kevin Wright
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> ESS-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/ess-help
>>
>
>


-- 
Kevin Wright

	[[alternative HTML version deleted]]

