What I think would be quite useful to have is a command to select a block of
text in the transcript buffer, and copy it to the clipboard in such a way
that would (i) remove the command prompts; and (2) comment out all output.
Also an option to select a region in the main ESS buffer, and copy it to the
clipboard with the above done automatically, would save quite a bit of
manual work, at least for me -- usually I want to have at least some of the
output as comments in the code.

--aj

On Sat, Aug 14, 2010 at 8:32 PM, Charles C. Berry <cberry@tajo.ucsd.edu>wrote:

> On Sat, 14 Aug 2010, Alex Bokov wrote:
>
>  I've been working with R for a couple of years, but I have taken the
>> plunge into emacs and ESS only recently. I was surprised by how much I was
>> able to figure out about using ESS by searching on my own, but the following
>> two questions are still stumping me and I hope someone here can help.
>>
>> 1.    If I quit an R session without quitting the buffer then later start
>> a new one in that buffer, it will append to the existing buffer contents
>> after delimiting them with a form-feed. This would be an improvement over
>> the native loadhistory() and savehistory() method, except that it only works
>> until I have to quit emacs. I cannot just save the transcript file with C-x
>> C-w and restore the buffer state from it later.  The .St file gets opened in
>> ess-transcript mode instead of in R-mode and even though I can still send
>> previous commands to an R process in a separate buffer, there doesn't seem
>> to be any way to append to the original .St file. If I save the new R buffer
>> to an .St file, it overwrites the original.
>>
>> How can I either append to an .St file or in some other way restore the
>> exact state of an R buffer after rebooting my laptop?
>>
>>
> I think that the general advice is to not bother to try this. Instead work
> from an ess-mode edit buffer (*.R) and send commands to the R process from
> there using the ess-eval-* commands. (If you do not know these, check the
> ESS menu or type 'C-h f ess-eval-<TAB> and a buffer listing them all will
> appear.
>
> Save the buffer when you quit. When you restart later
>
>        M-x find-file whatever.R then
>        C-c C-l
>
> will run ess-load-file and you can continue.
>
> Every so often, I forget this advice and enter commands at the R prompt. If
> I want to save this work, I can save it as *.Rt, then clean the transcript,
> and copy it into or save it as *.R. :-) If you insist on working from the
> transcript buffer, you can then kill the cleaned buffer without saving and
> redo find-file, and you are ready to go.
>
>
>
>
>  2.    Emacs in general and ESS in particular spams me like crazy with
>> various temporary buffers. What I would like to do is have one frame with a
>> small collection of buffers I selected that I can cycle through using
>> previous-buffer and next-buffer. All other buffers would be completely
>> banned from that frame no matter how important emacs thinks they are and
>> they would be instead be forced to use a separate frame.
>>
>> It would also be nice to automatically kill certain sessions as soon as
>> they stop being in the foreground, but for now I'll settle just for
>> segregating them all in one frame.
>>
>> Any suggestions on how to do that?
>>
>
> I'd start by looking at
>
>        http://www.emacswiki.org/emacs/CategoryBufferSwitching
>
> I know there are some devotees of 'icicles' on this list, and 'doremi' and
> some other links might warrant a look.
>
>
> HTH,
>
> Chuck
>
>
>
>>
>>
>> Thank you
>>
>> ______________________________________________
>> ESS-help@stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/ess-help
>>
>>
> Charles C. Berry                            (858) 534-2098
>                                            Dept of Family/Preventive
> Medicine
> E mailto:cberry@tajo.ucsd.edu               UC San Diego
> http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901
>
>
> ______________________________________________
> ESS-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

	[[alternative HTML version deleted]]

