【问题标题】:How to process some operation in some directory?如何处理某个目录中的某些操作?
【发布时间】:2012-06-19 16:31:26
【问题描述】:

这是我的尝试:

#!/Usr/bin/emacs --script
(let ((default-directory "/home/vision"))
  (shell-command "git pull;")

但它不能正常工作,我需要 git pull 进入 /home/vision 目录并在那里进行更多操作。怎么做?

【问题讨论】:

    标签: emacs lisp elisp


    【解决方案1】:

    目录路径应以斜杠结尾。

    C-hv default-directory RET 中的文档字符串实际上是明确的。

    解决这个问题应该可以解决您的问题。

    另见:

    • cd 函数。
    • file-name-as-directory 函数。

    【讨论】:

      猜你喜欢
      • 2010-09-15
      • 1970-01-01
      • 1970-01-01
      • 2010-11-21
      • 1970-01-01
      • 2013-05-15
      • 2012-03-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多