Questions tagged [auto-save]

The generic concept of automatically saving information to the disk or to a remote server, triggered by a timer or any other event inside of Emacs.

Filter by
Sorted by
Tagged with
0
votes
1answer
33 views

emacs still makes backup files even after I tell it not to [closed]

(I did restart emacs after adding config) I'm on GNU Emacs 28.0.50 (build 1, aarch64-apple-darwin20.5.0) of 2021-06-07 My config: (setq make-backup-files nil) ;disable backup (setq backup-inhibited t)...
2
votes
1answer
96 views

How to force Yes/y answer to `emacs has changed since visited or saved. Save anyway?` prompt

I am working in a git-repo using zsh shell. On the background, git-auto-fetch plugin is running in order to automatically fetch all changes from all remotes while I am working in a git-initialized ...
1
vote
1answer
15 views

How to resolve key-binding conflict between Icicles and `super-save-mode`?

I noticed that if Icicles is loaded then super-save-mode doesn't save a buffer when you switch to another buffer, though switching frames works. Icicles seems so technically advanced, yet there is no ...
0
votes
0answers
22 views

auto-saved files in my current working directory despite I have set it to C:\temp\emacsbackup

I have the following line in my .emacs to keep auto-saved files in a specific directory: (setq backup-directory-alist (quote ((".*" . "C:/temp/emacsbackup")))) And it works, I see ...
0
votes
0answers
13 views

I would like to couple two autoloaded functions, while using use-package

I would like to couple elm-format-on-save-mode and elm-preview-main, so that when I save a file it gets formatted and compiled, and the generated html get's previewed. (use-package elm-mode :config ...
0
votes
0answers
15 views

Each time I save a file, Spacemacs will try and parse my bibliography bibtex file. How can I stop that?

I use Spacemacs and it is great. But for some reason, each time I save a file--usually an org file, Spacemacs will try and parse my default bibtex file. And that file is relatively large, so it adds a ...
1
vote
0answers
49 views

Placing auto-saves in a different folder doesn't work

I am working on my personal emacs config and I wanted to keep .emacs.d/ uncluttered. So I created a temp folder inside .emacs.d/ that includes a backup directory. This part works fine. Also sending ...
0
votes
1answer
47 views

How to recover from a backup file

I can recover a file from an auto-save via M-x recover-this-file. So far so good. But how can I recover a file from it's last backup (if, of course, I have switched backups on)?
0
votes
0answers
20 views

How can I make Emacs put files named like .#filename into another directory too

I want my autosave files and backup files, e.g. #filename.org# and filename.org~ files, not to clutter the directory in my code repo that is in TypeScript. I have popped into a way to place inside ...
1
vote
1answer
54 views

quick way to restore backups

The following happens fairly often to me: I do emacs note-xyz in the terminal to create a new note I write something in the note I forget to save before logging out Now I'm left with a file #note-...
0
votes
1answer
37 views

Is it possible to auto-save a file when focus is switch to another tab?

I am not sure that this possible but I have I two splitted panes while using tmux inside iTerm2 and I am using emacs daemon. I am using iTerm's keybinding to switch between tabs. One one of them emacs ...
0
votes
2answers
329 views

How do I auto save evil buffers for specific file types?

I'm a new Doom Emacs user that can't get used to having to save files manually. I found a way to auto save evil buffers, but the problem with this approach is that I'm not able step out of vterm (an ...
1
vote
1answer
71 views

Creating backup and auto-save files that are not hidden

