[ESS] options don't work
Terry Therneau
terry.therneau at gmail.com
Wed Apr 29 05:02:10 CEST 2009
I've asked for help on this before, tried everything I can think of,
and am tearing my hair.
After a new machine, upgrade to Ubuntu 8.10, my indentation options
for ESS are being ignored. This is when I open a file with name
whatever.R (I don't use emacs to run R, just to edit.)
Emacs starting message:
This is GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2008-09-05 on vernadsky, modified by Ubuntu
ESS version 5.3.11, installed with Synaptic Package Manager from the
Iowa State CRAN mirror
If I open a file, say "charlie.R", it shows the buffer to be in ESS[S]
mode. A query of the value of ess-indent-level via cntl-h v gives
ess-indent-level is a variable defined in `ess-cust.el'.
Its value is 2
Local in buffer charlie.R; global value is 4
Below is my entire .emacs file from my home directory, after stripping
out anything that I thought could possibly interact.
The options to map function keys (which I've used for years and years
and years) work just fine.
Someone please help. I've essentially lost the use of emacs on my
home machine, and have no clue whatsoever about why.
WHY does it ignore the global value that I set?
;; Set up the keyboard so the delete key on both the regular keyboard
;; and the keypad delete the character under the cursor and to the right
;; under X, instead of the default, backspace behavior.
(global-set-key [delete] 'delete-char)
(global-set-key [kp-delete] 'delete-char)
;; turn on font-lock mode
(global-font-lock-mode t)
;; enable visual feedback on selections
(setq-default transient-mark-mode t)
;; always end a file with a newline
(setq require-final-newline t)
;; stop at the end of the file, not just add lines
(setq next-line-add-newlines nil)
;(when window-system
;; use extended compound-text coding for X clipboard
; (set-selection-coding-system 'compound-text-with-extensions))
;; Do my preferred keypad bindings, like the old ge ones
(if (eq window-system 'x)
(progn
(setq show-paren-mode t)
;; define functions of keypad
(global-set-key [f2] 'find-file)
(global-set-key [f3] 'find-alternate-file)
(global-set-key [f4] 'save-buffer)
(global-set-key [f5] 'kill-buffer)
(global-set-key [kp-0] 'copy-region-as-kill) ; 0
(global-set-key [kp-1] 'isearch-forward) ; 1
(global-set-key [kp-2] 'forward-word) ; 2
(global-set-key [kp-3] 'isearch-backward) ; 3
(global-set-key [kp-4] 'beginning-of-line) ; 4
(global-set-key [kp-5] 'spell-word) ; 5
(global-set-key [kp-6] 'end-of-line) ; 6
(global-set-key [kp-7] 'overwrite-mode) ; 7
(global-set-key [kp-8] 'undo) ; 8
(global-set-key [kp-9] 'delete-char) ; 9
(global-set-key [kp-subtract] 'kill-line) ; -
(global-set-key [kp-separator] 'kill-word) ; ,
(global-set-key [kp-decimal] 'set-mark-command) ; .
(global-set-key [kp-enter] 'execute-extended-command) ; Enter
))
;;; ESS variables
(setq ess-tab-always-indent nil)
(setq ess-auto-newline nil)
(setq ess-indent-level 4)
(setq ess-brace-offset 4)
(setq ess-close-brace-offset 4)
(setq ess-continued-statement-offset 4)
(setq ess-arg-function-offset nil)
(setq ess-expression-offset nil)
(setq ess-else-offset 0)
(setq ess-return-indent nil)
(setq ess-fancy-comments nil)
(define-key ess-mode-map [return] 'newline) ; turn off "electric" newline
(define-key ess-mode-map "_" 'self-insert-command)
Terry Therneau
More information about the ESS-help
mailing list