[ESS] ess 5.3.6; Suggest that some ESS[S] mode bindings also work in ESS Help mode

Martin Maechler maechler at stat.math.ethz.ch
Mon Jan 14 11:57:50 CET 2008


>>>>> "TH" == Tim Hesterberg <timh at insightful.com>
>>>>>     on Wed, 09 Jan 2008 14:26:14 -0800 writes:

[to ESS-bugs; we agreed on replying here at more visible "ESS-help"]

    TH> When I'm looking at examples in a help file and want to try the
    TH> examples, it would be nice if
    TH> C-c C-n		ess-eval-line-and-step
    TH> had the same behavior as when editing a source file.

    TH> Some other bindings would also be useful.  So it would be nice
    TH> if some of the bindings from ESS[S] mode would also be set in ESS Help mode.

    TH> Most useful:
    TH> C-c C-n		ess-eval-line-and-step
    TH> C-c C-j		ess-eval-line
    TH> C-c C-v		ess-display-help-on-object

    TH> Possibly useful:
    TH> C-c C-c		ess-eval-function-or-paragraph-and-step
    TH> C-c C-f		ess-eval-function
    TH> C-c C-p		ess-eval-paragraph-and-step
    TH> C-c C-r		ess-eval-region
    TH> C-M-a		ess-beginning-of-function
    TH> C-M-e		ess-end-of-function

    TH> various other ess-eval-* functions


Ess-help mode  {this is what emacs is in, in the buffer "help[R](lm)"
	        after 'C-c C-v lm' or (in R only) "?lm"}

has short cuts for (almost all of) these already,
but not the "long C-c <other-key>" ones, but rather short
one-letter ones.
This is the Emacs "philosophy", that a buffer where you don't *write*
should have simple one-key short cuts; 
e.g.,  see
'Info' mode (C-h i); other help modes,
'Dired' (Emacs directory editor) or mail reading, web browsing,
	.... emacs modes.

So instead of "C-c C-n" you use "l" (for "L[ine]") etc:
Type 'C-h b' ("b": [B]indings) in an emacs mode to see *all* available key
bindings. If you do it in ess-help mode,
you see that most commands you mention have very simple
one-letter keys, and quite a few are already additionally bound
to the "ess-mode" equivalent long keys
(I've slightly rearranged the lines here):

key             binding
---             -------

C-c		Prefix Command
ESC		Prefix Command

<remap>		Prefix Command

RET		next-line
SPC		scroll-up
DEL		scroll-down
/		isearch-forward
<		beginning-of-buffer
>		end-of-buffer
?		ess-describe-help-mode
b		scroll-down
f		ess-eval-function-or-paragraph-and-step
h		ess-display-help-on-object
k		kill-buffer
l		ess-eval-line-and-step
n		ess-skip-to-next-section
p		ess-skip-to-previous-section
q		ess-switch-to-end-of-ESS
r		ess-eval-region-and-go
s		Prefix Command
x		ess-kill-buffer-and-go

C-c C-f		ess-eval-function
C-c C-j		ess-eval-line
C-c C-k		ess-request-a-process
C-c C-l		ess-load-file
C-c C-r		ess-eval-region
C-c C-s		ess-switch-process
C-c C-v		ess-display-help-on-object
C-c C-y		ess-switch-to-ESS
C-c C-z		ess-switch-to-end-of-ESS
C-c ESC		Prefix Command

C-M-a		ess-beginning-of-function
C-M-e		ess-end-of-function
C-M-x		ess-eval-function

C-c M-f		ess-eval-function-and-go
C-c M-j		ess-eval-line-and-go
C-c M-r		ess-eval-region-and-go

s <		beginning-of-buffer
s >		end-of-buffer
s ?		ess-describe-sec-map
s D		ess-skip-to-help-section
s a		ess-skip-to-help-section
s d .. s e	ess-skip-to-help-section
s n		ess-skip-to-help-section
s r .. s s	ess-skip-to-help-section
s u .. s v	ess-skip-to-help-section

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

So, some of the wishes you were expressing above have already
been there (C-c C-j, or C-c C-f).

In general, I very much believe users should learn a bit about
the one-letter short cuts (which are also shown on the ESS-help
menu, aren't they on Windows?), e.g.,
  "h" : *-help-on-*
  "l" : eval-line-*
I think users should really learn to use them,
but as you can see C-c C-v or C-c C-j actually already *do*
work as alternatives.

Hmm, I get the feeling that maybe I've misunderstood parts of
what you were saying/asking .. ?

Regards,
Martin Maechler, ETH Zurich




More information about the ESS-help mailing list