bbatsov / super-save

Save Emacs buffers when they lose focus
313 stars 20 forks source link

Add check of buffer-size and `super-save-predicates` for flexibility #37

Closed semenInRussia closed 2 years ago

semenInRussia commented 2 years ago

I am like super-save, but I am often edit large files, and when I am unfocus from buffer with large files, save take a lot of time, but this saves not requires, so I am add check of buffer-size, for this I am create more agile system of check on need to save buffers.

bbatsov commented 2 years ago

I like the proposed changes, but I see a lot of whitespace changes that seem off as I normally auto-indent files. How did you format the code?

semenInRussia commented 2 years ago

I am use standard lisp-indent-line, but my variable lisp-body-indent was set to 4 (i don't know cause), now I this fixed, and indentation is OK! If you don't warn me, then I never guess, thank you!

bbatsov commented 2 years ago

I forgot about this PR for a while, but better merge it late than never. Thanks!

tamwile commented 2 years ago

I don't understand why this PR has been merged. I don't have updated my super-save package for almost a month, and after the update i began to wonder why super-save doesn't work anymore.

  1. This PR breaks the behavior of the default config provided in the README :

    (use-package super-save
    :ensure t
    :config
    (super-save-mode +1))
  2. The documentation has been partially updated : if you read the README you can't find any mention of super-save-max-buffer-size.

  3. What happens if super-save-max-buffer-size is set to 0 ? i think this should be the default and if it is <= 0, then use the old behavior and don't care about the size.

Personal opinion : unless your daily driver is a mainframe from the 70s, 10000 is really small.

jakebox commented 2 years ago

+1 to @tamwile. This is not a good PR. Things were good before. Nil should be an option AND default should be nil per my suggestion in #39.

bbatsov commented 2 years ago

@tamwile @jakebox My bad, I didn't think about this value enough. I just disabled this by default, as most people don't really need to check against file size.