[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Execute code in use-package

From: John Mastro
Subject: Re: Execute code in use-package
Date: Fri, 16 Dec 2016 10:12:44 -0800

Joe Riel <> wrote:
> In my old .emacs file, I auto-load and run a command in
> a package by doing
> (autoload 'mds "mds" "Restart the Maple Debugger server" t)
> (mds) ; start the server
> Having converted to use-package, I wrote
> (use-package mds
>   :commands (mds)
>   ;; start the debugger server
>   :config (mds))
> Alas, that doesn't work.  I have to manually execute the mds command
> after launching emacs to start the server.  I've read the documentation
> for use-package, but cannot figure out how to properly do this.

This should work:

(use-package mds
  :config (mds))

In other words, remove ":commands", which implicitly causes loading (and
thus evaluation of the :config block) to be deferred.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]