all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Jean-Christophe Helary
	<jean.christophe.helary@traduction-libre.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: RE: "Emacs Lisp Packages" chapter in the Emacs manual
Date: Tue, 12 May 2020 08:46:42 -0700 (PDT)	[thread overview]
Message-ID: <10b99f72-5700-4563-9dac-beae0d5b78a7@default> (raw)
In-Reply-To: <920E43F8-B65B-4802-97D3-F64BEBF5E8B8@traduction-libre.org>

> > If the file is needed simply because the user decided to split their
> > `.emacs` file into several separate files, then `load` (or `require`)
> > is probably fine.  That is the case where the file is a configuration
> > file, i.e. loading it changes Emacs's behavior.
> >
> > If OTOH that other file is a package/library which provides a
> > particular feature (in which case, loading the file *should not*
> > change Emacs's behavior), then usually what should be done is add a
> > few autoload`s to load the file on-demand.
> 
> Well, actually all this started because I wanted to install
> Drew's help-fns+.el and it happens that Drew uses "require".

Here's a half-hearted excuse/explanation.

Loading help-fns+.el is a user (or other-library) choice.
And yes, loading it does change behavior - that's the aim.
It's not a normal library, in that sense.  Conventionally,
loading a library should not change behavior.  Mea culpa.

No, the changes are not optional (e.g., the different
behavior is not provided by a minor mode).  It's meant to,
in effect, _replace_ some of what help-fns.el does, without
replacing all of its code.  Think patch, if you like.
After loading it, you have, in a way, patched some of
help-fns.el.

Two of the `require's are soft requires: no error if not
found.  Again, a user choice: if those libraries are not
present in `load-path' then nothing happens.  They're not
really required.

Two of the `require's are hard: help-fns.el, wid-edit.el.

Yes, this way of doing things doesn't perfectly respect
the coding guidelines.  But hopefully the Commentary makes
clear that the library changes some behavior.  For example,
it points out `describe-*' commands that it redefines.

> So, in case I want to add a similar feature set, would
> 'require be too much ? Would (autoload 'help-fns+) be
> sufficient ?
> 
> When I have the information about this, I think I can
> make a satisfactory patch to the manual :)
> 
> 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.



  parent reply	other threads:[~2020-05-12 15:46 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-09 15:02 "Emacs Lisp Packages" chapter in the Emacs manual Jean-Christophe Helary
2020-05-09 15:19 ` Stefan Kangas
2020-05-09 16:47   ` Jean-Christophe Helary
2020-05-10  2:19     ` Jean-Christophe Helary
2020-05-10 14:17       ` Stefan Monnier
2020-05-10 15:05         ` Jean-Christophe Helary
2020-05-10 16:49           ` Stefan Monnier
2020-05-10 17:13             ` Jean-Christophe Helary
2020-05-10 19:28               ` Drew Adams
2020-05-11  1:02                 ` Jean-Christophe Helary
2020-05-10 19:35               ` Stefan Monnier
2020-05-11  1:08                 ` Jean-Christophe Helary
2020-05-11  1:51                   ` Drew Adams
2020-05-11  3:26                     ` Stefan Monnier
2020-05-11  4:23                       ` Drew Adams
2020-05-11  4:40                         ` Stefan Monnier
2020-05-11  6:57                           ` Jean-Christophe Helary
2020-05-11 15:09                             ` Stefan Monnier
2020-05-11 15:23                               ` Drew Adams
2020-05-12  0:59                               ` Jean-Christophe Helary
2020-05-12  3:21                                 ` Stefan Monnier
2020-05-12  3:50                                   ` Jean-Christophe Helary
2020-05-12 15:46                                     ` Drew Adams
2020-05-13  1:43                                       ` Jean-Christophe Helary
2020-05-13  2:05                                         ` Drew Adams
2020-05-13  2:27                                           ` Jean-Christophe Helary
2020-05-13  2:33                                             ` Drew Adams
2020-05-13  2:46                                         ` Stefan Monnier
2020-05-13  3:02                                           ` Jean-Christophe Helary
2020-05-16 10:23                                             ` Eli Zaretskii
2020-05-16 12:39                                               ` Jean-Christophe Helary
2020-05-16 14:38                                                 ` Eli Zaretskii
2020-05-16 15:20                                                   ` Jean-Christophe Helary
2020-05-12 15:46                                 ` Drew Adams [this message]
2020-05-11 15:13                             ` Drew Adams
2020-05-12  3:18                               ` Richard Stallman
2020-05-11  3:23                   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10b99f72-5700-4563-9dac-beae0d5b78a7@default \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=jean.christophe.helary@traduction-libre.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.