erc-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Erc-discuss] Re: Can I freeze channel buffer ?


From: Johan Bockgård
Subject: [Erc-discuss] Re: Can I freeze channel buffer ?
Date: Thu, 03 May 2007 18:55:07 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1.50 (gnu/linux)

YAMAMOTO.Taku <address@hidden> writes:

> "Freeze" means I thought is "freeze specific channel buffer stream".
> But I found stop stream by move cursor above ERC> prompt.

Indeed. I've been using the following for a long time to move the
cursor away automatically when I'm not looking at the ERC buffer.

(defun my-erc-leave-last-line (dummy)
  "Move point away from the last line in a non-selected ERC buffer.
Normally, when a new message is inserted and point is after the
ERC prompt, point is pushed down along with the prompt after the
newly inserted text. This function moves point above the prompt,
where it will stay, so that you can find the place where you left
off reading."
  (when (and (not (eq (window-buffer (selected-window))
                      (current-buffer)))
             (>= (point) erc-insert-marker))
    ;; now, move
    (deactivate-mark)
    (goto-char (erc-beg-of-input-line))
    (forward-line -1)))

(add-hook 'erc-insert-pre-hook  'my-erc-leave-last-line)

-- 
Johan Bockgård





reply via email to

[Prev in Thread] Current Thread [Next in Thread]