2

I use use-package to require the boxquote package into my GNU Emacs 26.3 running on Ubuntu 19.10, like this:

 (use-package boxquote
   :ensure t)

In the list-packages buffer, I see the boxquote package:

boxquote           20170802.1117 dependency            Quote text with a semi-box.

Typing ? on that line, reveals:

boxquote is a dependency package.

     Status: Installed in ‘boxquote-20170802.1117/’ (unsigned).
    Version: 20170802.1117
     Commit: 7e47e0e2853bc1215739b2e28f260e9eed93b2c5
    Summary: Quote text with a semi-box.
   Requires: cl-lib-0.5
   Homepage: https://github.com/davep/boxquote.el
   Keywords: quoting 
Other versions: 20170802.1117 (melpa).

If Emacs knows it is a "dependency package", shouldn't it show Required By: or similar? I say that because another "dependency package", async does show this line in its Help buffer:

async              20200113.1745 dependency            Asynchronous processing in Emacs
...
async is a dependency package.

     Status: Installed in ‘async-20200113.1745/’ (unsigned).
    Version: 20200113.1745
    Summary: Asynchronous processing in Emacs
   Requires: emacs-24.3
Required by: magit-popup-2.13.0, with-editor-20200217.1015, magit-20200318.1224, helm-core-20200306.1417, helm-20200325.757
   Homepage: https://github.com/jwiegley/emacs-async
   Keywords: async 
Other versions: 1.9.3 (installed), 20200113.1745 (melpa), 1.9.3 (gnu).

An answer to What does dependency mean in the Status field of a package shown in list-packages says:

Packages which were explicitly installed by the user are identified as such by adding them to package-selected-packages.

Viewing the current value of package-selected-packages shows:

package-selected-packages is a variable defined in ‘package.el’.
Its value is
(org git-timemachine htmlize elpy ggtags graphql helm helm-pydoc magit magit-popup ob-async org-plus-contrib use-package)
Original value was nil

So I'm puzzled: I am using use-package so it is kind of "selected" by me, no?

Also, further searching turns up a comment to an answer to Confusing ELPA types which says:

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

"how would you know who else might require your code" is exactly what I'm after, so that I can trace it back ultimately to a require or a use-package call in my own setup, to determine if it is safe to remove. Is there something wrong with my use of use-package?

bgoodr
  • 339
  • 2
  • 12
  • Good, clear question. – Drew Mar 25 '20 at 16:12
  • My guess: the value of `package-selected-packages` needs to be persistent across Emacs sessions to work, any package outside `package-selected-packages` is *dependency*, even no other package requires it, for example, if you delete your custom.el and restart Emacs, every package is dependency? – xuchunyang Mar 25 '20 at 16:47
  • @xuchunyang If any package not listed inside `package-selected-packages` is a dependency, then something should be tracking what packages those depend upon, not leave the user guessing as to which other packages are the dependee packages. The issue is that the `list-packages` is not showing the specific packages in the `Required by` field. – bgoodr Mar 31 '20 at 13:41

0 Answers0