[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ERC top/bottom 2*blank lines
From: |
Emanuel Berg |
Subject: |
Re: ERC top/bottom 2*blank lines |
Date: |
Tue, 22 Dec 2020 18:50:13 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>> I wonder ... why does ERC have two blank lines at the top
>> and button after you go to the top/bottom of the buffer?
>>
>> Can I configure away this?
>
> [...]
>
> (setq erc-input-line-position -1)
that, with
;; (setq erc-mode-hook nil)
(defun erc-mode-hook-f ()
;; [...]
(erc-scrolltobottom-enable)
)
(add-hook 'erc-mode-hook #'erc-mode-hook-f)
works when hitting a key, true, but for
`beginnig-of-buffer'/`end-of-buffer', them need (?) to be
replaced by
(defun erc-scroll-to-top ()
(interactive)
(goto-char (point-min))
(when (and (looking-at "^$")
(re-search-forward "[[:graph:]]" (point-max) t) )
(beginning-of-line)
(recenter 0) ))
(defun erc-scroll-to-bottom ()
(interactive)
(goto-char (point-max))
(when (and (looking-at "^$")
(re-search-backward "[[:graph:]]" (point-min) t) )
(beginning-of-line)
(recenter -1) ))
and then bound to keys, I have them `C-o i' and `C-o k'... [1]
PS. gmane.emacs.erc.general seems to be dead so I cross post
this for completeness, with Followup-To: gmane.emacs.help
[1] https://dataswamp.org/~incal/emacs-init/erc-my.el
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal