9

After quite some hacking I now longer get a warning from a package, did I have success? How do I list all loaded packages? (NOT INSTALLED, installation was not the problem, loading was, eg require).

Jappie Kerk
  • 227
  • 2
  • 5
  • 4
    What does C-h v load-history tell you? – Drew Aug 28 '18 at 14:00
  • I think your terminology is a bit off: an Emacs Lisp file can be loaded, a feature can be required, and a package can be activated. A single package can consist of many files and provide many features. – Omar Aug 31 '18 at 21:25

4 Answers4

5

As far as I remember, the variable package-activated-list is what you are looking for.

Source: A Reddit thread (retrieved today, 2018-08-28)

Drew
  • 77,472
  • 10
  • 114
  • 243
Anderson Torres
  • 260
  • 2
  • 8
  • that function doesn't exist in my emacs, ironic though, that thread you linked is what I'm building right now: https://github.com/jappeace/linux-config/blob/master/emacs.nix Almost perfectly reproducible (cause nix). – Jappie Kerk Aug 28 '18 at 13:19
  • 4
    @JappieKerk It's a variable, not a function. – Omar Aug 31 '18 at 21:23
2

I personally use Paradox package manager. With paradox loaded, M-x paradox-list-packages shows new, available, installed, built-in, obsolete and incompatible packages. Just scroll through the list to see what's up.

Additionally, Paradox is a really slick package manager, allowing you to upgrade available packages, delete packages that have been installed and many, many more useful tasks.

TimWirtjes
  • 29
  • 2
  • 1
    You might want to add a link to Paradox, for reference. – Drew Aug 30 '18 at 21:21
  • The question is about loaded packages, isn't it? Or all installed are loaded? But that probably also holds with the builtin package manager. Although I'm not sure how they will react if you move some folder. – x-yuri Sep 03 '21 at 20:18
2

use-package users may set (setq use-package-compute-statistics t) enables one to run M-x use-package-report to provide output similar to:

Package                   Status        Last Event              Time
org-ref                   Initialized   2022-01-28 Fri 14:27    0.01
ox-gfm                    Declared      2022-01-28 Fri 14:01    0.00
ob-restclient             Configured    2022-01-28 Fri 14:27    0.00

ref: https://github.com/jwiegley/use-package#gathering-statistics

As a useful aside, Omar's comment led me to C-h v features providing a list of loaded features which is roughly equivalent to a superset of the loaded packages, as most packages use a provide function.

glallen
  • 151
  • 1
  • 7
0

From the "require" help:

require is a built-in function in ‘C source code’. ... If FEATURE is not a member of the list ‘features’, then the feature is not loaded; so load the file FILENAME.

So look in the global list "features".

mobatemacs
  • 101
  • 1
  • 4