From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Krystian Samp Newsgroups: gmane.emacs.bugs Subject: bug#72961: Possible documentation improvement: Clarification for package installation Date: Wed, 4 Sep 2024 23:52:15 +0200 Message-ID: References: <86r0a28dpd.fsf@gnu.org> <87ikvdgabf.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="00000000000098de4a06215230e0" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19967"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72961@debbugs.gnu.org, Eli Zaretskii To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 05 06:36:17 2024 Return-path: Envelope-to: geb-bug-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 1sm4ED-00051P-EF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Sep 2024 06:36:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sm4Dv-000132-OO; Thu, 05 Sep 2024 00:35:59 -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 1sm4Du-00012m-DS for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 00:35:58 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sm4Du-0004Oa-0e for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 00:35:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=NX0zakMRWS3tCQONqR2TJEOLiC+NGf25ryCKCV00IBw=; b=bQVe31aWAdwoEI35F77CDMR5WNzBy1dlEdl56AwZ0i50vFeIEqzdnkwQke/f3XjJ8+/+Ig1UDDXsnkxmfD/BG1fRBIoKbNwStWUyx6XWMq06mPuBOfzt1J006pLYyDiSvfDWDcGtEADJt8m6bBi+TyxvhPI7uQOy1dZyq4QZRW1p1gMoVtjGZIsPUyE0XUZzWDDLi99IBR34dFQm4XGtw/sfDoVe+nO43wBm4XmEtcmTHNVRSIL7/lYabF7Vv/XJcoJ0z09QnzmtGcfu4FBtK5ft0A50SmevzPRVYCqxugJYgMzMBbvBcf4+FUhB4P9tfOPFjklVDY5qYr365tN5cA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sm4Ew-00021d-Fk for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 00:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Krystian Samp Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Sep 2024 04:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72961 X-GNU-PR-Package: emacs Original-Received: via spool by 72961-submit@debbugs.gnu.org id=B72961.17255110017713 (code B ref 72961); Thu, 05 Sep 2024 04:37:02 +0000 Original-Received: (at 72961) by debbugs.gnu.org; 5 Sep 2024 04:36:41 +0000 Original-Received: from localhost ([127.0.0.1]:35860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sm4Ea-00020K-I5 for submit@debbugs.gnu.org; Thu, 05 Sep 2024 00:36:41 -0400 Original-Received: from mail-pf1-f179.google.com ([209.85.210.179]:42461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slxxV-0001XQ-4a for 72961@debbugs.gnu.org; Wed, 04 Sep 2024 17:54:38 -0400 Original-Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-7176645e440so66387b3a.1 for <72961@debbugs.gnu.org>; Wed, 04 Sep 2024 14:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725486747; x=1726091547; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pWILSVqNV+/SO6JAre4CQcKEdpzLAc8ewTejUAsdB94=; b=LXGxgkxBCr+ELkj/7OLsg5OGc2Hcr9Hn/MfnfCcCxgw8IOipHxtcIapWorMPyP8MLj UIoqOUMKcTZSCRbhi3o3fDnBUkmpED9rlF823fSVGa2hfqqYjoxG1q/ZMpF13FVx1OFf AbOAgG3QXhjd+1IQxgoddf7Ud6BnDlK+n3DCUI/52FmvpYcgAUHh2W62ySrZ5MXtFG43 fZpjQaYFrNHHm/rCfF1XfehCiepzB/Pzg5dWLhsiYuyJeX8ajQz64F3YE4S4IZS/IWYu Nws4CVA7FfEqs+OHMhVPDnQx0Uw/6001HqexFFrexLFHIAvIYJIzJmQriZo8tr0DAEjd Ncug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725486747; x=1726091547; 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=pWILSVqNV+/SO6JAre4CQcKEdpzLAc8ewTejUAsdB94=; b=qH5BJeGKQqn8idl7VzOh1TYx0peoMuqodnGVktIbXtSUs8yb9kjciPkTHAF6jiRuIb jc54wo8GGLTLIoV6No237HaAqJ0aIMMBuuTUpMu544XBpgMrX95JirCl+OoeVRJgCVST z5/yc2DYgSpU/XfvGhRvQ7aDLdWc+gclQszh4iEksCe4mDaoGdgHZzqHQgBWGEd2j6L3 WJkijIigq8RIOjuSb77y1r998oYSD5nhmDPcYozBBj6vUtCp7X1o4iGMYKs/kti0SmJc BTzn8vDheX/mhHT6U+llKgC6S8zieVF9AOp5XIuVmWMZJYXrsogwNxANQCDPSIDarKtV Wzkg== X-Forwarded-Encrypted: i=1; AJvYcCVXRSaQh1rT5wVOTeT8OmHTXwbFidlCjZ0b+I3GPw2m1lsVza73q2xjyMYYxjiQ2KEsrps6Zg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzRLVYwNwnI3wFDdJ1HNeCvKsjHE8SceY/26h1TZ7lMdpI3cD54 W13Jq7F9+ttXl6MpEsPXezfJj4JD5YeAPOx0S9TTKaJt9daO72QFE+gfqADKKwthSsQaI5QNdJI BiIeLa+6YHTg2h8ok1aZoKfv+Zbg= X-Google-Smtp-Source: AGHT+IHyi913bAoUdHDBdaS7+aoge5nlYYxSsSjJF7CH3XbMezhC4b+1yOePYebSB5ReAn8XNOqBCf8bfZRRRhc96HE= X-Received: by 2002:aa7:9185:0:b0:70e:cf99:adc7 with SMTP id d2e1a72fcca58-7177a91f814mr5386952b3a.3.1725486746614; Wed, 04 Sep 2024 14:52:26 -0700 (PDT) In-Reply-To: <87ikvdgabf.fsf@posteo.net> X-Mailman-Approved-At: Thu, 05 Sep 2024 00:36:39 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291222 Archived-At: --00000000000098de4a06215230e0 Content-Type: multipart/alternative; boundary="00000000000098de4806215230de" --00000000000098de4806215230de Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Also note that the preceding paragraph in 28.8 talks about the need to 'load' or 'require' libraries that you want to make available at startup. So reading in the very next paragraph: "[...] and also writes the necessary initialization code into your init files" sets the expectation that package-install will write 'load' or 'require' into the init file. On the other hand in another part of the manual (49.3): "Installed packages are automatically made available by Emacs in all subsequent sessions". This is simpler and more accurate imho, and doesn't suggest the init files are altered in any way. I'd propose to make a simple change in 28.8 that is consistent with 49.3: Original: "Note that installing a package using package-install (see Package Installation) takes care of placing the package's Lisp files in a directory where Emacs will find it, and also writes the necessary initialization code into your init files, making the above manual customizations unnecessary" Proposed: =E2=80=9CNote that installing a package using package-install (see Package Installation) takes care of placing the package=E2=80=99s Lisp files in a d= irectory where Emacs will find it. Installed packages are automatically made available by Emacs in all subsequent sessions, making the above manual customizations unnecessary.=E2=80=9D Does this make sense? Thanks, Krystian On Mon, 2 Sept 2024 at 20:49, Philip Kaludercic wrote: > Eli Zaretskii writes: > > >> From: Krystian Samp > >> Date: Mon, 2 Sep 2024 12:41:11 +0200 > >> > >> I was reading the section on "Libraries of Lisp Code for Emacs" > (section 28.8) in the Emacs manual, and I > >> encountered a passage that seems a bit unclear. The text suggests that > when using package-install, Emacs > >> might automatically add initialization code to the init.el file, which > doesn=E2=80=99t seem to match my experience. > >> > >> Specifically, the manual states: "Installing a package using > package-install takes care of placing the package=E2=80=99s > >> Lisp files in a directory where Emacs will find it, and also writes th= e > necessary initialization code into your init > >> files [...]" > >> > >> From my understanding, package-install does not modify init.el > directly, which is how I interpret the > >> documentation above. Instead, Emacs calls package-initialize which > makes the installed packages available, > >> automatically. > >> > >> I want to check if this is a valid concern / interpretation that > warrants a documentation change. If so, I'll be > >> happy to create a patch. > > > > Is package-quickstart.el considered "init file" or not? > > > > And I add Philip to this discussion, as he knows the package.el code > > better than I do. > > I believe the documentation here is just outdated. From NEWS.27: > > ** Installed packages are now activated *before* loading the init file. > As a result of this change, it is no longer necessary to call > 'package-initialize' in your init file. > > Previously, a call to 'package-initialize' was automatically inserted > into the init file when Emacs was started. This call can now safely > be removed. > > Otherwise it might also refer to the fact that user option > `package-selected-packages' is saved, which by default will be stored in > the default Emacs configuration file. > > -- > Philip Kaludercic on peregrine > --00000000000098de4806215230de Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Also note that the preceding paragraph in 28.8 talks = about the need to 'load' or 'require' libraries that you wa= nt to make available at startup. So reading in the very next paragraph: &qu= ot;[...] and also writes the necessary initialization code into your init f= iles" sets the expectation that package-install will write 'load&#= 39; or 'require' into the init file.

