From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: Execute code in use-package Date: Fri, 16 Dec 2016 10:12:44 -0800 Message-ID: References: <20161216081336.1fd51e61@gauss> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1481912037 27453 195.159.176.226 (16 Dec 2016 18:13:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Dec 2016 18:13:57 +0000 (UTC) To: Help GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 16 19:13:53 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHx0w-0005yP-Ko for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Dec 2016 19:13:50 +0100 Original-Received: from localhost ([::1]:33641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHx11-0002Y5-2H for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Dec 2016 13:13:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHx0G-0001hD-4q for help-gnu-emacs@gnu.org; Fri, 16 Dec 2016 13:13:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHx0F-0005br-DB for help-gnu-emacs@gnu.org; Fri, 16 Dec 2016 13:13:08 -0500 Original-Received: from mail-qt0-x235.google.com ([2607:f8b0:400d:c0d::235]:35122) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cHx0F-0005aa-AD for help-gnu-emacs@gnu.org; Fri, 16 Dec 2016 13:13:07 -0500 Original-Received: by mail-qt0-x235.google.com with SMTP id c47so94132244qtc.2 for ; Fri, 16 Dec 2016 10:13:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=A6nFXyo1H5UtyLZwwUomdb15HVl57z0sjv1QkVTw9j8=; b=WjKLiBUorVGKUKHvjiUCwkthGsbQwOSzM8LgkUCmNTgaYubF/5oo7h+0PQiBwBcips SZDb7BQzzNC0kqCa6XFr3g2geGm1HPpSsLxv+EdTcMlMS2nM9l5K8kzhsN/g3mCkkItc XSSeHwyYegcOaYTBTV0XVO3+ZB0zGGlF++z+mVFW0MkAgmVB1HjcXXUziG4nJn37e1AX Y785IWKIzJXXpM+PFieznfnenmHoLx17jAdlBRfDJTt/RJd1tbjNORpTO4pyvZgrLmJU CUfy2xCq6ZIFmRwh/kzaVQ/uOWoVN9iMiIyV2puT2wvdxe63Gso8bOnrA76oPrhVewd3 sstA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=A6nFXyo1H5UtyLZwwUomdb15HVl57z0sjv1QkVTw9j8=; b=lZMCuDMbELmqPJ98Fst1SCZSnf15TAUJ0xa8sn6gjhHrEr9CWiEwraIi3UmuIPJj04 W7YuFB0Q+Tz3ucNVNhNJ9quwmBxX+QIUm9FjL1C9Qfj/Fn/9XodJIsLtrklb+soAAT/U HU2JkrlJr7WOeyDvc0I8fQvM+IbLUwp9BR4V66Q+fRdMKIojTqUmmiyAHLDOM7HgcRC/ E9DiEeM1j0QKbPklnppHy8UgRXG72RrGGf+Cs/o/rvijxYfIJnHS6CjJ3ot+wMZZrEEv CBGtfqy3k8EsbqlzsbiABBK9fEuo/sSOmrDoK8x2t1nhahkNfnP5s1px+bj6mgDluDLI QuvQ== X-Gm-Message-State: AIkVDXLp2FaCuBx3PIXl29RihYYL3vTuQor2P1O9FgwQK3/fS1VMJjooZJjCh/ZIy1T6SXn8UCNn7X9+PuTjOQ== X-Received: by 10.200.46.249 with SMTP id i54mr3921488qta.13.1481911985278; Fri, 16 Dec 2016 10:13:05 -0800 (PST) Original-Received: by 10.200.61.130 with HTTP; Fri, 16 Dec 2016 10:12:44 -0800 (PST) In-Reply-To: <20161216081336.1fd51e61@gauss> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::235 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111970 Archived-At: 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. John