I use the following code for backup and auto-save files: (setq delete-old-versions -1) (setq version-control t) (setq vc-make-backup-files t) (setq backup-directory-alist `(("." . "h:/...
1
vote
0answers
78 views

How to disable tramp autosave and backups, but keep other backups/autosave?

I'd like to disable autosaves and backups when using tramp, because I neither want to save stuff from remote machines nor stuff belonging to root in my backup/autosave directory. How to do that? I ...
0
votes
1answer
70 views

Control where auto-save file are placed

Trying to store all auto-save files in a single dir, i.e. ~/.emacs.d/autosave/ I have read the emacs manual on autosave I have read the emacs wiki on placing auto save file in one place From this ...
0
votes
1answer
341 views

How do I disable savehist-autosave in emacs?

Because my emacs editor has become completely unreliable / unusable due to the frequent freezes - I'd like to disable this. But I can't figure out how? The actual issue is described by myself and ...
1
vote
1answer
40 views

How do I prevent the deletion of ~/.emacs.d/auto-save-list/.saves-PID-HOSTNAME~ files?

I recently upgraded to Emacs 26.3 from a much older version of Emacs (22.x). One of the many changes I've noticed with Emacs 26.3 is that the ~/.emacs.d/auto-save-list/.saves-PID-HOSTNAME~ files are ...
1
vote
1answer
26 views

don't allow modification if there is autosave

is it possible to disallow modification if there is an autosave version? I sometimes save a file only to find out that it has an autosave version but I am unable to recover because I saved.
1
vote
2answers
109 views

Emacs leaving behind files preceded with # despite lock files being disabled

I've noticed that emacs is leaving behind files in the directories of files I've edited with it. The files are named the same as the original, except the filename is preceeded and succeeded with a # ...
1
vote
1answer
30 views

Enable auto-save based on filename

How can I enable auto-save based on filename? I use a naming convention (a prefix to the filename) for my notes and I'd like to enable auto-save for those files.
1
vote
1answer
24 views

Getting call stack during call of a specific function

An automatic save is triggered (from some hook in some of my extensions) directly after a buffer is modified and I can't find the reason for it. The mode auto-save-mode is not enabled in the buffer ...
0
votes
2answers
71 views

Create many buffers, name properly, silently

I am trying to avoid using the desktop save mode 1 option in my .emacs file. We sudo a shared service account, so my buffers may differ from my colleagues buffers. I launch Emacs from GNU/Linux with ...
4
votes
1answer
273 views

How can backup-directory-alist be set to save in the files directory?

I want the backup files to be created in sub-directories of the files being edited, and I have created a function returns that directory. (defun tempfilepath () (interactive) (concat (file-name-...
3
votes
2answers
394 views

Emacs wont reopen my files from recover session

I was working in emacs when had a power outage, so my computer was knocked offline. After I got the computer back up, I launched emacs and tried to restore the last session. Emacs then said: "No ...
0
votes
0answers
70 views

Writing file when switching buffer

I'm using a rather stock Prelude emacs version with super-save disabled, but still whenever I change buffers using C-x o, whatever buffer I currently have focused writes to disk. I still want the auto-...
1
vote
1answer
146 views

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 with the new directory structure, I am getting all of these auto-save errors. ...
1
vote
1answer
711 views

change auto-save directory

I defined these lines in my .emacs initialization file to change the location for backup and auto-save files. (defvar BACKDIR (expand-file-name "~/emacs_backup/")) (setq backup-directory-alist `((".*"...
1
vote
0answers
28 views

Possible to save winner history winner-ring-alist in savehist or desktop-save to save across sessions

I added in the following command to my .emacs but it doesn't seem to work: (add-to-list 'savehist-additional-variables 'winner-ring-alist) Is there a way to get the winner-undo history to save ...
3
votes
1answer
353 views

How to automatically save buffer after each modification without using packages

I'm using Emacs and Windows 10 and I am fairly new to both Emacs and elisp (and I am not a programmer). I'm looking for a way to automatically save a buffer immediately after any modification ...
3
votes
1answer
95 views

How do I prevent backups of scripts from being made executable?

If I edit an executable script, say foo.sh, then upon saving emacs makes the backup file foo.sh~. That's all well and good, but if the original file has the executable bit set, then so does the backup....
2
votes
1answer
739 views

Delete auto-save file when killing Emacs without saving buffer

When I have unsaved buffers and I kill Emacs with save-buffers-kill-terminal (C-x C-c) I'm asked whether to save each buffer. Is it possible to delete a buffer's auto-save data when I answer n? I had ...
2
votes
0answers
1k views

auto-save is unreliable

I almost never manually save files; I rely on auto-save. In the past few months I have noticed some of my edits mysteriously disappearing. The disappearances seem to be related to Linux crashes (...
3
votes
2answers
323 views

Save an org-mode buffer when I clock in/out of a task

I'm using the clocking functionality quite extensively, and I built a number of tools (outside of Emacs) that will look for clocked-in tasks. The problem is that these tools will parse the file on ...
4
votes
1answer
114 views

autosave on shell buffers

How can I set things up so the buffer being used to run an inferior shell will be autosaved periodically to a file? The file to save in could be named "shell-2018-01-22". I thought this would be ...
0
votes
1answer
465 views

Tutorial Exercise - C-x C-s Save — Write Protected issue in OSX

I'm making my way through the tutorial and have run into an issue when trying to do the exercise on saving a file: Saving file /~TUTORIAL... basic-save-buffer-2: Directory / write-protected Auto-...
0
votes
0answers
36 views

Temporarily save modified buffers

I would like to achieve the following workflow: When I open files to edit and close emacs, I want this changed files to be temporarily saved, so that I can very quickly close Emacs / move to other ...
5
votes
1answer
905 views

Keep auto-save files out of directory

I found different solutions for keeping auto-save files out of the directory where the original file is located on the internet, including (defconst emacs-tmp-dir (format "%s/%s%s/" "/t" "emacs" (...
1
vote
2answers
292 views

How to set auto-save and backup path as subdirectory sibling of a given open file?

I am aware of How to place all auto-save files in a directory, but I cannot figure it out from Emacs manual how to save all auto-save versions and all backup copies of a given file in a subdirectory ...
1
vote
1answer
126 views

What are the '.#' links for? [duplicate]

When an Emacs buffer is modified, a broken link is created. The link's name is a concatenation of '.#' followed by the file's name. For example: $ ls .#spacemacs_ref.org -l lrwxrwxrwx. 1 wolfv wolfv ...
1
vote
1answer
169 views

What are .#foo files?

I have placed my autosave and backup files in a single directory .emacs-saves. Backup files appear as ~foo Autosave files appear as #foo# But Emacs seems to also generate .#foo in the current ...
0
votes
1answer
55 views

Prevent creation of ~ files

Emacs keeps pooping out random .extension~ files that are messing up my program. How do I prevent creation of these files?
1
vote
2answers
442 views

Change naming scheme for backup files

I'm putting all my backups in a directory: (defvar saves-dir (expand-file-name "~/.saves/")) (setq backup-directory-alist `((".*" . ,saves-dir))) This creates annoying filenames with ! in them, such ...
0
votes
1answer
447 views

Certain org-mode buffers keep saving automatically

Certain org-mode buffers seem to write to file automatically when left idle even for a second. I've tried disabling a few minor modes but to no avail. It makes it all the more difficult to debug this ...
5
votes
2answers
1k views

How to autosave a buffer to the original file on disk?

I want Emacs to auto-save a buffer or buffers so that I don't have to press C-x C-s each time. With auto-save turned on, I see the label "Auto-saving.... Done", which appears once in 30 seconds or so....
3
votes
2answers
565 views

save a particular buffer without prompting on emacs exit?

I have a particular buffer that collects statistics from my emacs sessions. I could write the buffer every time I update the statistics, but that's not efficient. I want to auto-write the buffer ...
1
vote
1answer
99 views

How can I get Emacs to save the changes automatically each X seconds?

How can I setup Emacs >= 24.4 so that it saves at least the current file I'm working on automatically, say, each 5 seconds, so that I don't have to press C-x C-s each time to save my changes?
2
votes
1answer
172 views

Temporary Files Still Appearing in Current Dir

I have this in my .init.el file: (setq backup-directory-alist `((".*" . "~/.saves"))) (setq auto-save-file-name-transforms `((".*" "~/.saves" t))) Yet I am still getting random backup ...
12
votes
3answers
10k views

How to place all auto-save files in a directory

I would like to put all of my auto-save files into a directory, say something like ~/.emacs-saves Based on what's written in the wiki, I came up with this: (setq backup-by-copying t ; don't ...
4
votes
1answer
207 views

Invalid coding system: auto-save-coding when trying to recover auto-save files

Sometimes when I try to run recover-this-file I get an error Invalid coding system: auto-save-coding which prevents the file from being recovered. I had to manually find the autosave file and copy ...
8
votes
1answer
1k views

How to disable auto-save in emacs only for files opened as root

I want to use emacs auto-save feature with tramp, but only for file that I don't open using sudo. My current configuration, based on the tramp documentation, looks like this: ;;;;;;;; BAKUCP ;;;;;;;; ...