emacs.rst
changeset 797 11928bb0b66d
parent 782 bfd7453296ca
child 798 c5cff695aec7
--- a/emacs.rst	Wed Feb 02 21:25:23 2011 +0200
+++ b/emacs.rst	Sun Feb 06 22:23:39 2011 +0200
@@ -57,30 +57,44 @@
 
 M-x debug-on-quit RET' and then just hit `C-g' next time it gets 'stuck' somewhere.
 
-*** Check if bug in ini file.
+** Check if bug in ini file not in Emacs itself.
 
 First run Emacs without loading anything:
 
   $ emacs --no-init-file --no-site-file
 
+or more shortly (as '-Q' imply '-q', '--no-site-file', and '--no-splash'
+together):
+
+  $ emacs -Q
+
 If bug not reproduced bug lies in ini files!
 
-*** Binary Search.
+** Debug by binary search.
 
 Select half of the file in a region, and M-x eval-region. Depending on whether
 that causes the error or not, split this half or the other half again, and
 repeat.
 
-*** Elisp.
+** Elisp debug tips.
 
  - Use a keyboard macro that moves forward one expression (sexp) and evaluates
    it.
  - Try C-x check-parens.
- - Set (setq debug-on-error t).
+
+** Enable debug mode (also on loading).
+
+Set in source
+
+  (setq debug-on-error t)
 
-*** CLI.
+or invoke Emacs like:
+
+  $ emacs --debug-init
 
-  $ emacs --no-init-file --no-site-file --debug-init
+'--debug-init' which binds 'debug-on-error' to 't' while loading the init
+file, and bypasses the `condition-case' which normally catches errors in the
+init file.
 
 *** Simplified Binary Search.