emacs调试配置目录的技巧

emacs调试配置目录的技巧

方法1(推荐)

1
2
3
4
5
6
temp="$HOME/temp"
mkdir -p $temp
git clone https://gitee.com/emacsd/emacs.d $temp/.emacs.d

# 指在emacs启动时有效,不会影响到真实家目录
HOME=$temp emacs

方法2

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
temp="$HOME/temp"
mkdir -p $temp; cd $temp
git clone https://gitee.com/emacsd/emacs.d $temp/.emacs.d
export HOME=$temp

# 运行emacs加载克隆下来的配置
emacs

# 如果要恢复HOME变量的默认值
# 查看HOME变量的默认值可以运行export -p发现OLDPWD变量对应的默认HOME变量值
export -p
HOME=$OLDPWD
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计