Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Ignore Emacs autosave files #270

Open
weijiangan opened this issue May 6, 2018 · 4 comments
Open

Ignore Emacs autosave files #270

weijiangan opened this issue May 6, 2018 · 4 comments

Comments

@weijiangan
Copy link

weijiangan commented May 6, 2018

Emacs creates files that precede with .# when there's autosave data and the go-langserver seems to try read these files (and fail when they're gone). I'm not sure if it causes any problems or crashes, because it appears to still work, but I imagine it is something that should be considered.

This is the error I get:

open /Users/weijiangan/go/src/concealed/gosrc/dir/.#file.go: no such file or directory (Unknown error)
@thomasf
Copy link

thomasf commented May 28, 2018

I don't let my Emacs save those files in the same directory as the original files,, There are just too many things which breaks beacuse of it..

@weijiangan
Copy link
Author

@thomasf that's more of a workaround rather than a proper solution isn't it

@thomasf
Copy link

thomasf commented May 29, 2018

Maybe so but tools should avoid writing temporary files outside of it's own data directories if possible. It's just an age old thing in emacs,, If the auto save backups were invented today they would would maybe not default to the same directory as the original file..
Having said that, (IIRC) the go tool ignores already ignores dotfiles so go-langserver should do it as well.

@thomasf
Copy link

thomasf commented May 29, 2018

But I suggest that you look into the backup-directory-alist , auto-save-file-name-transforms and auto-save-list-file-prefix (maybe others, I'm not sure, just quickly scanned my init file) to stop Emacs from storing temp files and backups in the working directory.. I moved those things over to their own tree ages ago and problems like this stopped popping up.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants