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 12:11:50 -0800 Message-ID: References: <20161216081336.1fd51e61@gauss> <20161216115047.06118679@gauss> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1481919158 1883 195.159.176.226 (16 Dec 2016 20:12:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Dec 2016 20:12:38 +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 21:12:33 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 1cHyrp-00081J-0s for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Dec 2016 21:12:33 +0100 Original-Received: from localhost ([::1]:34146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHyrt-0003ha-3s for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Dec 2016 15:12:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHyrU-0003dZ-Ng for help-gnu-emacs@gnu.org; Fri, 16 Dec 2016 15:12:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHyrT-000244-Ka for help-gnu-emacs@gnu.org; Fri, 16 Dec 2016 15:12:12 -0500 Original-Received: from mail-qk0-x234.google.com ([2607:f8b0:400d:c09::234]:36561) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cHyrT-00023R-HL for help-gnu-emacs@gnu.org; Fri, 16 Dec 2016 15:12:11 -0500 Original-Received: by mail-qk0-x234.google.com with SMTP id n21so102058518qka.3 for ; Fri, 16 Dec 2016 12:12:11 -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=Bux6Bv4/seuk3Cqh/ePCiQZmE6s/RcWKk7LUqaYSaXk=; b=YeoYhe/Nzcd0q7T0mJO7W15mHI5yV685cnvZvDk72yQm9nqXxDE45VmwNj5zivoyJU 1JnT20M8cCh9mEjqPSA+LhzpKAoQthKJjKa6TK4DnV6sz/1aEpiTjMIgKs4VU8Hlv47l 1Hu6zxEgO0oU4xObmwoi0pu1hPnWKhxdxCf7fvPtxWHXH3N0NclOXMtn1jQMd+vYiOfA puPoai4S0wyXFgso0uYVrFbWu5Rmo0etldFng+3/KBWk1ACL/b09G3Cq5/J8P9F3gK2C c0lUhEHWvQoDNO2isovuT6briQzGXSLgL4RHqKQYXKCKZcUx7HLUJhGN8kXolYHGkpOn eTog== 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=Bux6Bv4/seuk3Cqh/ePCiQZmE6s/RcWKk7LUqaYSaXk=; b=IElKXBWL7EMPoIKRli8GdF6amKvynyzflJOuHb6UHRxKEZ7+0bA4JA9VE6kw6TNFjD zie810p5xjigbz7wRNxt0/XM5tcdyAZc32fztltH/0h+HgFdzWlwu4LfKlneQVViTDxP J6MXryF+P36e5IE8zPgGcaWpe3WpzapHuBiFjFc0mF79fDo+cA5/AG2n5siJGVe/jY37 U8pVKRvKJOkuUaxAZ+TP59Bu/KLPQK/SvfESIeZFMlLxPOFK/rBO8159gFCu9bDyQW2z 812I8o6peAECJqV0gdotKEITDE5p+isjzX5YBW0AufsdMvamYlIwybi4KZxP5vl3QtOl mc0w== X-Gm-Message-State: AIkVDXJL7bfkf3FHjoS5RZeQsB69XOmOgtI5mvO3xNEVxyPU59B0nSIjiDKjPYf3LsNKBnC6h72Q8dK2W7tt5Q== X-Received: by 10.55.168.139 with SMTP id r133mr5330722qke.160.1481919130915; Fri, 16 Dec 2016 12:12:10 -0800 (PST) Original-Received: by 10.200.61.130 with HTTP; Fri, 16 Dec 2016 12:11:50 -0800 (PST) In-Reply-To: <20161216115047.06118679@gauss> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c09::234 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:111972 Archived-At: Joe Riel wrote: >> This should work: >> >> (use-package mds >> :config (mds)) >> > Alas, that doesn't work. The server does not start and now the mds command > is not assigned so I cannot manually start it. > > What I found that does work is changing :config to :init, that is, > > (use-package mds > :commands (mds) > :init (mds)) > > On reflection that might make sense. What confuses me is that :init runs > code before the package is loaded. However, I assume that :commands (mds) > ensures that mds is auto-loaded, so the call to (mds) then auto-loads and > runs mds. Right - it's essentially equivalent to what you had before `use-package': (autoload 'mds "mds") (mds) However, (use-package mds :config (mds)) really should work too, because other than some complications for error handling it's morally equivalent to: (require 'mds) (mds) So I'm not sure what's going on there. John