emacs ignores certain commands in .emacs
I like emacs and prefer it to xemacs because of xemac's delete-key and backspace key behaviour which differs between the console and X environments. But I have a few problems which I do not understand. In my .emacs file I have inter alia the following: (setq text-mode-hook 'turn-on-auto-fill) (setq reftex-plug-into-AUCTeX t) (setq reftex-enable-partial-scans t) (setq reftex-save-parse-info t) (setq reftex-use-multiple-selection-buffers t) (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode (line-number-mode 1) (gnuserv-start) (add-hook 'python-mode-hook 'turn-on-font-lock) (setq font-lock-keywords python-font-lock-keywords) (font-lock-mode 1)) (setq abbrev-mode 1) (setq text-mode-hook 'iso-accents-mode) When I start xemacs, everything seems to work. With emacs however, I still have to start reftex-mode, auto-fill-mode, iso-accents-mode and font-lock-mode by hand (python's font locking seems to work on startup). Gnuserv is not working with emacs. Auctex also give some problems with emacs: When I type something auctex should change it to ``something''. It works like that when I work on a new document but as soon as I work on a document that has been saved before it changes to ''something}. That happens on both emacs 19.34 and emacs 20.3. I hope somebody can help me out on this one. -- J.H. Spies, Hugenotestraat 29, Posbus 80, Franschhoek, 7690, South Africa Tel/Faks 021-876-2337 Sel/Cell 082 898 1528(Johann) 082 255 2388(Hester) But as it is written, Eye hath not seen, nor ear heard, neither have entered into the heart of man, the things which God hath prepared for them that love him. I Corinthians 2:9
Re: emacs ignores certain commands in .emacs
I won't address all your problems... In my .emacs file I have inter alia the following: (setq text-mode-hook 'turn-on-auto-fill) You want (add-hook 'text-mode-hook 'turn-on-auto-fill) (setq reftex-plug-into-AUCTeX t) (setq reftex-enable-partial-scans t) (setq reftex-save-parse-info t) (setq reftex-use-multiple-selection-buffers t) (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode (line-number-mode 1) (gnuserv-start) (add-hook 'python-mode-hook 'turn-on-font-lock) (setq font-lock-keywords python-font-lock-keywords) (font-lock-mode 1)) ^ There's an unbalanced parenthesis here. Plus, this would only turn on font-lock on the initial buffer. In Emacs-20, you want this instead: (global-font-lock-mode t) (setq abbrev-mode 1) (setq text-mode-hook 'iso-accents-mode) You want (add-hook 'text-mode-hook 'iso-accents-mode) -- Peter Galbraith, research scientist [EMAIL PROTECTED] Maurice Lamontagne Institute, Department of Fisheries and Oceans Canada P.O. Box 1000, Mont-Joli Qc, G5H 3Z4 Canada. 418-775-0852 FAX: 775-0546 6623'rd GNU/Linux user at the Counter - http://counter.li.org/
Re: emacs ignores certain commands in .emacs
Johann == Johann Spies [EMAIL PROTECTED] writes: Johann I like emacs and prefer it to xemacs because of xemac's delete-key and Johann backspace key behaviour which differs between the console and X Johann environments. But I have a few problems which I do not understand. `M-x customize-apropos delete'. If you can't fix it that way, then try `f1 k', press the offending key, find out what it's called, and rebind it in the `term-setup-hook'. Also see my xhypermap.m4 and ext-fkeymap.el in URL:http://master.debian.org/~karlheg/XE-Lisp. 8-8 (add-hook 'text-mode-hook 'turn-on-auto-fill) (add-hook 'text-mode-hook 'iso-accents-mode) ;; For iso-8859-1 keyboarding (German, Spanish, French, etc.) (require 'x-compose) (define-key function-key-map [multi-key] compose-map) ;; Uncomment if you like the binding. éèñ¿¡æß ;; This is the same key you'd use on the console with the ;; x?hypermap.m4 keymap installed. ;; (define-key function-key-map [(control ?.)] compose-map) (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode (gnuserv-start) (add-hook 'python-mode-hook 'turn-on-font-lock) 8-8 Don't set the font lock keywords to the python ones. Font lock mode will do that for you when you visit a Python program. Use `add-hook' rather than `setq' to get a hook function into a hook list variable. If you do `M-x load-library reftex', then `M-x customize-group reftex', I think you'll find that it's a lot simpler than editting .emacs. Did you know about `M-x customize-apropos[Tab][Tab]' ? Many of the settings you want are on the menubar (eg: global font lock mode). Use the name of the item in the menubar as a hint as to what variable you need to set via the `M-x customize' interface. Johann When I start xemacs, everything seems to work. -- Those who do not study Lisp are doomed to reimplement it - Poorly. A few months in the laboratory often saves several hours at the library. mailto:[EMAIL PROTECTED] (Karl M. Hegbloom)