I made a switch to Mac and had to ditch my favorite R Editor (Notepad++). Now I am trying to learn Emacs. The learning curve is steep, but this seems like the editor for R once I learn to use it. I am using OS X 10.8.3 and Aquamacs 2.4
I am trying to set custom key bindings following excellent tips from these SO questions: 1,2,3.
If I copy this command to preferences.el file, Aquamacs opens without complaining and the command works:
(global-set-key [C-tab] 'other-window)
However, if I try to set one of the following options:
(define-key ess-mode-map (kbd "C .") 'ess-eval-paragraph)
(define-key ess-mode-map [C-.] 'ess-eval-paragraph)
(define-key ess-mode-map "\C-." 'ess-eval-paragraph)
Aquamacs opens and complains, but the command works:
An error has occurred while loading `~/Library/Preferences/Aquamacs Emacs/Preferences.el (or .elc)':
Symbol's value as variable is void: ess-mode-map
To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the `--debug-init' option to view a complete error backtrace.
I want to use Ctrl + . to run paragraphs of R code/buffer to R. Obviously I am doing something wrong. As I am a complete newbie to Mac and Emacs, this feels overwhelming. What is going on and how can fix this issue?