emacs:如何使用标记环?

标签 emacs elisp advising-functions defadvice

当我做 C-u C-SPC ,emacs 带我到“我以前所在的地方”。后续 C-u C-SPC新闻回到以前的地方。
这太棒了,我经常使用它。

但总是有一些事情困扰着我:标记环上唯一缺少的标记是我在第 1 位调用了这个!这就像把面包屑留在你身后,然后说“哎呀,我可能迷路了,我回去检查一下”,然后回去不会在你现在所在的地方留下面包屑!

我尝试为该函数提供建议,但我终生无法以编程方式模拟 C-SPC C-SPC .

  • 我如何“看到”(回声、消息、跟踪等)组合键的作用,例如“C-h k”,但是
    对于重复的键序列,如 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/

    相关文章:

    Emacs:在评论中突出显示 TODO *only*

    emacs - 如何更改特定基本模式缓冲区的变量

    emacs - Dired:对所有选定文件和目录的一次确认

    emacs - 我可以在Emacs中检测显示尺寸/分辨率吗?

    lisp - bool 值 : t vs. nil vs 1 vs -1

    elisp - 在 emacs lisp 中柯里化(Currying)一个函数

    python - Emacs defadvice on python-mode 函数

    emacs - 如何在 Emacs 中找到建议功能的 defadvice?

    emacs - 在 emacs org 模式下评估当前 header 下的所有代码块

    emacs - 配置更改以使所有搜索不区分大小写