eguneys eguneys -4 years ago 100
Node.js Question

file watch, no such file or directory for emacs autosave file

gulp watches files for livereload,

gulp.watch([
'/templates/**/*.hbs'
], ['build-dev-templates']);


but when i edit on emacs, it creates autosave files like
.#index.hbs
and
Gaze
gives this error:

Error: ENOENT, no such file or directory 'app/client/templates/.#index.hbs'


How do i get rid of this?

Answer Source

One option would be to move your backup files elsewhere. I use this snippet from What the .emacs.d!? to put all backup files into ~/.emacs.d/backups:

(setq backup-directory-alist
      `(("." . ,(expand-file-name
                 (concat user-emacs-directory "backups")))))

You should be able to use a similar technique for moving auto-save files. Something like this should work:

(setq auto-save-file-name-transforms
          `((".*" ,(expand-file-name
                    (concat user-emacs-directory "auto-save")) t)))
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download