From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.devel Subject: Re: "Emacs Lisp Packages" chapter in the Emacs manual Date: Sun, 10 May 2020 11:19:47 +0900 Message-ID: <11AC1ECE-C120-4CBE-93C7-6FD82AF12299@traduction-libre.org> References: <11437E00-8970-4908-A900-0438A248428D@traduction-libre.org> <75254771-9303-4982-AB60-F92AF7AC6454@traduction-libre.org> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_C5E131E8-0BA0-4B70-BD47-D0056561C6A1" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="102605"; mail-complaints-to="usenet@ciao.gmane.io" To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 10 04:20:33 2020 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 1jXbZx-000Qaa-G6 for ged-emacs-devel@m.gmane-mx.org; Sun, 10 May 2020 04:20:33 +0200 Original-Received: from localhost ([::1]:39724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXbZw-0004xf-D9 for ged-emacs-devel@m.gmane-mx.org; Sat, 09 May 2020 22:20:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXbZO-0004YH-Iw for emacs-devel@gnu.org; Sat, 09 May 2020 22:19:58 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:49639) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXbZM-0003O2-Fj for emacs-devel@gnu.org; Sat, 09 May 2020 22:19:58 -0400 X-Originating-IP: 128.53.210.217 Original-Received: from [10.0.1.13] (pl6361.ag0304.nttpc.ne.jp [128.53.210.217]) (Authenticated sender: jean.christophe.helary@traduction-libre.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 8747BC0005 for ; Sun, 10 May 2020 02:19:50 +0000 (UTC) In-Reply-To: <75254771-9303-4982-AB60-F92AF7AC6454@traduction-libre.org> X-Mailer: Apple Mail (2.3608.80.23.2.2) Received-SPF: pass client-ip=217.70.183.198; envelope-from=jean.christophe.helary@traduction-libre.org; helo=relay6-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/09 22:19:53 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:249614 Archived-At: --Apple-Mail=_C5E131E8-0BA0-4B70-BD47-D0056561C6A1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On May 10, 2020, at 1:47, Jean-Christophe Helary = wrote: >=20 >> On May 10, 2020, at 0:19, Stefan Kangas = wrote: >>=20 >> Jean-Christophe Helary >> writes: >>=20 >>> --- a/doc/emacs/package.texi >>> +++ b/doc/emacs/package.texi >>> @@ -13,6 +13,9 @@ Packages >>> separate Emacs Lisp program, sometimes including other components = such >>> as an Info manual. >>>=20 >>> + Emacs Lisp programs that are not available through this facility = can >>> +still be loaded by installing them in the Emacs Lisp @dfn{load = path}. @xref{Lisp Libraries}. >>> + >>>> @kbd{M-x list-packages} brings up a buffer named @file{*Packages*} >>> with a list of all packages. You can install or uninstall packages >>> via this buffer. @xref{Package Menu}. >>=20 >> It's a useful addition, I think, but it seems a bit backwards to add = it >> before even introducing `list-packages'. >>=20 >> I would suggest to move it further down. It could be the second to = last >> paragraph, for example. >=20 > I'm not the most qualified person to discuss location, but if people = think "install", it seems nice to tell them up front that there are 2 = ways to do that.=20 >=20 > In fact, I first thought of something like this: >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > The traditional way to install Emacs Lisp code is to install it in the = Emacs Lisp @dfn{load path}. @xref{Lisp Libraries}. >=20 > Now, Emacs includes a facility that lets you easily download and = install > @dfn{packages} that implement additional features. > ... > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D I think I have a better proposal: 1) add a pointer to the Lisp Librairies section of the manual in = package.texi 48 Emacs Lisp Packages ********************** The traditional way to install Emacs Lisp code is to install it in the Emacs Lisp "load path". *Note Lisp Libraries::. Now, Emacs includes a facility that lets you easily download and install "packages" that implement additional features. Each package is a separate Emacs Lisp program, sometimes including other components such as an Info manual. 2) add a reference to "require" in the Features section of the manual in = building.texi To automatically load code that you have installed in the load path, you can use `require' in your init file. *Note Features: (elisp)Features. For example, here's how to automatically load the features provided by file `feature.el' installed in your load path: (require 'feature) Is there a better way to give easy access to this information ? In case = the proposal above is accepted, I'm attaching the corresponding patch. Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune --Apple-Mail=_C5E131E8-0BA0-4B70-BD47-D0056561C6A1 Content-Disposition: attachment; filename=package.texi.200510.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="package.texi.200510.diff" Content-Transfer-Encoding: 7bit diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 77a0e807c2..93ff85c600 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -1558,11 +1558,18 @@ Lisp Libraries @code{help-enable-autoload} to @code{nil}. @vindex help-enable-completion-autoload -Automatic loading also occurs when completing names for + Automatic loading also occurs when completing names for @code{describe-variable} and @code{describe-function}, based on the prefix being completed. To disable this feature, change the variable @code{help-enable-completion-autoload} to @code{nil}. +@findex require + To automatically load code that you have installed in the load path, you can use @code{require} in your init file. @xref{Features,,, elisp, the Emacs Lisp Reference Manual}. For example, here's how to automatically load the features provided by file @file{feature.el} installed in your load path: + +@example +(require 'feature) +@end example + @node Lisp Eval @section Evaluating Emacs Lisp Expressions @cindex Emacs Lisp mode diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi index db3cf317ff..8a342cc0f3 100644 --- a/doc/emacs/package.texi +++ b/doc/emacs/package.texi @@ -7,8 +7,9 @@ Packages @cindex Package @cindex Emacs Lisp package archive @cindex Package archive +The traditional way to install Emacs Lisp code is to install it in the Emacs Lisp @dfn{load path}. @xref{Lisp Libraries}. -Emacs includes a facility that lets you easily download and install + Now, Emacs includes a facility that lets you easily download and install @dfn{packages} that implement additional features. Each package is a separate Emacs Lisp program, sometimes including other components such as an Info manual. --Apple-Mail=_C5E131E8-0BA0-4B70-BD47-D0056561C6A1--