当我做 C-u C-SPC
,emacs 带我到“我以前所在的地方”。后续 C-u C-SPC
新闻回到以前的地方。
这太棒了,我经常使用它。
但总是有一些事情困扰着我:标记环上唯一缺少的标记是我在第 1 位调用了这个!这就像把面包屑留在你身后,然后说“哎呀,我可能迷路了,我回去检查一下”,然后回去不会在你现在所在的地方留下面包屑!
我尝试为该函数提供建议,但我终生无法以编程方式模拟 C-SPC C-SPC
.
对于重复的键序列,如
C-SPC C-SPC
?这是手册对后者的说明(重点是我的)C-SPC runs the command set-mark-command, which is an interactive compiled Lisp function in `simple.el'.
It is bound to C-@, C-SPC.
(set-mark-command ARG)
Set the mark where point is, or jump to the mark. Setting the mark also alters the region, which is the text between point and mark; this is the closest equivalent in Emacs to what some editors call the "selection".
With no prefix argument, set the mark at point, and push the old mark position on local mark ring. Also push the old mark on global mark ring, if the previous mark was set in another buffer.
但是,当我尝试使用它(非交互式)“没有前缀参数”以“在点上设置标记”时,我收到调试器错误“错误数量的参数”..? (我意识到参数和前缀参数之间的区别)。
即使有一个哲学的、非实际的答案,我也可以。我只是想了解这里的想法是什么。
最佳答案
(push-mark)
似乎正在做你想做的事。
关于emacs:如何使用标记环?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11688952/