[OS X TeX] page-up/down

Chris Swoyer fswoyer at cox.net
Mon Sep 12 14:53:26 EDT 2005


I sent this mistakenly as a reply to an earlier post	

Dumb question: With OS 10.3 and enhanced carbon emacs 21- something
I had the following lines in my .emacs file

   (global-set-key "\C-c\C-v" 'pager-page-down);;
   (global-set-key "\C-x\C-o" 'pager-page-up) ;;

which let me page up and page down (for reasons I can't remember
\C-v and \M-v didn't work -- maybe that's what (I should be asking  
about).
  But now with OS 10.4 and Emacs 22-something, they don't work.

(I also had the line

(defun Ctl-C-prefix ();;Use Ctl-C as a command prefix
Ctl-C-keymap)
(setq Ctl-C-keymap (make-keymap));;allocate Ctl-C keymap table

).
I've appended my .emacs file, though I can't imagine anyone would
have the patience to comb through it (it will be obvious that I'm
a comsumer, not producer of emacs lisp -- I am running auc-tex, if
that matters). But if you know off the top of your head ... :).

Thanks in advance,
CS

------- .emacs -----------------------

(setq load-path (cons "/opt/local/share/emacs/22.0.50/lisp  
/opt/local/share/emacs/22.0.50/site-lisp" load-path))

(setq inhibit-startup-message t)
(setq inhibit-startup-echo-area-message t)
   (setq visible-bell t)

(setq display-time-day-and-date 't)

;open with size window I want:
(setq default-frame-alist '((width . 079)(height . 40)
             (font .  
"-apple-courier-medium-r-normal--18-180-75-75-m-180-mac-roman")))

;;(setq initial-frame-alist '((width . 077) (height . 42)))

(setq mac-allow-anti-aliasing t) ;; turn on anti-aliasing (default)
(set-keyboard-coding-system 'mac-roman)


(keyboard-translate ?\177 ?\^h)
(keyboard-translate ?\^h ?\177)
;;(load "term/bobcat") ;;redefine ^h as backspace/delete

(require 'tex-site)
   ;;invoke auctex

;;(load "preview.el" nil t t)
;;not sure about this.

(setq-default TeX-master t)
   ;;query for master file.

;;*********************************************************************
;;*GENERAL
;;*********************************************************************

(setq default-major-mode 'text-mode)
(setq-default auto-fill-hook 'do-auto-fill)
(setq text-mode-hook 'turn-on-auto-fill)
(setq text-mode-hook '(lambda () (auto-fill-mode 1)))

(setq kill-emacs-query-functions
       (cons (lambda () (yes-or-no-p "Really kill this sonofabitch? "))
             kill-emacs-query-functions))

(setq TeX-parse-self t) ;; Enable parse on load
(setq TeX-auto-save t)  ;; Enable parse on save

(setq-default fill-column 66)

(put 'downcase-region 'disabled t)
(put 'upcase-region 'disabled t)
(put 'eval-expression 'disabled nil)
(put 'narrow-to-page 'disabled nil)

(set-variable (quote page-delimiter) "%%%")
   ;;marks for region to narrow to

(setq LaTeX-section-hook
      '(LaTeX-section-heading
       LaTeX-section-title
       LaTeX-section-toc
       LaTeX-section-section
       LaTeX-section-label))

;; 
************************************************************************
;;* AUTOSAVE
;; 
************************************************************************

(setq auto-save-default t)             ; auto-save
(setq auto-save-interval 330)          ; auto save every 333 keystrokes
(setq delete-auto-save-files t)        ; erase ~#% etc..
(setq require-final-newline "ask")
;;(setq tags-file-name "~\writing\tags")
(setq TeX-auto-save t)


;;********************************************************************
;;* BACKUP
;;********************************************************************

(setq make-backup-files t)             ;back-up
(setq version-control 'never)          ;make ONE backup named xxx~
(setq trim-versions-without-asking nil)

;;********************************************************************
;;* RefTeX and Bib-cite
;;********************************************************************

(setq bibtex-maintain-sorted-entries t) ;keep bibtex file alphabetized  
xxx

(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ;turn on reftex mode w  
AUCTeX LaTeX mode
(setq reftex-plug-into-AUCTeX t) ;; make reftex and auctex will interact

(autoload 'reftex-mode     "reftex" "RefTeX Minor Mode" t)
(autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" t)
(autoload 'reftex-citation "reftex-cite" "Make citation" nil)
(autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
(setq reftex-cite-format 'natbib) ;; for my bibliography style

(add-hook 'reftex-load-hook
       '(lambda ()
          (define-key reftex-mode-map [(alt mouse-1)]
            'reftex-mouse-view-crossref)))

(autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)

;;make reftex faster with large docs:
(setq reftex-enable-partial-scans t)
(setq reftex-save-parse-info t)
(setq reftex-use-multiple-selection-buffers t)

;;get better working with bib-cite.el
(setq bib-cite-use-reftex-view-crossref t)

;;settings for bib-cite.el (provided with auctex)
(require 'imenu)
(define-key global-map [S-mouse-3] 'imenu)
(autoload 'turn-on-bib-cite "bib-cite")
(add-hook 'LaTeX-mode-hook 'turn-on-bib-cite)

;; 
************************************************************************ 
*;;*HEADERS
;; 
************************************************************************ 
*
(load "header") ;; M-x make-header
   ;;Make informative headers in various file types - emacs, etc

;; 
************************************************************************
;;*ABBREVIATIONS (templates for letters, automatic typo-correction,  
etc.)
;; These won't work for anyone else; if you use this, change them or
;; comment them out
;; 
***********************************************************************

(setq-default abbrev-mode t)
(read-abbrev-file "abbrevs");;relocated to fswoyer to ease loading;fix  
change
(setq save-abbrevs t)

;;(read-abbrev-file  
"/Applications/Emacs.app/Contents/Resources/lisp/abbrevs");;  OLD


;;********************************************************************
;;*SPELLING (using ASpell)
;;*********************************************************************

(setq ispell-program-name
"/Library/PreferencePanes/Spelling.prefPane/Contents/MacOS/cocoAspell")
   ;;use aspell

(add-hook 'LaTeX-mode-hook 'flyspell-mode)
   ;;spell check as we go

(define-key global-map "\C-cd" 'ispell-word);;to fix flagged word
(define-key global-map "\C-cf" 'ispell-complete-word);;suggest  
correctly-spelled completions

(define-key global-map [f7] 'ispell-region)



;; 
************************************************************************
;;*CUSTOM SET VARIABLES
;; (this line set by EMACS customization)
;; 
************************************************************************ 
*
(custom-set-variables
   ;; custom-set-variables was added by Custom.
   ;; If you edit it by hand, you could mess it up, so be careful.
   ;; Your init file should contain only one such instance.
   ;; If there is more than one, they won't work right.
'(cua-mode t nil (cua-base))
'(display-time-mode t nil (time))
'(fringe-mode 0 nil (fringe))
'(global-font-lock-mode t nil (font-core))
'(reftex-bibpath-environment-variables (quote  
("~/Library/texmf/bibtex/bib/")))
'(reftex-default-bibliography nil)
'(save-place t nil (saveplace))
'(show-paren-mode t nil (paren))
'(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify)))
'(transient-mark-mode t)
'(uniquify-buffer-name-style (quote forward) nil (uniquify)))
(custom-set-faces
   ;; custom-set-faces was added by Custom.
   ;; If you edit it by hand, you could mess it up, so be careful.
   ;; Your init file should contain only one such instance.
   ;; If there is more than one, they won't work right.
)

;; 
***********************************************************************
;;*From dot-emacs.el for enhanced carbon emacs
;; Do not customize the following parameters
;; 
***********************************************************************

(defun load-local-site-start (site-lisp-directory )
   "Load site-start.el from a given site-lisp directory"
   (let ((current-default-directory default-directory))
     (setq default-directory site-lisp-directory)
     (normal-top-level-add-subdirs-to-load-path)
     (setq default-directory current-default-directory)
     (setq load-path (cons site-lisp-directory load-path))
     (load (concat site-lisp-directory "/site-start.el"))
     ))

;;;;;;;;;; !!!!!!!!!

(defun Ctl-C-prefix ();;Use Ctl-C as a command prefix
Ctl-C-keymap)
(setq Ctl-C-keymap (make-keymap));;allocate Ctl-C keymap table
(global-set-key "\C-c" (Ctl-C-prefix))
(global-set-key "\C-t" 'kill-word)
(global-set-key "\C-r" 'forward-word)
(global-set-key "\C-w" 'backward-word)
(global-set-key "\C-x\C-k" 'kill-region)
(global-set-key "\C-x\C-j" 'backward-kill-word)
(global-set-key "\M-f" 'isearch-forward)
(global-set-key "\M-b" 'isearch-backward)

(global-set-key "\C-cg" 'goto-line)

(fset 'to-math-mode   "$$")
(global-set-key "\C-c\C-o" 'to-math-mode)
   ;;keybinding to enter math mode

(setq mac-command-keys-is-meta t)

(global-set-key [f10] 'tags-loop-continue)
   ;;continues search in RefTeX; may need fix for mac

(global-set-key [f11] 'TeX-next-error)
   ;;goto next LaTeX error; may need fix for mac


(global-set-key "\C-c\C-v" 'pager-page-down);;
(global-set-key "\C-x\C-o" 'pager-page-up) ;;

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list