Coder Social home page Coder Social logo

chillaranand / real-auto-save Goto Github PK

View Code? Open in Web Editor NEW
52.0 7.0 13.0 73 KB

Automatically save your all your buffers/files at regular intervals in Emacs!

License: GNU General Public License v3.0

Emacs Lisp 88.72% Makefile 11.28%
emacs elisp buffers

real-auto-save's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

real-auto-save's Issues

Buffer name changes confuse the timers

When the buffer name changes the timers can no longer find the buffers and keep giving errors. E.g. if you open: ~/foo/name, enable real-auto-save, open ~/bar/name now the original buffer name changed from name to foo/name and you get errors like: Error running timer ‘real-auto-save-buffers’: (error "No buffer named name") each time the timer expires.

If buffer is modified outside of emacs, dialogue popup every 10sec

Every time, timer time out, following is executed and a dialogue pops up.
(yes-or-no-p "%s has changed since visited or saved. Save anyway? ")

It is very anoying and sometimes it is very dangerous to loose modified contents by overwriting current buffer contents.

Change timer to trigger on a duration after idle

Right now I have an issue with real-auto-save: I'll be typing, and in the middle of my typing, real-auto-save will kick in and save the buffer, triggering some other plugins that cause typing delays.

I would like instead for real-auto-save to save at some duration after emacs becomes idle. That is, if no text has been written into the buffer for 1 second, then do an autosave.

conflict with helm's C-j

first of all, thanks for you work, is great. when I use helm's C-j to preview file, there will be a message of Aborting an helm session running in background,then helm buffer will be closed,is there a way to prevent auto-real-save work when buffer opened but not modified?

ignore list is unnecessary

either the mode is enabled or it isn't, so if the user says "always enable real-auto-save in prog-mode", that's what should happen. There are any number of mechanisms by which the user can selectively enable or disable a minor mode in certain major modes or buffers.

real-auto-save-silent is not defined

I set up auto save by enabling real-auto-save-mode. For a while i started getting this error:

Error running timer ‘real-auto-save-buffers’: (void-variable real-auto-save-silent)

Looking at the code there is indeed no variable set with this name, only a customize group:

(defcustom real-auto-save-interval nil
  "Silent save of real auto save."
  :type 'convenience
  :group 'real-auto-save-silent)

Other than that, this name only appears in a condition in real-auto-save-buffers:

(if (not real-auto-save-silent)
    (with-suppressed-message (save-buffer))
  (let ((inhibit-message t)) (save-buffer)))

README.md document broken

$ git show -p 46068abcd0e694556057733be11498c53cbc6e50

commit 46068abcd0e694556057733be11498c53cbc6e50
Author: conao3 <[email protected]>
Date:   Wed Jul 1 12:17:46 2020 +0900

    remove mentioning real-auto-save-use-idle-timer config

diff --git a/README.md b/README.md
index 55e66a6..72ccdd8 100644
--- a/README.md
+++ b/README.md
@@ -32,10 +32,7 @@ For example, to use this mode only for org files, add this to your Emacs config:
 
 By default, real-auto-save mode uses idle timer. If your emacs is idle, after `real-auto-save-interval` seconds it will save buffers.
 
-If you want to save all your buffers, every `real-auto-save-interval` seconds, irrespective of idle time, use
-
-    (setq real-auto-save-use-idle-timer nil)
-
+If you want to save all your buffers, every `real-auto-save-interval` seconds.
 
 ## Acknowledgments

update README

#45 removed real-auto-save-use-idle-timer but the README still mentions it as an available option.

auto save not working on org-mode

I have installed the latest (20150512 release) of real-auto-save and have added the following to my emacs 24.3.1 setup;

;; Automatically save the file
;;
(require 'real-auto-save)
(add-hook 'org-mode-hook 'real-auto-save-mode)
(setq real-auto-save-interval 5) ; in seconds

When I modify an org-mode file real-auto-save no longer auto saves.

Real auto save enable function

In addition to asking users to enable real-auto-save, we need to provide real-auto-save-enable function which activates real-auto-save mode in all writable buffers.

Real-auto-save does not save my *notes* file

I have a notes file in my dot emacs with which I usually start emacs. This file does not save automatically though I have this in my config:

;;REAL-AUTO-SAVE
(require 'real-auto-save)
(add-hook 'diary-mode-hook 'real-auto-save-mode)
(add-hook 'prog-mode-hook 'real-auto-save-mode)

errors on qualified buffer-names

I assume this is caused by relying only on buffer-name to identify buffers. and/or not removing that hook when a buffer is renamed (by Emacs) when opening a second file with the same basename, even when neither the filename being visited nor the buffer contents have changed.

Reproduction:

(1) open README.md, enable real-auto-save-mode, autosave work.

(2) open another namesake, say ../README.md, then real-auto-save-mode still works, but errors from real-auto-save-mode-buffers with "No buffer named README.md", on both files.

(3) let's say the current directory is y/ and its parent directory is x/. then buffer-name returns the filename qualified with as much directory necessary to disambiguate it from other file buffers. i.e. README.md<x> for the former and README.md<x/y> for the latter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.