From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John Yates Newsgroups: gmane.emacs.devel Subject: Re: emacs-29 acd462b0306: ; Improve the use-package manual Date: Sun, 11 Dec 2022 15:04:32 -0500 Message-ID: References: <167059642832.4265.15913417645926264658@vcs2.savannah.gnu.org> <20221209143348.961DEC0E4CA@vcs2.savannah.gnu.org> <83k02zwd0z.fsf@gnu.org> <83tu22v4rx.fsf@gnu.org> 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="31785"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, johnw@newartisans.com To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 11 21:05:40 2022 Return-path: Envelope-to: ged-emacs-devel@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 1p4SZw-00083g-0X for ged-emacs-devel@m.gmane-mx.org; Sun, 11 Dec 2022 21:05:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4SZC-0001PN-3G; Sun, 11 Dec 2022 15:04:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4SZA-0001P7-AW for emacs-devel@gnu.org; Sun, 11 Dec 2022 15:04:52 -0500 Original-Received: from mail-ed1-f41.google.com ([209.85.208.41]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4SZ8-0002wg-BH for emacs-devel@gnu.org; Sun, 11 Dec 2022 15:04:52 -0500 Original-Received: by mail-ed1-f41.google.com with SMTP id d20so10282225edn.0 for ; Sun, 11 Dec 2022 12:04:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4QAVT1N6VLExk41wuBPtN99i6MB0zubU1hT21O/YHf4=; b=uLoxFhB3YaRmqhBoEoY/Cckyz8z4oDlUwMA1+ojZvkC8KY77xb6Dv6CjTFyS88vn6H BKD13eOJTxji/7tWCFQ8eEo4/0LJMWxDyvhD9zS7ln7uPRwNivA5a4Eywa+BDrDvLivI WzNhmpFZSOI5AtR8GWxkJ5P7WIVJDkoD3P0+In3PyRGy3S3pcUfqMeEP0gcdiN//J8B5 E9Jb4Wy6dO8e4HFfrJF1YlcGLdUx1AmDAKH9v619Yv/u14vz0JPRv7tsPAZLLInrEbsK /2wZPcbAQmeq178I/awuH9k3aXjCnf4tk3nQ7qQ++uZGF90iLyWUj8z36wFwOp8RitIp NKZw== X-Gm-Message-State: ANoB5pkPaJZzCelRZQXVYjtQu5nJSK0LlOWaIqYqjDyZcN/9g5YW2v+q uaVHhroKzcA9EYuT/EmVm1/qKiKkbdyVgm9xQIcYLS/Rq3U= X-Google-Smtp-Source: AA0mqf4XW44Z2tKiFlIq8m6NoMgSEYpC78QhqumvMXnNFo39BuaXq4cxFRVJzQInGdcoNKASTQHI3nIIttKUNvGXPtI= X-Received: by 2002:a05:6402:1f87:b0:468:7df:c38c with SMTP id c7-20020a0564021f8700b0046807dfc38cmr19797272edc.150.1670789083859; Sun, 11 Dec 2022 12:04:43 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=209.85.208.41; envelope-from=john.yates.sheets@gmail.com; helo=mail-ed1-f41.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301165 Archived-At: I am responding solely to this thread's subject, not to any recent detailed points. I have employed a use-package since my most recent emacs bankruptcy five or so years back. Early on I struggled to come up with an appropriate ordering of keywords. Clearly many are purely declarative. But some result in declarations and/or executable code. Hence this use-package comment in my .init file: ;; Order insensitive metadata (neither introduces nor references any symbols, nor executes any code): ;; :disabled - turn off a troublesome or currently unused package ;; :straight - ;; :pin - pin the package to an archive ;; :ensure - causes package(s) to be installed automatically if not already present on your system ;; :defer - suppress non-auto-deferred loading if you know that another package will load this one ;; :demand - prevent automatic deferred loading ;; :no-require - inhibit loading package at compile time (e.g. just need eval-after-load functionality) ;; :requires - suppress if feature(s) not available at time of use-package decl (= :if (featurep 'foo)) ;; :load - :load keyword overrides :no-require ;; :after - delay loading until (:all PKG...) (default) or (:any PKG...) are loaded ;; :catch - override use-package-expand-minimally ;; :blackout - ;; :diminish - support for diminish.el (if installed). ;; :delight - support for delight.el (if installed) ;; ;; Order sensitive (may introduce, reference or modify symbols, and/or may execute code): ;; :load-path - append to load-path before loading; relative paths are expanded within user-emacs-directory ;; :defines - introduce dummy variable declarations solely for the sake of the byte-compiler ;; :functions - introduce dummy function declarations solely for the sake of the byte-compiler ;; :preface - definition to silence byte-compiler and to be used in :if tests ;; :if :when :unless - predicate initialization and loading ;; :custom - custom-set or set-default each variable definition; does not modify custom-file ;; :custom-face - customize-set-faces each face definition; does not modify custom-file ;; :general - is this correct? ;; :bind(*) - ( ( . )... :map ( . )... ) ;; * = overriding all minor mode bindings ;; :bind-keymap(*) - ( . ) ;; * = overriding all minor mode bindings ;; :interpreter - extend interpreter-mode-alist; use cons if package name does not end with -mode ;; :mode - extend auto-mode-alist; use cons if package name does not end with -mode ;; :magic - extend magic-mode-alist; use cons if package name does not end with -mode ;; :magic-fallback - extend magic-fallback-mode-alist; use cons if package name does not end with -mode ;; :hook - see https://github.com/jwiegley/use-package/blob/master/README.md#hooks ;; :commands - creates autoloads and defers loading of the module until commands are used ;; :init - code executed unconditionally before package is loaded (and even when not loaded) ;; :config - execute code after a package is loaded (perhaps lazily); could even be a use-package form ;; :hydra - Since, at least in my theory, the keywords in the first grouping are order-insensitive, I list them in the order that I choose to have them appear in my use-package forms. I am sure that my comment includes errors. Thus I would love to see something similar but more authoritative in the new manual. /john