{"id":13646353,"url":"https://github.com/bbatsov/super-save","last_synced_at":"2025-04-06T12:09:17.436Z","repository":{"id":41852873,"uuid":"48493470","full_name":"bbatsov/super-save","owner":"bbatsov","description":"Save Emacs buffers when they lose focus","archived":false,"fork":false,"pushed_at":"2023-12-09T10:45:28.000Z","size":31,"stargazers_count":304,"open_issues_count":16,"forks_count":20,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-01T22:02:47.416Z","etag":null,"topics":["auto-save","emacs","emacs-packages"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbatsov.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"bbatsov","patreon":"bbatsov","ko_fi":"bbatsov","liberapay":"bbatsov","custom":"https://www.paypal.me/bbatsov"}},"created_at":"2015-12-23T14:06:12.000Z","updated_at":"2024-05-01T19:52:58.000Z","dependencies_parsed_at":"2024-01-13T17:10:07.225Z","dependency_job_id":null,"html_url":"https://github.com/bbatsov/super-save","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbatsov%2Fsuper-save","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbatsov%2Fsuper-save/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbatsov%2Fsuper-save/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbatsov%2Fsuper-save/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbatsov","download_url":"https://codeload.github.com/bbatsov/super-save/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478323,"owners_count":20945266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auto-save","emacs","emacs-packages"],"created_at":"2024-08-02T01:02:53.574Z","updated_at":"2025-04-06T12:09:17.417Z","avatar_url":"https://github.com/bbatsov.png","language":"Emacs Lisp","funding_links":["https://github.com/sponsors/bbatsov","https://patreon.com/bbatsov","https://ko-fi.com/bbatsov","https://liberapay.com/bbatsov","https://www.paypal.me/bbatsov"],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"[![License GPL 3][badge-license]][copying]\n[![MELPA][melpa-badge]][melpa-package]\n[![MELPA Stable][melpa-stable-badge]][melpa-stable-package]\n[![Build Status](https://github.com/bbatsov/super-save/workflows/CI/badge.svg)](https://github.com/bbatsov/super-save/actions?query=workflow%3ACI)\n\n# super-save\n\n`super-save` auto-saves your buffers, when certain events happen - e.g. you switch\nbetween buffers, an Emacs frame loses focus, etc. You can think of it as both\nsomething that augments and replaces the standard `auto-save-mode`.\n\n## Installation\n\nAvailable on all major `package.el` community maintained repos - [MELPA\nStable][] and [MELPA][] repos.\n\nMELPA Stable is recommended as it has the latest stable version. MELPA has a\ndevelopment snapshot for users who don't mind breakage but don't want to run\nfrom a git checkout.\n\nYou can install `super-save` using the following command:\n\n\u003ckbd\u003eM-x package-install [RET] super-save [RET]\u003c/kbd\u003e\n\nor if you'd rather keep it in your dotfiles:\n\n```el\n(unless (package-installed-p 'super-save)\n  (package-refresh-contents)\n  (package-install 'super-save))\n```\n\nIf the installation doesn't work try refreshing the package list:\n\n\u003ckbd\u003eM-x package-refresh-contents\u003c/kbd\u003e\n\n### use-package\n\nIf you're into `use-package` you can use the following snippet:\n\n```el\n(use-package super-save\n  :ensure t\n  :config\n  (super-save-mode +1))\n```\n\n### Emacs Prelude\n\nsuper-save started its life as the extraction of a similar functionality I had\noriginally developed for [Emacs Prelude](https://github.com/bbatsov/prelude) and\nthe package is bundled with Prelude.\n\n## Usage\n\nAdd the following to your Emacs config to enable\n`super-save`:\n\n```el\n(super-save-mode +1)\n```\n\nIf you want to enable the additional feature of auto-saving buffers when Emacs\nis idle, add the following as well:\n\n```el\n(setq super-save-auto-save-when-idle t)\n```\n\nAt this point you can probably switch off the built-in `auto-save-mode` (unless\nyou really care about its backups):\n\n```el\n(setq auto-save-default nil)\n```\n\n## Configuration\n\nsuper-save will save files on command (e.g. `switch-to-buffer`) and hook\ntriggers (e.g. `focus-out-hook`).\n\nBoth of those are configurable via `super-save-triggers` and\n`super-save-hook-triggers`. Here's a couple of examples:\n\n```el\n;; add integration with ace-window\n(add-to-list 'super-save-triggers 'ace-window)\n\n;; save on find-file\n(add-to-list 'super-save-hook-triggers 'find-file-hook)\n```\n\nYou can turn off `super-save` for remote files like this:\n\n```el\n(setq super-save-remote-files nil)\n```\n\nSometimes you might want to exclude specific files from super-save. You can\nachieve this via `super-save-exclude`, for example:\n\n```el\n(setq super-save-exclude '(\".gpg\"))\n```\n\nYou can add predicate to `super-save-predicates`, this predicates must not take\narguments and return nil, when current buffer shouldn't save. If predicate don't\nknow needle of save file, then predicate must return t. Following example stop\n`super-save`, when current file in Markdown mode:\n\n```el\n(add-to-list 'super-save-predicates (lambda ()\n                                        (not (eq major-mode 'markdown-mode))))\n```\n\nWhen saving a file automatically, Emacs will display a message in the\n`*Messages*` buffer and in the echo area. If you want to suppress these\nmessages, you can set `super-save-silent` to `t`.\n\n```el\n;; Save silently\n(setq super-save-silent t)\n```\n\nThe `super-save-delete-trailing-whitespace` variable can be used to enable\ndeleting trailing white spaces before saving (via Emacs'\n`delete-trailing-whitespace`).\n\n```el\n;; Enable deleting trailing white spaces before saving\n(setq super-save-delete-trailing-whitespace t)\n\n;; Enable deleting trailing white spaces before saving (except for the current line)\n(setq super-save-delete-trailing-whitespace 'except-current-line)\n```\n\nBy default, `super-save` will automatically save only the current buffer, if you\nwant to save all open buffers you can set `super-save-all-buffers` to `t`.\n\nSetting this to `t` can be interesting when you make indirect buffer edits, like\nwhen editing `grep`s results with `occur-mode` and `occur-edit-mode`, or when\nrunning a project-wide search and replace with `project-query-replace-regexp`\nand so on.  In these cases, we can indirectly edit several buffers without\nactually visiting or switching to these buffers.  Hence, this option allow to\nautomatically save these buffers, even when they aren't visible in any window.\n\n## License\n\nCopyright © 2015-2023 Bozhidar Batsov and [contributors][].\n\nDistributed under the GNU General Public License; type \u003ckbd\u003eC-h C-c\u003c/kbd\u003e to view it.\n\n[badge-license]: https://img.shields.io/badge/license-GPL_3-green.svg\n[melpa-badge]: http://melpa.org/packages/super-save-badge.svg\n[melpa-stable-badge]: http://stable.melpa.org/packages/super-save-badge.svg\n[melpa-package]: http://melpa.org/#/super-save\n[melpa-stable-package]: http://stable.melpa.org/#/super-save\n[COPYING]: http://www.gnu.org/copyleft/gpl.html\n[contributors]: https://github.com/bbatsov/super-save/contributors\n[melpa]: http://melpa.org\n[melpa stable]: http://stable.melpa.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbatsov%2Fsuper-save","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbatsov%2Fsuper-save","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbatsov%2Fsuper-save/lists"}