在 Emacs 中,不可见文本的反义词是什么?

In Emacs, what's the opposite of invisible text?

您在缓冲区中看不到不可见的文本,但如果您保存文件,它就会在那里。我想要 oppsoite -- 显示的东西,但如果我保存文件,它不会写入磁盘。

特别是我想在隐藏文本的位置显示省略号(“...”符号)。

如果相关,here's the code 我想这样做。 “fold”函数隐藏文本,“unfold”函数再次显示。折叠或展开的区域是当前行正下方的每一行,前导数 space 比当前行多。

如果您将 invisible 属性 设置为自定义交易品种 my-fold:

(put-text-property startRegion endRegion 'invisible
                   (if toHide 'my-fold nil))

你可以说my-fold隐形应该用省略号:

;; Cause use of ellipses for invisible text.
(add-to-invisibility-spec '(my-fold . t))

延伸阅读:

  • C-hig(elisp)Invisible Text
  • C-hig(elisp)Replacing Specs