This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+chat/erc
duianto 3de7081950 Cleanup which-key names
Moved:
- ("ai" "irc") to both the `erc` and `rcirc` layers. They don't have to be
  renamed until the layers are loaded.

- ("ay" "ipython notebook") to the `ipython-notebook` layer.

- ("p$" "projects/shell")
  ("'"  "open shell")
  ("as" "shells")
  to the `shell` layer.

- The commands with keybindings from spacemacs-bootstrap/packages.el to
  spacemacs-defaults/keybindings.el.

Removed:
- ("gd" "diff") it seems to be an old group name, there's no `SPC g d` group at
  the moment.

- ("Re" "elisp") and ("Rp" "pcre") because they have moved to:
  ("xr" "regular expressions")
  ("xre" "elisp")
  ("xrp" "pcre")

- ("xm" "move") seems to be an old move text group, the current keybindings are
  `SPC x J` and `SPC x K` which opens the Move Text Transient State.

- ("b" "persp-buffers") because `SPC b` is also renamed as ("b" "buffers") which
  is more general and not persp-mode specific.
2019-02-18 14:35:00 -05:00
..
local Remove trailing whitespace from all files 2017-03-26 13:06:43 -04:00
config.el Happy New Year 2018! 2018-01-04 02:00:25 -05:00
funcs.el Make custom layout configs consistent 2018-01-09 23:01:34 -05:00
packages.el Cleanup which-key names 2019-02-18 14:35:00 -05:00
README.org documentation formatting: Wed Dec 5 03:03:03 UTC 2018 2018-12-04 22:06:14 -05:00

ERC layer

Description

Layer for ERC IRC chat.

Features:

  • Highlight nicks (using erc-hl-nicks)
  • Image inline support (using erc-image)
  • Logging to ~/.emacs.d/.cache/erc-logs and ViewLogMode for viewing logs (using erc-view-log)
  • YouTube videos Thumbnails inline (using erc-yt)
  • Social Graph for ERC messages (using erc-social-graph)
  • Optional SASL authentication via the variable erc-enable-sasl-auth (using erc-sasl)
  • D-BUS notifications via the variable erc-enable-notifications
  • Completion of Emojis using company-emoji (still needs a way of showing, either using the emoji layer or having a proper font) 👏

Install

Layer

To use this configuration layer, add it to your ~/.spacemacs. You will need to add erc to the existing dotspacemacs-configuration-layers list in this file.

OS X

Its recommended to install the terminal-notifier gem so that you get notifications via the OS X Notification Center.

Social graph

erc-social-graph needs graphviz to be installed on your system.

Disable notifications

By default D-BUS notifications are enabled, to disable them set the layer variable erc-enable-notifications to nil.

  (setq-default dotspacemacs-configuration-layers
               '((erc :variables erc-enable-notifications nil)))

Enable SASL authentication

To enable SASL authentication set the layer variable erc-enable-sasl-auth to non nil.

  (setq-default dotspacemacs-configuration-layers
               '((erc :variables erc-enable-sasl-auth t)))

Default servers

You can define the default servers in the ERC custom layout by setting the variable erc-server-list. Setting :ssl non nil will connect with erc-tls. You can also use <leader>aiD to connect to your default servers outside the custom layout.

  (setq-default dotspacemacs-configuration-layers
               '((erc :variables
                      erc-server-list
                      '(("irc.freenode.net"
                         :port "6697"
                         :ssl t
                         :nick "some-user"
                         :password "secret")
                        ("irc.myworkirc.net"
                         :port "1234"
                         :nick "some-suit"
                         :password "hunter2")))))

Security Note

You should not store your passwords in the clear in your .spacemacs, and that goes double if you version your config file. ERC allows for a number of ways of protecting this information.

First, ERC will check your ~/.authinfo.gpg, looking for lines like

  machine <irc.server.url> login <yournick> password <yourpassword> port <portnumber>

You can omit :password in this case.

You could also set an environment variable (or otherwise secret variable) and read that in :password.

Key bindings

Key binding Description
SPC a i e Starts ERC
SPC a i E Starts ERC via TLS/SSL
SPC a i i Switch to next active ERC buffer
SPC a i D Start ERC with default servers
SPC m b Switch between ERC buffers
SPC m d Interactively input a user action and send it to IRC.
SPC m D Draw Social Graph using erc-social-graph
SPC m j Join a channel, executes the /join command
SPC m n Run “/names #channel” in the current channel.
SPC m l Run the /list command
SPC m p Part from the channel
SPC m q Quit server

Note: If you want to connect securely to an IRC server, you must run erc-tls command on SPC a i E instead of the erc command.

Spacemacs Layout Support

ERC buffers are added automatically to the default layout for ERC controlled by the variable erc-spacemacs-layout-name (defaults to “@ERC”) and the default binding (“E”) is controlled by erc-spacemacs-layout-binding