From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Suhail Singh Newsgroups: gmane.emacs.help Subject: Re: A small use-package puzzle Date: Fri, 30 Aug 2024 10:59:31 -0400 Message-ID: <87frqmgip8.fsf@gmail.com> References: <87cylq8cvh.fsf@rclayton.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20369"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org To: "R. Clayton" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 30 17:00:33 2024 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 1sk372-00057D-Vj for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 30 Aug 2024 17:00:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sk36M-0003nR-38; Fri, 30 Aug 2024 10:59:50 -0400 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 1sk36K-0003Y3-3R for help-gnu-emacs@gnu.org; Fri, 30 Aug 2024 10:59:48 -0400 Original-Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sk36I-0004hp-Eh for help-gnu-emacs@gnu.org; Fri, 30 Aug 2024 10:59:47 -0400 Original-Received: by mail-qt1-x843.google.com with SMTP id d75a77b69052e-456774a0fe7so10326491cf.0 for ; Fri, 30 Aug 2024 07:59:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725029983; x=1725634783; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=j9xgkD4tKHTDJgMWD+6/oKHNBeGbToWMmLaQkskDa3g=; b=T1D33APaJYk5GOvboO5TmdduTCg796c03jvzaUF7Iyu18X1RRte7iQfmgOL5seqAFf p+9g8YXF3kRznNdV6b5WyShm+qRy+K5J+doIQxf1jUr3dri22ID9/bXa0hOtW30BGdO3 U/T46IlJOM8mhYic8/LO8A0ss712MyhzYAotVRmsN960HhzVRH1yu+rBO7bR/OnIJXdj mlnLWG+BgTg10dT7vG1CwiZgpwtTXgGdO8qRH4qwWMxH88uW6rD017cWJvy3qLhGYdZw BUoIo9LIm5Btl+/db0eMfwucQXMtrtjlUJRtWHREVp/BPToW+WRvFEo9P7/IdQZRAUCm ZB9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725029983; x=1725634783; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=j9xgkD4tKHTDJgMWD+6/oKHNBeGbToWMmLaQkskDa3g=; b=fQ6PssDMDnwfBsptDxx/rbGQbdemePGSUjsd8aXalu0FOPWBVXYPA3lIH8UcBmA4A8 6Qv689BntoAfcys817yLMa2mAmyqSMLqLDFEW9P2hQW+JuUZQbPyPJH/p/aXLKM5thRy vbs+29kmVMLFcv+jvxS/8KMQ1ZwnEVbq/5saYpg6+etC0wCTiLf4VQ9GBtCbwNRP38YW 06s8uc1ZnCn+pQhttjbXgDY3EzYfM7FOQQtOeuZ4tedL0FPvBB72KsI4cR4YYKtkC6le t9hEcVA9ytOek8XM8ugG6SQ9grkQPk7yXHXbcWco6z6At3j/zrRo71AU0AGo9eXXo2L2 KWTQ== X-Gm-Message-State: AOJu0YznXFIYRKToIxXflolls4ewy5G5c8s1n4scMNzAGZPVDjZnq+GV yHhfqztpL0qiVSZXoRFl9W135fKU8pE/wfr/SuuihKbXlnw30T+fuDEQ49Qv X-Google-Smtp-Source: AGHT+IFkGWpkOKSH3jL+eTPF+24+NH+fo4ftr2NapZKFaPXjYuPQll/nxRe0DdwukBUNVO89O2TCFQ== X-Received: by 2002:a05:622a:a13:b0:456:847d:47a3 with SMTP id d75a77b69052e-456847d4d1cmr66686971cf.34.1725029982966; Fri, 30 Aug 2024 07:59:42 -0700 (PDT) Original-Received: from gnus ([65.94.70.53]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-45682d66e30sm14432961cf.61.2024.08.30.07.59.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 07:59:42 -0700 (PDT) In-Reply-To: <87cylq8cvh.fsf@rclayton.org> (R. Clayton's message of "Fri, 30 Aug 2024 07:32:34 -0400") Received-SPF: pass client-ip=2607:f8b0:4864:20::843; envelope-from=suhailsingh247@gmail.com; helo=mail-qt1-x843.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147859 Archived-At: "R. Clayton" writes: > I'm wondering how this can happen: When it comes to understanding macro expansion, I find macrostep-expand (from the package macrostep) quite invaluable. If the value of `use-package-always-ensure' is t , use-package is behaving as expected. Keywords such as `:if' are meant to _load_ packages conditionally. As noted in the [manual]: #+begin_quote If you need to make a use-package form conditional so that the condition occurs before even =E2=80=98:ensure=E2=80=99 (*note Install package::) or= =E2=80=98:preface=E2=80=99 (*note Preface keyword::), use =E2=80=98when=E2=80=99 around the =E2=80= =98use-package=E2=80=99 form itself. For example: (when (memq window-system '(mac ns)) (use-package foo :ensure t)) #+end_quote [manual]: [[info:use-package#Conditional loading]] --=20 Suhail