On th= e other hand in another part of the manual (49.3): "Installed packages= are automatically made available by Emacs in all subsequent sessions"= . This is simpler and more accurate imho, and doesn't suggest the init = files are altered in any way.

I'd propose to m= ake a simple change in 28.8 that is consistent with 49.3:

Original:
"Note that installing a package using pack= age-install (see Package Installation) takes care of placing the package= 9;s Lisp files in a directory where Emacs will find it, and also writes the= necessary initialization code into your init files, making the above manua= l customizations unnecessary"

Proposed:
=

=E2= =80=9CNote that installing a package using package-install (see Package Ins= tallation) takes care of placing the package=E2=80=99s Lisp files in a dire= ctory where Emacs will find it. Installed packages are automatically made a= vailable by Emacs in all subsequent sessions, making the above manual custo= mizations unnecessary.=E2=80=9D


Does this make= sense?

Thanks,
Krystian

<= /div>

On Mon, 2 Sept 2024 at 20:49, Philip Kaludercic <philipk@posteo.net> wrote:
Eli Zaretskii <eliz@gnu.org> writes:

>> From: Krystian Samp <samp.krystian@gmail.com>
>> Date: Mon, 2 Sep 2024 12:41:11 +0200
>>
>> I was reading the section on "Libraries of Lisp Code for Emac= s" (section 28.8) in the Emacs manual, and I
>> encountered a passage that seems a bit unclear. The text suggests = that when using package-install, Emacs
>> might automatically add initialization code to the init.el file, w= hich doesn=E2=80=99t seem to match my experience.
>>
>> Specifically, the manual states: "Installing a package using = package-install takes care of placing the package=E2=80=99s
>> Lisp files in a directory where Emacs will find it, and also write= s the necessary initialization code into your init
>> files [...]"
>>
>> From my understanding, package-install does not modify init.el dir= ectly, which is how I interpret the
>> documentation above. Instead, Emacs calls package-initialize which= makes the installed packages available,
>> automatically.
>>
>> I want to check if this is a valid concern / interpretation that w= arrants a documentation change. If so, I'll be
>> happy to create a patch.
>
> Is package-quickstart.el considered "init file" or not?
>
> And I add Philip to this discussion, as he knows the package.el code > better than I do.

