Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alphapapa/salv.el
Local minor mode to save a buffer when Emacs is idle
https://github.com/alphapapa/salv.el
emacs
Last synced: 3 months ago
JSON representation
Local minor mode to save a buffer when Emacs is idle
- Host: GitHub
- URL: https://github.com/alphapapa/salv.el
- Owner: alphapapa
- License: gpl-3.0
- Created: 2022-07-02T16:28:55.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T04:00:45.000Z (10 months ago)
- Last Synced: 2024-04-11T05:48:02.607Z (10 months ago)
- Topics: emacs
- Language: Emacs Lisp
- Homepage:
- Size: 22.5 KB
- Stars: 37
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+TITLE: salv.el
#+begin_quote
*Salve*, v. t. & i.To save, as a ship or goods, from the perils of the sea.
/--Webster, 1913/
#+end_quote*Q:* /How does this package differ from other ones that automatically save buffers?/
*A:* Salve is a buffer-local minor mode, rather than being a global mode. It is activated in buffers the user wants to be saved, rather than in all buffers (requiring the user to exclude ones that aren't to be saved). It uses per-buffer idle timers, rather than a global timer. It only runs a timer when a buffer is modified after being saved, rather than constantly. Because of these characteristics, it's simple and lightweight.
* Installation
~salv~ is distributed in [[https://elpa.gnu.org/][GNU ELPA]], which is available in Emacs by default, so it can be installed with the ~package-install~ command.
* Usage
To use, just, e.g. add ~salv-mode~ to a major mode hook. Or, if you only want it activated in certain conditions, write a simple lambda to activate it when appropriate. For example, the author uses:
#+begin_src elisp
(add-hook 'org-mode-hook
(lambda ()
(when (and (buffer-file-name)
(file-in-directory-p (buffer-file-name) org-directory))
(salv-mode 1))))
#+end_src* Changelog
** v0.2-pre
Nothing new yet.
** v0.1
Initial release.
* Development
:PROPERTIES:
:TOC: :ignore (descendants)
:END:Bug reports, feature requests, suggestions — /oh my/!
** Copyright assignment
This package is part of [[https://www.gnu.org/software/emacs/][GNU Emacs]], being distributed in [[https://elpa.gnu.org/][GNU ELPA]]. Contributions to this project must follow GNU guidelines, which means that, as with other parts of Emacs, patches of more than a few lines must be accompanied by having assigned copyright for the contribution to the FSF. Contributors who wish to do so may contact [[mailto:[email protected]][[email protected]]] to request the assignment form.
* License
GPLv3