【问题标题】:Can I make an org-mode link that open a magit-status buffer to a specific directory我可以创建一个 org-mode 链接,将 magit-status 缓冲区打开到特定目录吗
【发布时间】:2016-02-11 22:57:32
【问题描述】:

我一直在使用 org-mode 创建一个快捷方式文件,这样我就可以轻松地在我经常使用的 emacs 中打开文件。但现在我希望能够轻松地为特定存储库打开一个 magit-status 缓冲区。有没有办法在 org-mode 中创建链接以打开它们?

【问题讨论】:

    标签: emacs org-mode magit


    【解决方案1】:

    您可以使用elisp 类型的链接:

    [[elisp:(magit-status "/my/repo")][magit status for my repository]]
    

    【讨论】:

    • 这太好了——有没有办法阻止它在弹出窗口中要求确认以运行 elisp 代码?
    • 您可以将org-confirm-elisp-link-not-regexp 设置为与“安全”省略号代码匹配的内容。
    • 好的 - 我不太明白,谷歌搜索并没有透露太多信息。我想我可以为此提出一个单独的问题......
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-18
    • 1970-01-01
    • 2021-06-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多