I believe the documentation here is just outdated.=C2=A0 From NEWS.27:

=C2=A0 ** Installed packages are now activated *before* loading the init fi= le.
=C2=A0 As a result of this change, it is no longer necessary to call
=C2=A0 'package-initialize' in your init file.

=C2=A0 Previously, a call to 'package-initialize' was automatically= inserted
=C2=A0 into the init file when Emacs was started.=C2=A0 This call can now s= afely
=C2=A0 be removed.

Otherwise it might also refer to the fact that user option
`package-selected-packages' is saved, which by default will be stored i= n
the default Emacs configuration file.

--
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Philip Kaludercic on peregrine
--00000000000098de4806215230de-- --00000000000098de4a06215230e0 Content-Type: application/octet-stream; name="0001-Fix-package-install-documentation-on-initialization-.patch" Content-Disposition: attachment; filename="0001-Fix-package-install-documentation-on-initialization-.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_m0oe600m0 RnJvbSAwZjZhZDVjNzVhN2I5ZTFlY2Y2YmNmZmYxMTM5YzkyZjFhZDM4MGQ1IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBLcnlzdGlhbiBTYW1wIDxzYW1wLmtyeXN0aWFuQGdtYWlsLmNv bT4KRGF0ZTogV2VkLCA0IFNlcCAyMDI0IDIzOjQ3OjUyICswMjAwClN1YmplY3Q6IFtQQVRDSF0g Rml4IHBhY2thZ2UtaW5zdGFsbCBkb2N1bWVudGF0aW9uIG9uIGluaXRpYWxpemF0aW9uIGJlaGF2 aW9yCgotLS0KIGRvYy9lbWFjcy9idWlsZGluZy50ZXhpIHwgNiArKystLS0KIDEgZmlsZSBjaGFu Z2VkLCAzIGluc2VydGlvbnMoKyksIDMgZGVsZXR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