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 repository.
If I open /home/.bashrc
in Emacs, it prompts me with:
Symbolic link to Git-controlled source file; follow link? (y or n)
I usually type y
, since I want to edit the actual file. However, later on, if I do buffer-file-name
Emacs returns /some/other/path/.bashrc
, and not /home/.bashrc
).
I would like Emacs to remember that the way I accessed this file was through a symbolic link.
In other words, I would like my symbolic links to be transparent to Emacs. Part of the reason is because I have several Emacs macros that depend on the path of the current file, and these macros think that I am working with a file located in /some/other/path
and not in /home/
.
How can I do this?