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: Tue, 12 May 2020 12:50:30 +0900 Message-ID: <0DE280CA-A785-4623-98B6-7C2C5EA99A86@traduction-libre.org> References: <11437E00-8970-4908-A900-0438A248428D@traduction-libre.org> <75254771-9303-4982-AB60-F92AF7AC6454@traduction-libre.org> <11AC1ECE-C120-4CBE-93C7-6FD82AF12299@traduction-libre.org> <18BA1545-091A-454E-B459-DEB96071D048@traduction-libre.org> <4f5da1c3-1311-44ca-80f7-942d9a0537b4@default> <0BBC80E8-7A74-4DB4-8C13-AF2AAFF04B4B@traduction-libre.org> <920E43F8-B65B-4802-97D3-F64BEBF5E8B8@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=_D83ACC19-9D07-490E-A012-DE3754881E4E" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="89095"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Drew Adams , Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 12 05:51:27 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 1jYLx0-000N5Z-O0 for ged-emacs-devel@m.gmane-mx.org; Tue, 12 May 2020 05:51:26 +0200 Original-Received: from localhost ([::1]:58222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYLwz-0008Lb-Qc for ged-emacs-devel@m.gmane-mx.org; Mon, 11 May 2020 23:51:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYLwJ-0007St-8q for emacs-devel@gnu.org; Mon, 11 May 2020 23:50:43 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:53363) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYLwH-0000t9-6e for emacs-devel@gnu.org; Mon, 11 May 2020 23:50:42 -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 relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 71D832000D; Tue, 12 May 2020 03:50:34 +0000 (UTC) In-Reply-To: X-Mailer: Apple Mail (2.3608.80.23.2.2) Received-SPF: pass client-ip=217.70.183.200; envelope-from=jean.christophe.helary@traduction-libre.org; helo=relay7-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/11 23:50:38 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, 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:249936 Archived-At: --Apple-Mail=_D83ACC19-9D07-490E-A012-DE3754881E4E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On May 12, 2020, at 12:21, Stefan Monnier = wrote: >=20 >>> [ The first step is of course to make sure the file is found from >>> `load-path`. ] >>=20 >> Like ask the user to manually do M-x load-library and see the result = ? >=20 > Traditionally it was done either by telling the user to >=20 > put this file somewhere in your `load-path` >=20 > or to >=20 > (add-to-list 'load-path "/where/ever/you/put/that/file/") Excellent :) >> Well, actually all this started because I wanted to install Drew's >> help-fns+.el and it happens that Drew uses "require". >=20 > Then follow Drew's suggestion, since that's how he designed his = library. >=20 >> So, in case I want to add a similar feature set, would 'require be = too much ? >=20 > I know nothing about help-fns+ so I can't answer that. > But nowadays libraries should be designed for the case where they're > installed by a tool like package.el and in such a case, the user = should > almost never need to `require` the package. >=20 >> Would (autoload 'help-fns+) be sufficient ? >=20 > `autoload` takes 2 args, the first being a function name and the = second > the file in which that function is to be found. >=20 >> Keep in mind that this addition is for users who know a minimal = subset of >> Emacs lisp (enough to play with their init file), not for authors. >=20 > Those users should *never* need to do that: either they install via > something like package.el Which is already covered in the manual, so there is no need to consider = that case. > or they follow steps in the package's installation instructions. Ok, I guess that's the information I was looking for :) Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune --Apple-Mail=_D83ACC19-9D07-490E-A012-DE3754881E4E Content-Disposition: attachment; filename=package.texi.200512.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="package.texi.200512.diff" Content-Transfer-Encoding: 7bit diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 77a0e807c2..79cedb59a5 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -1558,7 +1558,7 @@ 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}. diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi index db3cf317ff..aa7c7e35bb 100644 --- a/doc/emacs/package.texi +++ b/doc/emacs/package.texi @@ -7,8 +7,12 @@ Packages @cindex Package @cindex Emacs Lisp package archive @cindex Package archive +The traditional way to install Emacs Lisp code is to either install it +in the Emacs Lisp @dfn{load path} or to add the path to the code to +the load path list. @xref{Lisp Libraries}. Then, the user should +follow the instructions given by the code author. -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=_D83ACC19-9D07-490E-A012-DE3754881E4E--