gpt4 book ai didi

emacs - 阻止 emacs erc 重新居中

转载 作者:行者123 更新时间:2023-12-01 12:43:13 24 4
gpt4 key购买 nike

Emacs erc 保持重新居中。因此很难跟上小缓冲区中的对话。

我尝试了以下方法,但似乎都不起作用...

(erc-scrolltobottom-mode)

(require 'erc-goodies)

(setq erc-input-line-position -1)
(erc-add-scroll-to-bottom)

(add-hook 'erc-mode-hook 'erc-add-scroll-to-bottom)
(add-hook 'erc-insert-post-hook 'erc-scroll-to-bottom)

有没有办法让 erc 不重新居中?

最佳答案

问题是 Emacs(而不是 erc)每次都尝试重新居中屏幕,光标移出可见部分。请参阅 scroll-conservatively(C-hvscroll-conservativelyRET) 的文档字符串

Scroll up to this many lines, to bring point back on screen. If point moves off-screen, redisplay will scroll by up to `scroll-conservatively' lines in order to bring point just barely onto the screen again. If that cannot be done, then redisplay recenters point as usual.

If the value is greater than 100, redisplay will never recenter point, but will always scroll just enough text to bring point into view, even if you move far away.

A value of zero means always recenter point if it moves off screen.

所以在 erc-mode-hook 中设置 scroll-conservatively 可能会成功

(add-to-list 'erc-mode-hook (lambda ()
(set (make-local-variable 'scroll-conservatively) 100)))

其实有很多方法可以达到你想要的效果。看看this section Emacs 手册的

关于emacs - 阻止 emacs erc 重新居中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22310357/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com