emacs29 新增一项 blinking cursor 设置

emacs 29 在某些场景下使用 kill-ring-save 时,当前 active 的 region 会闪烁一下,在 TUI 下的表现是 corsor 移动到 region 另一端再移动回来。

这个行为是由 copy-region-blink-predicate 控制的,这里直接复制文档:

copy-region-blink-predicate is a variable defined in ‘simple.el’.

Its value is ‘region-indistinguishable-p’

Whether the cursor must be blinked after a copy.
When this condition holds, and the copied region fits in the
current window, ‘kill-ring-save’ will blink the cursor between
point and mark for ‘copy-region-blink-delay’ seconds.

region-indistinguishable-p 是:

Whether the current region is not denoted visually.
This holds when the region is inactive, or when the ‘region’ face
cannot be distinguished from the ‘default’ face.

这个行为看起来很有用但是实际使用起来效果一般。因为我的编辑方案是 meow,region 的状态一般都在我的预期内,这个额外的提醒反而有点多余和影响心情。

可以通过

(setq copy-region-blink-delay 0)

来关闭复制 region 时可能发生的闪烁。

2 个赞

还有一个类似的选项 delete-pair-blink-delay