I use aquamacs 90% of the time to edit R files with ESS (Emacs Speaks Statistics). In this mode, I find it indispensable to have a split window, C-x 3 C-x 2, such that I can view simultaneously the source code and the R buffer (terminal window). Thus, every time I launch aquamacs, I need to perform the following steps: split the window, select the right one, switch buffer to *R*, go back to the file. How can I save this setup across sessions?
thanks.
Try this:
(defun open-r-project ()
  (interactive)
  (delete-other-windows)
  (split-window-horizontally)
  (R)
  (ess-change-directory "~/projects/")
  (next-multiframe-window)
  (find-file "~/projects/")
  (previous-multiframe-window)
)
(global-set-key (kbd "C-c r") 'open-r-project)
Note, however, that this is my first LISP function. I have no idea how to make the project dir parameter working. Will try tomorrow. Oh, and note that I'm using SVN version of ESS.
There is C-c C-z (ess-switch-to-end-of-ESS) which does the splitting and switching to the end of ess inferior buffer. I am using it all the time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With