[ESS] Emac s No0b seekz dreem functi0n (C-c C-c)

Martin Maechler maechler at stat.math.ethz.ch
Thu Oct 5 15:26:49 CEST 2006

>>>>> "Dan" == Dan Bolser <dmb at mrc-dunn.cam.ac.uk>
>>>>>     on Thu, 05 Oct 2006 14:56:32 +0200 writes:

    Dan> Richard M. Heiberger wrote:
    >> I think you are looking for
    >> comint-scroll-show-maximum-output
    >> and related functions
    >> comint-scroll-show-maximum-output's value is t
    >> *Controls how to scroll due to interpreter output.
    >> This variable applies when point is at the end of the buffer
    >> (either because it was originally there, or because
    >> `comint-move-point-for-output' said to move it there)
    >> and output from the subprocess is inserted.
    >> Non-nil means scroll so that the window is full of text
    >> and point is on the last line.  A value of nil
    >> means don't do anything special--scroll normally.
    >> See also the variable `comint-move-point-for-output' and the function
    >> `comint-postoutput-scroll-to-bottom'.
    >> This variable is buffer-local in all Comint buffers.
    >> You can customize this variable.
    >> Defined in `comint'.

Yes, and thanks to Rich.

Note that this variable --- as its name "comint-*"  suggests ---
does not ``belong'' to ESS but rather to the "comint"
functionality on which we build.

Otherwise we would definitely have used a different default
rather than the current 'nil'.

    >> I recommend that you do not redefine standard functions and keys.

and I very strongly second Rich's recommendation!

    >> Much better would be to define new names and key mappings and base
    >> your new functions on the definition of the standard functions.
    >> Redefinitions will trip you up in a year or so and make it very
    >> hard for anyone else to help you.

    Dan> Thanks very much for the info - I will check it out. It looks very 
    Dan> useful for me.

    Dan> Regarding customisation - I am not too bothered to change the C-c C-c 
    Dan> behavior, as, I believe, it was implemented following a suggestion I 
    Dan> made to this list. Not that that really makes a difference, but it feels 
    Dan> like it does. Anyway - if customization makes me 10% faster 95% of the 
    Dan> time I will do it. The remaining 5% when I have to use somebody else's 
    Dan> environment or vice verse will be 50% slower, but overall we have a net 
    Dan> saving. So everybody customize!!!

Indeed, "customize !!!"
but do not "redefine" !

In emacs, customization is via variables a user can set, both
via the customization GUI and / or in his/her emacs
initialization profile.

So instead of redefining the function, please Dan,
try to make it more versatile by depending on some new
customization variables and then
post a patch (or just the new code) to ESS-help (or ESS-core).
That way, everyone will be able to enjoy the new functionality
(and has still a choice).

    Dan> Actually it would be ideal if each ess-eval-* function had a range of 
    Dan> 'what to do with the output buffer (comint buffer?)' options, allowing 
    Dan> me to simply configure ess-eval-function-or-paragraph to behave the way 
    Dan> I want it to. Sadly that level of emacs is way beyond my skills, so I 
    Dan> won't even attempt it (yet).

"yet" sounds good :-)

    Dan> Thanks again for the help,

    Dan> Dan.

More information about the ESS-help mailing list