Emacs and symbolic links

后端 未结 4 878
忘掉有多难
忘掉有多难 2021-01-31 07:44

Say I have a symbolic link at /home/.bashrc that points to an actual .bashrc file somewhere else: /some/other/path/.bashrc that is under a git reposito

4条回答
  •  臣服心动
    2021-01-31 08:16

    If you have a use-case like I have, where I want to access only certain files with hotkeys without asking, you can use the file-truename function which resolves all symbolic links in the file and therefor prevents the annoying question without changing the default for everything else.

    (global-set-key (kbd "") (lambda () (interactive)
      (find-file (file-truename user-init-file))))
    

提交回复
热议问题