8

I have some customisation in my ~/.emacs.d/init.el. My command line emacs can pick up the init.el as expected. However Aquamacs does not seem to read the file at all. Here is the buffer of the *message*

Loading prestart plugin files ...
... done.
Wrote /Users/antkong/Library/Preferences/Aquamacs Emacs/Packages/.nosearch
Shell: /bin/zsh
Loading /Users/antkong/Library/Preferences/Aquamacs Emacs/Recent Files.el (source)...done
Cleaning up the recentf list...done (0 removed)
22 environment variables imported from login shell (/bin/zsh).
Loading /opt/homebrew-cask/Caskroom/aquamacs/3.2/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes/auctex.el (source)...done
Loading plugins ...
Loading /opt/homebrew-cask/Caskroom/aquamacs/3.2/Aquamacs.app/Contents/Resources/lisp/aquamacs/site-start.el (source)...done
... done.
Loading `custom-file' failed.
Loading /Users/antkong/Library/Preferences/Aquamacs Emacs/Preferences.el (source)...done
Mark set
one-buffer-one-frame-mode disabled.
Mark set [26 times]
Loading /Users/antkong/Library/Preferences/Aquamacs Emacs/frame-positions.el (source)...done
file-error: (Opening directory no such file or directory /Users/antkong/Library/Logs/CrashReporter)
Mark set [5 times]
Aquamacs is based on GNU Emacs, 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. (C) 2014 Free Software Foundation, and D. Reitter. No Warranty.

Why Aqacmacs does not read the init.el file?

6

The following answer relates to current public release of Aquamacs available for download at http://aquamacs.org/download.shtml -- i.e., Aquamacs 3.2 GNU Emacs 24.4.51.2 (x86_64-apple-darwin14.0.0, NS apple-appkit-1343.14) of 2014-11-07 (Aquamacs-3.2) on watson.local

Aquamacs does indeed read the init.el that can be placed inside ~/.emacs.d/init.el. This can be verified by placing a simple message inside the init.el file and restarting Aquamacs:

(message "Hello-world -- this is my init.el file loading!")

Here is the *Messages* buffer output:

Loading prestart plugin files ...
... done.
Wrote /Users/HOME/Library/Preferences/Aquamacs Emacs/Packages/.nosearch
Shell: /bin/bash
Loading /Users/HOME/Library/Preferences/Aquamacs Emacs/Recent Files.el (source)...done
Cleaning up the recentf list...done (0 removed)
14 environment variables imported from login shell (/bin/bash).
Loading /Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes/auctex.el (source)...done
Loading plugins ...
Loading /Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/site-start.el (source)...done
... done.
Loading `custom-file' failed.
Loading /Users/HOME/Library/Preferences/Aquamacs Emacs/Preferences.el (source)...done
Hello-world -- this is my init.el file loading!
Mark set
one-buffer-one-frame-mode disabled.
Mark set [26 times]
Loading /Users/HOME/Library/Preferences/Aquamacs Emacs/frame-positions.el (source)...done
Mark set [5 times]
Aquamacs is based on GNU Emacs, 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. (C) 2014 Free Software Foundation, and D. Reitter. No Warranty.
  • 2
    Hmm. I just tried copying your message to a blank ~/.emacs.d/init.el and don't see it in Messages. I played with the mode of the file but that didn't help. I'm running Aquamacs 3.2 GNU Emacs 24.4.51.2 – ari gold Jul 14 '15 at 19:39
  • 2
    @ari gold -- The test in the answer above was performed using a brand spanking new installation of Emacs, without any user customization. The only thing that was added to perform the test was an init.el file at ~/.emacs.d/init.el containing that one line of code (message "Hello-world -- this is my init.el file loading!"). If it doesn't work for you, then something in your configuration has most likely altered the default behavior. Try stripping everything down to the bear minimum and once you see that works out-of-the-box, you can start working towards tracking down the conflict. – lawlist Jul 14 '15 at 20:27
  • 1
    thanks & great idea. funnily enough I had to switch to plain ol' emacs due to problems with aquamacs and ensime. – ari gold Jul 15 '15 at 20:51
  • 3
    I have a reasonably fresh install of Aquamacs 3.2 on Yosemite which also does not load my init.el out of the box. I do not have an .emacs file. I worked around this by adding (load-file "~/.emacs.d/init.el") to ~/Library/Preferences/Aquamacs Emacs/Preferences.el which has a comment saying it will read .emacs ... but no mention of init.el. – tripleee Nov 6 '15 at 11:53
  • 1
    @tripleee -- It may be worthwhile for you to submit a bug report / issue on Github to David so that he is aware of it. – lawlist Nov 6 '15 at 15:00
2

I had the problem that Aquamacs was reading my ~/.emacs.d/init.el file and then I changed the default font via the Aquamacs pull down menus. Once I saved the new options, Aquamacs stopped reading my ~/.emacs.d/init.el file. The solution I used was to put a soft link from ~/.emacs to ~/.emacs.d/init.el:

ln -s ~/.emacs.d/init.el ~/.emacs

There are other ways of doing this. For example, putting your initializations in

~/Library/Preferences/Aquamacs Emacs/Preferences.el

See https://www.emacswiki.org/emacs/AquamacsFAQ for more details about which files are loaded at startup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.