Last edit

Summary: patch for Emacs 24


> [ Patch for Emacs 24] — after evaluating, you are done.

Patch for Emacs 24 — after evaluating, you are done.

This module is disabled by default. To enable it use M-x customize-variable RET erc-modules.

Using this module will keep the prompt line at the bottom of the window. The latest text is also at the bottom of the screen, so it’s easier to catch up after turning back to the screen.

Bug: If you use Carbon Emacs or thereabouts, using this module will probably make Emacs freeze and suck up 100% CPU time, requiring you to force quit Emacs. – JerameyCrawford
This is actually a bug in Emacs redisplay code, rather than in ERC. A fix for it is to set
erc-input-line-position to a value other than nil or -1.
E.g. do:
    (setq erc-input-line-position -2)
In your ERC customisations. See the docstring of that variable for more information.

In version 3 there is a redisplay bug. Put this in your ~/.emacs.d/.ercrc.el after you turn on scrolltobottom mode (written by GiorgosKeramidas):

;;; Replacement functions to unbreak `erc-hide-list' for ERC 5.3

(defun erc-display-buffer-list (buffer)
  "Sanitize a 'buffer' name or list, and convert to a buffer-name list."
  (cond ((bufferp buffer) (list buffer))
        ((listp buffer) buffer)
        ((processp buffer) (list (process-buffer buffer)))
        ((eq 'all buffer)
         ;; Hmm, or all of the same session server?
         (erc-buffer-list nil erc-server-process))
        ((and (eq 'active buffer) (erc-active-buffer))
         (list (erc-active-buffer)))
         (list (process-buffer erc-server-process)))
        (t (list (current-buffer)))))

(defun erc-display-message (parsed type buffer msg &rest args)
  "Display MSG in BUFFER.

ARGS, PARSED, and TYPE are used to format MSG sensibly.

See also `erc-format-message' and `erc-display-line'."
  (let ((string (if (symbolp msg)
                    (apply 'erc-format-message msg args)
    (setq string
           ((null type)
           ((listp type)
            (mapc (lambda (type)
                    (setq string
                          (erc-display-message-highlight type string)))
           ((symbolp type)
            (erc-display-message-highlight type string))))

    (if (not (erc-response-p parsed))
        (erc-display-line string buffer)
      (erc-put-text-property 0 (length string) 'erc-parsed parsed string)
      (erc-put-text-property 0 (length string) 'rear-sticky t string)
      (dolist (buf (erc-display-buffer-list buffer))
        (unless (member (erc-response.command parsed)
                        (with-current-buffer buf
          (erc-display-line string buffer))))))