From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: Combine multiple (straight-)use-package commands into one. Date: Sat, 12 Jun 2021 22:57:59 +0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15882"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 12 16:58:37 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ls55p-0003ya-Od for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 12 Jun 2021 16:58:37 +0200 Original-Received: from localhost ([::1]:34354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ls55o-0003B8-Qy for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 12 Jun 2021 10:58:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ls55U-0003Ay-Lw for help-gnu-emacs@gnu.org; Sat, 12 Jun 2021 10:58:16 -0400 Original-Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]:47053) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ls55R-0003SD-Fl for help-gnu-emacs@gnu.org; Sat, 12 Jun 2021 10:58:16 -0400 Original-Received: by mail-lf1-x136.google.com with SMTP id m21so13194175lfg.13 for ; Sat, 12 Jun 2021 07:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=MXXCRitRmEOEESRShHuH3ic4pbQdxv909Jhv3Dtcb6s=; b=N5AnqE8sx9mTwG1AWH+wmFTFuI56VjWU60VvZnDGcEaUuaS5Y2U1w+662csh9X/hrJ noAqCeXDCAYat715k9H1L3tOJbnTr44zH4VmXxid6k63lNUro8dawJ8dEJ5g0/MRg3KN ES69K2NX1EDAjZokD52tG3pX2Oeue/ErC/FwSPB0bDyhLAsAJq2KMUzaD/9bj8I2Wqk5 8rZ72jQ94m2ObG7MitptYEz2ibsg1Wh57Dgr/g8g1P0rwe21xyiNvrZLQGh0jJTinBDe WF+80kOVSQlpj7Rg9h+59YxmBTxsRwo5mtFeDGLSITh+K8MTNYmKNEv+IPm47bMRpJkP IOzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=MXXCRitRmEOEESRShHuH3ic4pbQdxv909Jhv3Dtcb6s=; b=jP5EO1uyhbOvW+BhNYJ0kvNkUBJ7gAxGNImAlbMRPuSRTlScrJAxdF+PY8L9+JUKCT cO2X0PFMHhePm+gC0iq2owwjxM6pASSDqO7wsv+R4t/DNS72g5XSP33cmZRO1+HxJyBs kZVSn7kSYUQl7yVY1C61UT6LCSRccnc4IjLgLwrvSFrRXvjZjSZw5MT3AKwnkvAhm/FA gdDg7O60oGWRiAjsFKA111GhBp5fvSiJhzxDmRGz1O8j6Jr6TeBLJK7zgHEZaqMttOeB /z8NNSpqvoXWxCBpkuYt/PFj5O5etE4ZWjNn7U0JkQG8lQwK8fAg6grFZizh3GcxTLNv y97w== X-Gm-Message-State: AOAM533sS4EBmObXWn++QepKCUdAixv5jSpoeeF6X1H/WBcLx6kK2bqU sGzIlzWKc5H44+S1HhMsUZXeEjhS9tvLD/ckF+ZyZjskGMv0041Lzrs= X-Google-Smtp-Source: ABdhPJxwmeuKv88sn/ZoSGjyXDe3ijiPVwLsJ/QCbHaszTH01hvq0JKnVhoGIE9LuoirfJNSJevIY5q3yB4+QSGUB/o= X-Received: by 2002:ac2:5084:: with SMTP id f4mr6160852lfm.466.1623509891089; Sat, 12 Jun 2021 07:58:11 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x136.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130777 Archived-At: On Sat, Jun 12, 2021 at 5:57 PM Hongyi Zhao wrote: > > On Ubuntu 20.04, according to the instruction > [here](https://github.com/raxod502/straight.el/issues/786#issuecomment-859155336), > I use the following settings in my Emacs init file: > > ``` > ;;Bootstrap straight > (defvar bootstrap-version) > (let ((bootstrap-file > (expand-file-name "straight/repos/straight.el/bootstrap.el" > user-emacs-directory)) > (bootstrap-version 5)) > (unless (file-exists-p bootstrap-file) > (with-current-buffer > (url-retrieve-synchronously > "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" > 'silent 'inhibit-cookies) > (goto-char (point-max)) > (eval-print-last-sexp))) > (load bootstrap-file nil 'nomessage)) > > ;; Install use-package via straight > (straight-use-package 'use-package) > > ;; Setting this to `t' makes it so that you don't need to include the :straight > ;; keyword in use-package declarations unless you want to add/extend the package > ;; installation recipe. > > (setq straight-use-package-by-default t) ; straight's equivalent of > `use-package-always-ensure'. > ``` > Now, I want to install multiple package hosted in recipe repositories > (such as MELPA) as shown below with only one (straight-)use-package > command, is it possible? > ``` > (use-package flycheck) > (use-package lsp-mode) > (use-package dash) > (use-package posframe) > (use-package s) > (use-package ein) > (use-package smartparens) > (use-package valign) > (use-package multi-term) > ``` Based on the code snippets at , I figured out the following solution with `straight-use-package' command: (defvar package-list) (setq package-list '( flycheck lsp-mode dash posframe s ein smartparens valign multi-term )) (mapc (lambda(package-name) (straight-use-package package-name)) package-list) But I still don't know the corresponding implementation with `use-package' command. Regards -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering NO. 552 North Gangtie Road, Xingtai, China