[OS X Emacs] Aquamacs problem: "message" function no longer works during startup

Pete Siemsen siemsen at ucar.edu
Tue Aug 11 01:19:17 EDT 2009


I use Aquamacs on Mac OS X and XEmacs on Linux.  I use the same  
init.el file in both environments.  Many of my customizations work in  
both Emacsen, and I have conditional logic for those that don't.  In  
general, this works fine.

Sometimes, when I'm tweaking features in either Emacs, I mistakenly  
inject errors, and an Emacs fails to start.  To help localize the  
problem, I've inserted permanent logging messages in the init.el file,  
with some logic that temporarily "turns them on" and later "turns them  
off".  This has worked well in the past.  Today, I discovered that it  
isn't working, perhaps because Aquamacs has evolved.  I no longer get  
any log messages in Aquamacs.

Here's the code from the beginning of my init.el file:

;;;
;;; XEmacs and Aquamacs don't support the same logging functions, so I  
wrote
;;; this wrapper that takes care of the details.  In XEmacs, the  
messages get
;;; written to standard out.  In Aquamacs, they get written to the  
*Messages*
;;; buffer.  Wish I could make XEmacs behave like Aquamacs.
;;;
;;; Set this to t to debug, or nil to not debug
(setq debugging-petes-init-file t)
(defun petes-log-message (lmsg)
   (if debugging-petes-init-file
       (progn
	(if (featurep 'xemacs)
	    (external-debugging-output (concat lmsg "\r\n"))
	  )
	(when (boundp 'aquamacs-version)
	    (message lmsg)
	  )
	)
     )
   )

(petes-log-message "executing init.el")

This used to work.  The message function is still there - I can run it  
interactively.  It just doesn't work in my init.el file.  Help!

BTW, I'm using the very latest version of Aquamacs - "2.0preview2".

-- Pete




More information about the MacOSX-Emacs mailing list