[OS X Emacs] Re: [Aquamacs-bugs] latex error continued...
    David Reitter 
    david.reitter at gmail.com
       
    Thu Sep 18 18:29:05 EDT 2008
    
    
  
Jesper,
to inspect a variable in Emacs, type C-h v variablename RET.
Please inspect the variable `TeX-command-list' after loading your TeX  
file.  For me, it has an element like this:
("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil
   (latex-mode doctex-mode)
   :help "Run LaTeX")
Now inspect `TeX-expand-list'.
This should have an entry
     ("%`" (lambda nil
	    (setq TeX-command-pos t TeX-command-text "")))
Also, please check `LaTeX-command', which should simply be "latex".
Finally, please have a look at `buffer-file-name', called from within  
the buffer that you're compiling.
The next thing to do would be to create a new buffer, paste the code  
below (a new definition of the AUCTeX function TeX-command) and then  
do M-x eval-buffer RET.
This will add a debug output.
When you then attempt to compile your LaTeX file, you should get some  
additional information in your *Messages* buffer, beginning with  
"executing latex command".
This line is something we would want to see to help you fix this  
problem.
Finally, I presume that you're trying this with a new, minimal LaTeX  
document without much content.
Best
- David
--
http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and  
support the Aquamacs Project!
(defun TeX-command (name file &optional override-confirm)
   "Run command NAME on the file returned by calling FILE.
FILE is the symbol of a function returning a file name.  The
function has one optional argument, the extension to use on the
file.
Use the information in `TeX-command-list' to determine how to run
the command.
If OVERRIDE-CONFIRM is a prefix argument, confirmation will be
asked if it is positive, and suppressed if it is not."
   (cond ((eq file 'TeX-region-file)
	 (setq TeX-current-process-region-p t))
	((eq file 'TeX-master-file)
	 (setq TeX-current-process-region-p nil)))
   (let ((command (TeX-command-expand (nth 1 (assoc name TeX-command- 
list))
				     file))
	(hook (nth 2 (assoc name TeX-command-list)))
	(confirm (if override-confirm
		     (> (prefix-numeric-value override-confirm) 0)
		   (nth 3 (assoc name TeX-command-list)))))
     ;; Verify the expanded command
     (if confirm
	(setq command
	      (read-from-minibuffer (concat name " command: ") command
				    nil nil)))
     ;; Now start the process
     (setq file (funcall file))
     (TeX-process-set-variable file 'TeX-command-next TeX-command-Show)
     (message "executing latex command: %s" command)
     (funcall hook name command file)))
On 18 Sep 2008, at 11:09, Jesper Ryge wrote:
> Enter your bug report here.
>
> error when attempting compile latex document:
>
>
> Running `LaTeX' on `cv-long-jr' with ``%`pdflatex \nonstopmode%' cv-
> long-jr.tex''
> /bin/sh: -c: line 1: unexpected EOF while looking for matching ``'
> /bin/sh: -c: line 2: syntax error: unexpected end of file
>
> LaTeX exited abnormally with code 2 at Thu Sep 18 17:02:47
>
>
> persist in:
>
> /Applications/Aquamacs\ Emacs.app/Contents/MacOS/Aquamacs\ Emacs -q &
>
>  but not in
>
> /Applications/Aquamacs\ Emacs.app/Contents/MacOS/Aquamacs\ Emacs -Q &
>
> in -Q it runs the pdflatex on the open *.tex file as in a terminal
> window - as far as i can tell.
>
> cheers,
> jesper
>
>
> In GNU Emacs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2193 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20080918/611c0901/attachment.p7s>
    
    
More information about the MacOSX-Emacs
mailing list