3

How can I discover all available packages of Emacs?

So far, I was under the impression that I could find almost anything through one of these means:

  • The Emacs Manual (C-h r)
  • M-x list-packages
  • C-h p

But it does not seem enough. As an example, I came upon rcirc (an IRC client) online. I could not find it in the above resources. Is it a built-in package? How can I know? Is there a place where all features are listed?

  • rcirc is built-in. I personally use grep command-line utility and also the well known Google to figure out most of what I need to know and it turns out the Emacs manual has a section regarding the aforementioned library: gnu.org/software/emacs/manual/html_node/rcirc/… You may wish to Google how to search the built-in Emacs documentation, such as the Emacs manual and other info files for the various built-in libraries. And, other sources can be added to the list-packages feature; e.g., MELPA, Marmalade, and some others. Some is on Github. – lawlist Aug 11 '18 at 15:42
  • You could try M-x TAB TAB to see all M-x commands avaiable to you at a given moment, but you won't see everything because not all libraries that emacs comes with are loaded on start. – DoMiNeLa10 Aug 11 '18 at 16:00
  • 1
    If you use helm or ivy they allow to brows loaded functions and variables easily. – Hellseher Aug 11 '18 at 16:39
  • I wonder why list-packages lists some of the built-in packages and not others (such as rcirc). At any rate, it seems M-x describe-package does include rcirc, so maybe it's list is better for the built-in packages. You could run M-x describe-package and press TAB to popup the completions buffer to get a package list. – Omar Aug 11 at 14:44
1

I also tried to find a way to identify all packages in a way similar to list-packages, but it seems not all libraries are considered as packages so they are not listed among other packages.

There are a few ways of identify what is built-in into Emacs:

  1. Official Manuals which cover a lot of things, including manuals for various packages including RCIRC: GNU Emacs Manuals Online
  2. Browse lisp/ directory of your Emacs installation or CVS tree online (e.g., master of emacs-27), find .el files and look at the header. You can automate this stuff with grep like this (you might need to tweak this regexp):

    grep -r -E ';;;.*\.el\s+---\s+.*' <path-to-emacs-installation>/lisp
    

Source.

The output gives about 1400 lines (emacs-26.1.50), some of which are just libraries or minor modes. For example, here's the output for rcirc:

net/rcirc.el:;;; rcirc.el --- default, simple IRC client
1

The documentation about package.el should be improved (see bug #29420). I think list-packages does not list all packages available on the system but only displays manageable packages (c.f. the built-in documentation).

The idea behind package.el is to be able to download packages and install them. Packages are vers­ioned and have versioned dependencies. Furthermore, this supports built-in packages which may or may not be newer than user-specified packages. This makes it possible to upgrade Emacs and automatically disable packages which have moved from external to core. (Note though that we don't currently regis­ter any of these, so this feature does not actually work.)

On the other hand, the command describe-package seems to list packages.

M-x describe-package
?
<select the *Completion* window>
C-x h
M-w
<create-a-new-buffer>
C-y

Nevertheless, it is not a convenient command to display the available packages (but you can look at the source code or file a feature request (bug report)).

0

helm-locate-library from the Helm package gives all libraries.

It works by going through all files / directories in load-path and finding resources that can be loaded.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.