arcsin(x)

turn off color

Do not use colors even if the terminal is capable (still allows the buffer mode to do syntax highlighting with bold text, etc):
emacs --color=no
Disable (all) major-mode syntax highlighting:
(global-font-lock-mode -1)
People suggest using the following in a loop over all font faces:
(set-face-attribute face nil :foreground nil :background nil)
M-x customize-face can be used over a particular keyword in a buffer to change syntax highlighting properties

M-x customize-themes to choose a color theme (includes dark themes). Consider fxn/monochrome-theme.el

eval a lisp expression in the current buffer and print the value in the minibuffer

M-:
for example
M-: major-mode
to show the current major mode

force a mode on a file, put at end of text

  // Local Variables:
  // mode: c++
  // End:

goto an offset in the file

  M-x goto-char 
  
Short cut:
  M-g c
  

register commands

point-to-register: C-x r SPC  
register-to-point: C-x j <register id>
copy-to-register:  C-x r x
insert-register:   C-x r g
view-register: -


.emacs file

; this is for shells that set either delete or backspace
; as ctrl h use M-x help to get to help instead
(global-set-key "\C-h" 'backward-delete-char)
; set the tab width slightly smaller
(setq default-tab-width 4)
;; do not display a splash screen on startup for emacs 22
(setq inhibit-splash-screen t)

;; turn off menu bar in terminal
(if (not window-system)
(menu-bar-mode -1))

;; don't use tabs to indent, may or may not want this
;; to insert a tab C-q 
(setq-default indent-tabs-mode nil)


- to make the elisp debugger window go away hit 'q' in the buffer

tramp: allows you to edit files remotely through ssh as well as other methods. you can just open a file using the normal scp path syntax.

emacs keybindings

under gnome 3

gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"

under xfce

xfconf-query -c xsettings -p /Gtk/KeyThemeName -s Emacs

may need to add --create --type string to above