0

I'm trying to use use-package in my Preferences.el file under Aquamacs 3.6. Every time I try to run Aquamacs with the following Preferences.el, Aquamacs hangs, usually indefinitely.

(require 'package)
(add-to-list 'package-archives '("gnu"   . "https://elpa.gnu.org/packages/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))

(package-initialize)

(unless (package-installed-p 'use-package)
  (package-refresh-contents) ;; Does not hang if this line is commented out
)

Does anyone know what is wrong? Incidentally, if I comment out the (package-refresh-contents) line, then Aquamacs starts correctly. Ultimately, I want to install use-package and use it within the remainder of my Preferences.el.

5
  • Which part of your init file causes it to hang? If you don’t know, try commenting out top–level expressions until the hang goes away.
    – db48x
    Jul 28 at 18:14
  • @db48x It appears to be (package-refresh-contents) that causes the hang. I've revised the code above. Jul 28 at 19:30
  • For how long does it hang? Maybe it is just downloading a large list of packages. strace it and find out what it is doing while it is hung.
    – db48x
    Jul 29 at 3:27
  • 1
    @db48x Thanks for your help! I used open -n /Applications/Aquamacs.app --args --debug-init, which allowed me to see that Aquamacs was prompting me to decide whether to ignore expired certificates from melpa and gnu. After ignoring, Aquamacs now boots promptly. Jul 31 at 20:19
  • Nice. You should add that as an answer.
    – db48x
    Jul 31 at 20:20

1 Answer 1

0

I turns out that the cause of Aquamacs hanging was that it was waiting for an answer to a prompt about ignoring expired certificates from melpa and gnu. To discover this, I used

open -n /Applications/Aquamacs.app --args --debug-init

After choosing to ignore, Aquamacs now boots promptly.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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