esup icon indicating copy to clipboard operation
esup copied to clipboard

“Symbolic link to Git-controlled source file; follow link? (yes or no) ”

Open stapelberg opened this issue 7 years ago • 4 comments

When runing M-x esup, a new emacs instance opens a frame and prompts me “Symbolic link to Git-controlled source file; follow link? (yes or no) ”.

This is because ~/.emacs.d is a symbolic link to ~/configfiles/config/emacs/, which lives inside a Git repository.

Interestingly enough, this also happens when evaluating (esup "/home/michael/configfiles/config/emacs/init.el") in the *scratch* buffer, at which point I would have expected the prompt to no longer show as the ~/.emacs.d symlink should no longer be involved.

I found a workaround, but it’s quite a big hammer: placing (setq vc-follow-symlinks t) in /etc/emacs/site-start.el

stapelberg avatar Nov 22 '18 14:11 stapelberg

Have you tried to modify esup-user-init-file, e.g.

(setq esup-user-init-file (file-truename "~/.emacs"))

hanslovsky avatar Feb 06 '19 22:02 hanslovsky

For example, this works in my ~/.emacs:

$ realpath ~/.emacs
~/git/config/dotfiles/.emacs
(use-package esup :config (setq esup-user-init-file (file-truename "~/.emacs")))

hanslovsky avatar Feb 06 '19 22:02 hanslovsky

Interestingly I was having the same issue, but for a different reason. Following this advice fixed the "Symbolic link to..." issue for me. I haven't symlinked my init.el file. Configuring esup-user-init-file did not solve the issue.

I'm not entirely sure what's the cause, but I am using straight for package management. I do notice that almost every el file in straight/build contains symlinks to the straight/repos folder. (e.g. straight/build/ivy/ivy.el is a symlink to straight/repos/ivy/ivy.el.

RJSent avatar Nov 09 '20 17:11 RJSent

This is also quashed if the symbol 'Git does not appear in vc-handled-backends.

kanreki avatar Jul 05 '22 21:07 kanreki