question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

emacs autosave files cause builds to fail

See original GitHub issue

Description

gatsby build will hang indefinitely at the “Source and transform nodes” step when there is an emacs autosave file for a md file imported using gatsby-source-filesystem. Emacs autosave files have the same filename as the edited file but prefixed with “.#”. I believe ignoring hidden files

Steps to reproduce

edit a markdown file imported by gatsby-source-filesystem in emacs wait and allow emacs to create an autosave file attempt to build the project observe that build hangs indefinitely

Environment

System: OS: Linux 4.20 Manjaro Linux undefined CPU: (8) x64 Intel® Core™ i7-4870HQ CPU @ 2.50GHz Shell: 5.7.1 - /usr/bin/zsh Binaries: Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node npm: 6.10.1 - ~/.nvm/versions/node/v10.16.0/bin/npm Languages: Python: 3.7.3 - /usr/bin/python npmGlobalPackages: gatsby: 2.13.35

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9

github_iconTop GitHub Comments

7reactions
ianyepancommented, May 31, 2020

[Solved]

Turns out that those aren’t auto-saved temp files, but rather symbolic link files.

If you’re using Emacs and those .# files trouble your development flow, try this option in your init.el (Emacs configuration file):

(setq create-lockfiles nil)

This will disable the creation of symlink files.

References:

3reactions
mojobnicholscommented, Aug 7, 2019

Issue #2347 was closed with out a fix. It seems that someone suggested having file watcher ignore the editor files. I’d recommend the opposite create a default list of file extensions that gatsby watches (.css, .js, .xml, .img etc, etc) Then if you need to create some exception you can add it to the list.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Auto-save file not current". How do I force Emacs to recover it?
The error message you get is because the auto-save file is not newer than the original file. Emacs refuses to use an auto-save...
Read more >
Emacs auto-save: Why are files not stored in the correct folder?
If the optional element UNIQUIFY is non-nil, the auto-save file name is constructed by taking the directory part of the replaced file-name, ...
Read more >
spacemacs and "file name too long" error on auto-save
I reorganized some of the folders on my computer, in an attempt to get rid of old stuff and organize useful stuff. So...
Read more >
GNU Emacs Lisp Reference Manual - Backups and Auto-Saving
Backup files and auto-save files are two methods by which Emacs tries to protect the user from the consequences of crashes or of...
Read more >
After a Crash (GNU Emacs Manual)
If Emacs or the computer crashes, you can recover the files you were editing at the time of the crash from their auto-save...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found