I am very new to lisp so I need some help parsing the error I'm encountering. Any time I try to preview a document, buffer, section, etc. in a .tex file I get the error
"Display geometry unavailable: Wrong type argument: number-or-marker-p, nil"
The error comes from the preview-get-geometry() function, and the full backtrace is given below. Any help getting preview to work would be greatly appreciated.
-Chase
Debugger entered--Lisp error: (error "Display geometry unavailable: Wrong type argument: number-or-marker-p, nil")
signal(error ("Display geometry unavailable: Wrong type argument: number-or-marker-p, nil"))
error("Display geometry unavailable: %s" "Wrong type argument: number-or-marker-p, nil")
(condition-case err (let* ((geometry (list (preview-hook-enquiry preview-scale-function) (cons (/ (* 25.4 ...) (display-mm-width)) (/ (* 25.4 ...) (display-mm-height))) (preview-get-colors))) (preview-min-spec (* (cdr (nth 1 geometry)) (/ (preview-inherited-face-attribute (quote preview-reference-face) :height (quote default)) 720.0)))) (setq preview-icon (preview-make-image (quote preview-icon-specs)) preview-error-icon (preview-make-image (quote preview-error-icon-specs)) preview-nonready-icon (preview-make-image (quote preview-nonready-icon-specs))) geometry) (error (error "Display geometry unavailable: %s" (error-message-string err))))
preview-get-geometry()
(let* ((geometry (preview-get-geometry)) (commandbuff (current-buffer)) (pr-file (cons (if TeX-current-process-region-p (quote TeX-region-file) (quote TeX-master-file)) file)) (master (TeX-master-file)) (master-file (expand-file-name master)) (dumped-cons (assoc master-file preview-dumped-alist)) process) (if dumped-cons nil (setq preview-dumped-alist (cons (setq dumped-cons (cons master-file (if (eq preview-auto-cache-preamble ...) (y-or-n-p "Cache preamble? ") preview-auto-cache-preamble))) preview-dumped-alist))) (if (cdr dumped-cons) (progn (let* (TeX-current-process-region-p) (setq process (preview-cache-preamble dumped-cons)) (if process (setq TeX-sentinel-function (list (quote lambda) (quote ...) (cons ... ...) (cons ... ...))))))) (or process (TeX-inline-preview-internal command file pr-file commandbuff dumped-cons master geometry)))
preview-generate-preview(t "_region_" "pdflatex -synctex=1 -file-line-error --synctex=1 \"\\nonstopmode\\nofiles\\PassOptionsToPackage{active,tightpage,auctex}{preview}\\AtBeginDocument{\\ifx\\ifPreview\\undefined\\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\\fi}\" \"\\input\" _region_.tex")
preview-region(1 9328)
preview-buffer()
call-interactively(preview-buffer nil nil)