2

When listing ELPA packages (Mac running Emacs 26.1), I see two status types that beg questions: dependency and incompat.

A dependency package does get automagically loaded but it also may be removed via M-x package-autoremove as there appears to be a high correlation between dependency packages and those offered up for removal by package-autoremove. This does not seem right to me.

It strikes me that an incompat package is bad thing and that it should be removed, but I do not see an easy way to do this so maybe I have this one wrong.

pajato0
  • 399
  • 1
  • 8
  • Regarding your edit, see my updated answer; it's normal for packages targeted by autoremove to be dependency packages. – Tyler Jul 16 '18 at 20:06

1 Answers1

2

Regarding 'dependency', I believe this refers to a package that is required by another package. From the manual, (emacs) Package Installation[1].

A package may “require” certain other packages to be installed, because it relies on functionality provided by them. When Emacs installs such a package, it also automatically downloads and installs any required package that is not already installed. (If a required package is somehow unavailable, Emacs signals an error and stops installation.) A package’s requirements list is shown in its help buffer.

Note that you can see which packages 'require' a package by opening it's description. That is, with point/the cursor on the package in the package list, type '?':

with-editor is a dependency package.

Status: Installed in ‘with-editor-20180414.757/’ (unsigned).
Version: 20180414.757
Summary: Use the Emacsclient as $EDITOR
Requires: emacs-24.4, async-1.9
Required by: magit-20180515.304, git-commit-20180411.1649

It is to be expected that dependency packages are frequently targeted by autoremove. From the help for package-autoremove (accessed via C-h f package-autoremove):

Remove packages that are no more needed.

Packages that are no more needed by other packages in ‘package-selected-packages’ and their dependencies will be deleted.

Meaning that once all the packages that depend on a package that was installed as a dependency are removed, you want Emacs to automatically remove that package too (or at least make it possible to do so via package-autoremove). Indeed, packages that you deliberately install (i.e., not dependencies) will rarely, if ever, be removed by package-autoremove.

I don't see anything in the manual about 'incompatible' packages, but by opening the description buffer for a package I have installed that is listed as 'incompatible' (show-marks in this case), I find:

show-marks is an incompatible package.

Status: Incompatible because it depends on uninstallable packages.

Perhaps there are different reasons for a package to be 'incompatible'; I would check the description for the file to be sure. And yes, it's probably best to delete 'incompatible' packages to ensure you don't run into problems with the missing dependencies. On the other hand, I have no idea how long show-marks has been incompatible, but it hasn't given me any trouble yet.

[1] You can find this manual page via C-h i m emacs <RETURN> m Package Installation <RETURN>. That is, open the info system, C-h i, select the emacs menu node, m emacs, then select the Package Installation node, m Package Installation.

Tyler
  • 21,719
  • 1
  • 52
  • 92
  • 1
    Apparently not all packages with a *dependency* status supply the "Required by" attribute, much to my chagrin. That matters less now that I know that *dependency" packages do actually get added to the load-path variable. – pajato0 Jul 16 '18 at 18:40
  • I wouldn't expect the 'required' package to list all the packages that require it - how would you know who else might require your code? More likely Emacs auto-generates the 'required-by' attribute during installation. If it's not filled in, perhaps something went (mildly) wrong during installation. – Tyler Jul 16 '18 at 18:46