ESS/SAS key bindings.
Bo Peng
bpeng at stat.rice.edu
Fri Sep 27 05:17:22 CEST 2002
On Thu, Sep 26, 2002 at 08:43:07PM -0500, Rodney Sparapani wrote:
> >1. I can not use
> > (setq ess-sas-local-unix-keys t)_
> > in my .emacs file tp activate sas keys. Rather strangely,
> > (ess-sas-local-unix-keys)
> > works.
> Actually, that's the way I do it too. I think it's cleaner, but I'm
> not sure if the documentation is very clear. I call
> (ess-sas-global-keys) after requiring ess-site.
That is fine. I was surprised why (setq ess-sas-local-unix-keys t) does
not work.
> >2. If I use -local-key, I can use F3 to run the SAS program but I can
> > not go back from the shell window to SAS window with F4. So I use
> > -global-key but then all my general F3, F4,.. are gone even when I
> > am not in SAS mode. This also means that I can not use R and SAS
> > at the same time since I define F8 for R mode.
> >
> > If I have to tolerate global-key, how can I set up a hook that trigle
> > ess-sas-global-unix-keys only when I open a sas file?
> >
> > Or, can I use local-key and let shell, log, output windows know F4,
> >F5
> > etc?
> Hmmm. ESS[BUGS] F-keys manage to co-exist with ess-sas-global-keys. I
> think the following excerpt is somehow responsible. Maybe if you put
> something like this in .emacs before requiring ess-site:
> (if ess-bugs-mode-map nil
> (setq ess-bugs-mode-map (make-keymap))
> (define-key ess-bugs-mode-map (quote [f2]) 'ess-revert-wisely)
> (define-key ess-bugs-mode-map (quote [f12]) 'ess-bugs-next-action)
> )
I do not use BUGS so I do not think ess-revert-wisely will help. After
some testruns, I find that it is pretty tricky to mix batch and
interactive mode. F3, F4, etc only work for batch mode and C-c C-r etc
only work for interactive mode.
> So F3 would submit the code, but what would F4 do?
The idea ways (to me) to use ESS/SAS mode would be:
In batch mode:
1. open emacs
2. F3, run, F4 go back to program window etc.
Problem: with ess-sas-local-unix-keys, I can not
use F4 to go from sh or log window to the program window.
This only works for ess-sas-global-unix-keys.
In interactive mode:
1. open emacs
2. M-x SAS
3. Since ESS know that I am in interactive mode, I would like to use
F3 to submit the buffer, F4, F5, F6 switch between program, SAS.lst,
SAS.log window.
Problems:
a) No easy way to switch between windows. (F3, F4 will cause
confusion now.)
b) Log and lst window do not automatically go to the
beginning of the newest log/output.
c) Key bindings for ess-mode-map does not work for sas-mode.
I have to use sas-mode-local-map instead.
Mixture of batch and interactive mode: Very confusing.
In general, I would like to customize ESS/SAS with:
1. set ess-sas-global-unix-keys when I open a SAS file. I could
not find a sas-mode-hook to do this.
2. In batch mode, map F4, F5, F6 keys for shell, output and list window
so that I can switch between windows easily. (This is less intrusive
than ess-sas-global-unix-keys.)
3. In interactive mode, map F4, F5, F6 to switch between SAS.lst,
SAS.log and the program window.
Since I am new to ESS/SAS, my wishes might not be appropriate. Any
suggestion is welcome.
Bo
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
ess-help mailing list -- To (un)subscribe, send
subscribe or unsubscribe
(in the "body", not the subject !) To: ess-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the ESS-help
mailing list