[emacs-berlin] Proposal for the next meetup

Michael Heerdegen michael_heerdegen at web.de
Thu Sep 26 14:01:39 UTC 2024


jman <emacs-berlin at city17.xyz> writes:

> 2. Preparing a local working copy of `smartparens` and satisfy its
> dependencies was easy (we just needed `dash` and the latest version
> worked fine) but I wonder if it can get trickier with other
> packages. Packages have dependencies (and transitional dependencies!)
> and I am not sure how a package "X" pins a specific version of a
> dependency "Y" and "Z". I am thinking to dependencies that are not
> Emacs built-ins. Is that a thing in the Emacs world?

On the ELPA package level we have a header field "Package-Requires"
where a library can specify a minimum version number along with the
names of required packages.  And that is more or less the complete
answer to your question.

On the Elisp level it is common to test whether a certain function is
defined (aka `fboundp') or a certain variable is `boundp'.  Sometimes
bindings of certain variables are checked, or, in very rare cases, the
code tests the signature of functions.  In the worst case you rarely see
ugly things like

  (condition-case nil
     TRY-WHETHER-SOMETHING-EVALS-WITHOUT-ERROR
   (error DO-IT-IN-A-DIFFERENT-WAY))

being done.  Sometimes it's hard to avoid such hacks.

On the package level the dependencies and required minimal package
versions are the only meta things that exist I think.  Maybe we will
have more in the future.  Requirements that go beyond must be
implemented manually on the Elisp level.  But these are exceptions that
usually only affect few large projects.  In practice these things are
actually not much of an issue.  Emacs tradition values backwards
compatibility highly and I guess because of that dependencies tend to be
less critical compared to other software.  I cannot really assess this
objectively however.


Michael.


More information about the emacs-berlin mailing list