[OS X Emacs] Error messages

Thomas S. Dye tsd at tsdye.com
Tue Jul 1 18:18:49 EDT 2008


Aloha Edward,

There is an intermittent bug in Aquamacs 1.4 that keeps it from  
reading environment variables.  I believe this is fixed in the current  
nightly builds of what will be 1.5.  At this point, I've found the  
best solution is to use 1.3.

Alternatively, you can put this in ~/Library/Application\ Support/ 
Aquamacs\ Emacs/site-prestart.el
for use with 1.4.  David Reitter sent me this code and it seemed to  
work the few times I tested it.

Tom

;;from mac-extra-functions.el, version 1.63

  (defun mac-read-environment-vars-from-shell ()
  "Import the environment from the system's default login shell
  specified in `shell-file-name'."
     (with-temp-buffer
       ;; execute 'printenv' with the default login shell,
       ;; running the shell with -l (to load the environment)
       (setq default-directory "~/")	; ensure it can be executed
       ;; To Do: use call-process instead -> this here
       ;; will invoke two bashes

       (let ((shell-login-switch
  	     (or shell-login-switch
  		 (if (string-match ".*/\\(ba\\|z\\)sh" shell-file-name)
  		     "-l"
  		   (if (string-match ".*/\\tcsh" shell-file-name)
  		     ""
  		   (if (string-match ".*/ksh" shell-file-name)
  		       "" ;; works for ksh
  		     (message "Could not retrieve login shell environment with  
login shell: %s" shell-file-name)
  		   ;; won't work for csh, because it doesn't take -l -c ...
  		   ))))))
		
  	(call-process shell-file-name nil
  	       t nil
  	        shell-login-switch
  		shell-command-switch
  		"printenv"))
       (goto-char (point-min))
       (while (re-search-forward "^[A-Za-z_0-9]+=()\s*[^\x]*?
  \s*}\s*$" nil t)
  	(replace-match "..." nil nil))
       (goto-char (point-min))
       (while (search-forward-regexp "^\\([A-Za-z_0-9]+\\)=\\(.*\\)$"  
nil t)
  	(setenv
  	 (match-string 1)
  	 (if (equal (match-string 1) "PATH")
	     (concat (match-string 2) ":" (getenv "PATH"))
  	     (match-string 2))))))


Thomas S. Dye, Ph.D.
T. S. Dye & Colleagues, Archaeologists, Inc.
Phone: (808) 529-0866 Fax: (808) 529-0884
http://www.tsdye.com


On Jul 1, 2008, at 12:01 PM, Edward M. Roche wrote:

> Does anyone know how to interpret these messages:?
>
> 1. From latex "output" window.
> =======================
> Running `LaTeX' on `testletter' with ``pdflatex  - 
> interaction=nonstopmode "\input" testletter.tex''
> /bin/sh: pdflatex: command not found
>
> LaTeX exited abnormally with code 127 at Tue Jul  1 14:55:09
> /
>
> 2. From "Messages" window
> ======================
> ("/Applications/Aquamacs Emacs.app/Contents/MacOS/Aquamacs Emacs")
> Source file `/Applications/Aquamacs Emacs.app/Contents/Resources/ 
> site-lisp/site-start.el' newer than byte-compiled file
> Loading prestart plugin files ...
> Loading /Users/eroche/Library/Application Support/Aquamacs Emacs/ 
> site-prestart.el (source)...done
> ... done.
> Loading easy-mmode...done
> Aquamacs Mule installed.
> Loading encoded-kb...done
> Loading easymenu...done
> Loading jka-compr...done
> uncompressing tree-widget.el.gz...done
> Loading cl-macs...done
> Loading /Users/eroche/Library/Preferences/Aquamacs Emacs/Recent  
> Files.el (source)...done
> Cleaning up the recentf list...done (0 removed)
> Defining fontset: lucida11
> Defining fontset: lucida12
> Defining fontset: lucida13
> Defining fontset: lucida14
> Defining fontset: monaco11
> Defining fontset: monaco12
> Loading /Applications/Aquamacs Emacs.app/Contents/Resources/site- 
> lisp/edit-modes/tex-site.el (source)...done
> Loading /Applications/Aquamacs Emacs.app/Contents/Resources/site- 
> lisp/edit-modes/nxml/rng-auto.el (source)...done
> Loading plugins ...
> Loading /Applications/Aquamacs Emacs.app/Contents/Resources/site- 
> lisp/site-start (compiled; note, source file is newer)...done
> ... done.
> Loading /Users/eroche/Library/Preferences/Aquamacs Emacs/ 
> customizations.el (source)...done
> Loading /Library/Preferences/Aquamacs Emacs/Preferences.el (source)...
> Loading /Applications/TeXniscope.app/Contents/Resources/txs- 
> search.el (source)...done
> Loading /Library/Preferences/Aquamacs Emacs/Preferences.el  
> (source)...done
> Loading /Users/eroche/Library/Preferences/Aquamacs Emacs/ 
> Preferences.el (source)...
> Restarting server
> Loading /Applications/TeXniscope.app/Contents/Resources/txs- 
> search.el (source)...done
> Loading /Users/eroche/Library/Preferences/Aquamacs Emacs/ 
> Preferences.el (source)...done
> Added to /Users/eroche/Library/Preferences/Aquamacs Emacs/ 
> customizations.el
> Mark set [2 times]
> Loading /Users/eroche/Library/Preferences/Aquamacs Emacs/frame- 
> positions.el (source)...done
> Mark set
> Aquamacs is based on GNU Emacs 22, a part of the GNU/Linux system.
> It is Free Software: you can improve and redistribute it under the  
> GNU General Public License, version 3
> or later. Copyright (C) 2008 Free Software Foundation, Inc. (C) 2008  
> D. Reitter. No Warranty.
> 1.4 is the most recent Aquamacs version available.
> Aquamacs is based on GNU Emacs 22, a part of the GNU/Linux system.
> It is Free Software: you can improve and redistribute it under the  
> GNU General Public License, version 3
> or later. Copyright (C) 2008 Free Software Foundation, Inc. (C) 2008  
> D. Reitter. No Warranty.
> Loading latexenc...done
> Loading tex...done
> Loading latex...
> Loading edmacro...done
> Loading latex...done
> Loading font-latex...done
> Applying style hooks...
> Loading /Applications/Aquamacs Emacs.app/Contents/Resources/site- 
> lisp/edit-modes/auctex/style/german.elc...done
> Applying style hooks... done
> Sorting environment...
> Removing duplicates... done
> Loading tex-bar...done
> Mark set
> Loading tex-fold...done
> Loading bib-cite...done
> Loading reftex...done
> Loading reftex-auc...done
> Loading reftex-dcr...done
> Automatic display of crossref information was turned on
> Loading preview...done
> Applying style hooks... done
> Applying style hooks... done
> Sorting environment...
> Removing duplicates... done
> Mark set
> Wrote /Users/eroche/Documents/Barraclough/Letters/akletter-new/ 
> testletter.tex
> Press <A-S-return> to exit full screen editing.
> Type `C-c C-l' to display results of compilation.
> LaTeX: problems after [0] pages.
> (New file)
> Applying style hooks... done
> Sorting environment...
> Removing duplicates... done
> Mark set
> Applying style hooks... done
> Wrote /Users/eroche/Documents/Barraclough/Letters/akletter-new/ 
> _region_.tex
> Wrote /Users/eroche/Documents/Barraclough/Letters/akletter-new/ 
> prv_testletter.ini
> Type `C-c C-l' to display results of compilation. [2 times]
> locating previews...
> Type `C-c C-l' to display results of compilation.
> error in process sentinel: preview-reraise-error: LaTeX found no  
> preview images
> error in process sentinel: LaTeX found no preview images
> Type `C-c C-l' to display results of compilation.
> LaTeX: problems after [0] pages.
>
>
> _____________________________________________________________
> MacOSX-Emacs mailing list
> MacOSX-Emacs at email.esm.psu.edu
> http://email.esm.psu.edu/mailman/listinfo/macosx-emacs
> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx




More information about the MacOSX-Emacs mailing list