相关疑难解决方法(0)

Emacs和符号链接

假设我有一个符号链接/home/.bashrc指向其他地方的实际.bashrc文件:/some/other/path/.bashrc这是在git存储库下.

如果我/home/.bashrc在Emacs中打开,它会提示我:

Symbolic link to Git-controlled source file; follow link? (y or n)
Run Code Online (Sandbox Code Playgroud)

我经常输入y,因为我想编辑实际的文件.但是,稍后,如果我做buffer-file-nameEmacs返回/some/other/path/.bashrc,而不是/home/.bashrc).

我希望Emacs能够记住我访问此文件的方式是通过符号链接.

换句话说,我希望我的符号链接对Emacs透明.部分原因是因为我有几个依赖于当前文件路径的Emacs宏,而这些宏认为我正在使用位于/some/other/path而不是位于的文件/home/.

我怎样才能做到这一点?

emacs

45
推荐指数
4
解决办法
9990
查看次数

标签 统计

emacs ×1