[ESS] R help window behavior (possible to focus on invocation/hide on quit?)

Leo Alekseyev dnquark at gmail.com
Tue Mar 16 20:29:07 CET 2010


For the record, I shall answer my own question: whether or not the
buffer window is automatically focused is determined by the value of
the (customizable) variable temp-buffer-show-function; if set to
'pop-to-buffer (either globally or via a defadvice for ess help
invocation function) the help buffer will take focus.

On Thu, Mar 11, 2010 at 7:00 AM, Leo Alekseyev <dnquark at gmail.com> wrote:
> Hi all,
> I was wondering if there's a way to customize the focusing / exiting
> behavior of the R help buffers.  First, I would like the help buffer
> to take focus when it first appears -- just like emacs help buffers
> do.
>
> Secondly, I would like the buffer to return me back to the previous
> state of windows when exiting help (e.g. by pressing 'q') instead of
> simply switching focus to the ESS buffer, in the same way as pressing
> 'q' in emacs help (after doing e.g. C-h <key>) hides that buffer and
> restores previous windows (by running view-quit).  I tried binding 'q'
> to winner-undo in ess-help-mode-map, but that doesn't work for the
> following reason: I use (setq view-read-only t) in my .emacs, so
> view mode activates in the help buffer.  When run together with ess-help
> mode, (view-quit) merely turns off the view mode, without affecting
> any windows.
>
> Basically, I wish ESS's help windows behaved more like the rest of
> emacs help windows.  I'd appreciate any hints on how to do this!
>
> Thanks,
> --Leo
>



More information about the ESS-help mailing list