Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Always save the buffer, even if it is unmodified - #5

Merged
probablycorey merged 1 commit into
masterfrom
cj-always-save
Mar 6, 2014
Merged

probablycorey merged 1 commit into
masterfrom
cj-always-save

Conversation

@probablycorey

Copy link
Copy Markdown

There are some unexpected side effects when the buffer isn't saved because it is unmodified.

  • People expect whitespace to be removed when they press cmd-s. But if the buffer wasn't changed it won't be because the whitespace package listens for the will-be-saved event.
  • People use cmd-s to update the file's modified date. They rely on this functionality to trigger scripts.

Also, there doesn't seem to be much downside to always saving.

@kevinsawicki

Copy link
Copy Markdown
Contributor

:shipit:

@benogle

benogle commented Mar 6, 2014

Copy link
Copy Markdown
Contributor

👍

probablycorey pushed a commit that referenced this pull request Mar 6, 2014
Always save the buffer, even if it is unmodified
@probablycorey
probablycorey merged commit 9eda967 into master Mar 6, 2014
@bfreis

bfreis commented Feb 3, 2015

Copy link
Copy Markdown

OTOH, saving unchanged files (that you don't even have whitespaces removed from!) by not changing absolutely anything but the mtime can lead to a lot of trouble. Please see: atom/atom#1690 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants