11

There are a number of Emacs buffers where their names have "earmuffs", i.e. they have names like

  • *scratch*
  • *R*
  • *ESS*
  • *helm-mode-circe*

What is the significance of the earmuffs, and is there a reason for users creating buffers to use them?

Eric Brown
  • 3,222
  • 4
  • 17
  • 20
  • 8
    This is the significance: Those are buffers that would otherwise have cold ears. No one knows why, but this way they don't complain. – Drew Sep 29 '14 at 02:42

1 Answers1

14

By convention, those special names are used for buffers that are not associated directly to a file, but are used to provide the user with a view of some activity that happens in Emacs.

Amongst other things this includes:

  • emacs-lisp evaluation buffers
  • buffers for interaction with sub-processes
  • network-related buffers (IRC, messages, ...)
  • buffers that aggregate content spanning multiple files (various help systems)

Note that there is another category of buffers that's more specifically internal: those following the *pattern* (with a leading space). These buffers are of the same kind, but are deemed generally uninteresting to the user, thus are completely hidden by default in buffer listings and completions. Some debug and trace buffers fall under that category.

Sigma
  • 4,520
  • 22
  • 27
  • Some (not all) debug and trace buffers fall under that category. *Backtrace* is a debug buffer that does not. ;-) – Drew Sep 29 '14 at 02:04
  • @Drew absolutely, thanks for pointing out :) – Sigma Sep 29 '14 at 02:18
  • Is it wrong to say that earmuffs generally means, "the buffer was created by emacs, not by the user"? – Nsukami _ Sep 29 '14 at 02:51
  • 1
    @LeMeteore that line seems a bit too blurry to me: when I run M-x man or M-x irc, arguably I'm creating those buffers in the sense that they're the direct (and only) consequence of my action. – Sigma Sep 29 '14 at 03:06
  • @Sigma Indeed, it's wrong to say that. – Nsukami _ Sep 29 '14 at 03:17
  • It's also good to mention that in some Lisp dialects(like Common Lisp), you have some conventions to follow(similar as in other languages) - variables-with-asterisks are dynamic("global") variables. It's similar as convention of C or C++ macro's using UPPER_CASE_WITH_UNDERSCORE, or Java's functions or classes following CamelCase so often. – MatthewRock Sep 29 '14 at 12:54