Questions tagged [saving]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
8
votes
2answers
503 views

Strip text properties in savehist

I save the kill-ring using the savehist package. savehist saves the kill ring with text-properties intact. Unfortunately, this is a problem. I have a rather large emacs config, and I use a lot of ...
54
votes
1answer
3k views

How to view diff when emacs suggests to recover this file?

Sometimes it happens: emacs prompts you about recovering unsaved changes to a file, but you cannot remember if you want those changes or not. Starting at the recover-this-file buffer, is there a way ...
13
votes
1answer
4k views

Execute external script upon save when in a certain mode?

When I'm in org-mode, I want Emacs to execute a bash script I wrote whenever I hit C-x s to save. The script automatically syncs the file I am saving to my Raspberry Pi. It expects the file name as ...
28
votes
4answers
3k views

How to auto-save buffers when Emacs loses focus?

I recently had a Sublime Text user try out Emacs for a while, and he was interested in getting the same auto-save behavior in Emacs. Basically, he wanted all buffers to be saved whenever the frame ...
27
votes
5answers
5k views

How do I automatically save org-mode buffers?

I regularly use org-mode and the agenda to keep track of my to-do list. Since I use Dropbox to sync my list, I need the same tasks to be available on all computers. Sometimes during the course of my ...
6
votes
2answers
6k views

How to run an `after-save-hook` only when the buffer has been saved manually

This question is inspired by https://emacs.stackexchange.com/a/5947/. Assume that I have a function like (defun do-some-actions () () (..put a copy of the current file in a specific folder...) ) ...
6
votes
1answer
393 views

Automatically saving the current file after typing a certain number of characters

Is there a way to force Emacs to automatically save the current file (if it is not already saved) after typing n characters (n is a number determined by the user). Edit: After the comment of @Dan and ...
4
votes
1answer
1k views

Fix 'changed on disk'/'Reread from disk' when file has not changed

Is there any way to get emacs to actually check the contents of files on disk when determining this? E.g. if I have some unsaved changes to a file, and temporarily switch source control branches (to ...
4
votes
2answers
505 views

Backup saved buffers to Dropbox (or other specific directory)

Is it possible to customize Emacs so that whenever I save a file, Emacs also copies it to a specific folder? This directory could be, for instance, D:\my_backups or C:\Users\username\Dropbox\...
3
votes
1answer
323 views

Automatically show diff before saving file

I have a file that contains important information and I often have to make small changes in this file. Every once in a while I accidentally change something in this file and then save it without ...
3
votes
0answers
914 views

Emacs sometimes fails to save files

I'm experiencing a weird problem with Emacs on Windows where sometimes, after a while, the current buffer I'm in throws an error when attempting to save the file. I can't seem to reliably reproduce ...
1
vote
1answer
95 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?
1
vote
1answer
125 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 ...