You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Not sure if this is something we want to do, but interesting feedback nonetheless. The user wants to run his guardfile whether his contents changed or not on core:save
We've heard this complaint a few times. I think maybe we were overly cautious about not saving a file. I can't think of any major downsides if we let Atom always save a file, even if it's contents are unchanged.
I have ctrl+s binded to window:save-all. And every time I press ctrl+s every file I have open gets touched by Atom, and triggers all kinds of nasty stuff, because I have Guard watching the filesystem. It makes Guard reload the Guardfile if I have the Guardfile open, it runs all the tests again for files that didn't change, and it triggers unnecessary IO operations!
This should be optional, it completely breaks files watchers and hinders performance. Or at least it should be disabled for window:save-all.
@thecotne, I would be great if you give some details on why you think it should be disabled by default. There are people that have the opposite view and that is why we adopted this behavior. Understanding the arguments for both sides would be helpful for us.
@probablycorey it must be disabled by default because all editors i have used before have save option available when file has changed
if i discovered this behavior by my self i would open issue about bug
this behavior looks like a bug
so it must be disabled by default
I say I have had some experience with all kind of editors and I don't expect an editor to touch unchanged open files when I hit Save All. Whether an editor should save an unchanged file when hitting Save (this file only) — I have no opinion.
Come to think of this, I would be perfectly happy with 'Save All' meaning "Save all changed" and 'Save' meaning "Save this file regardless" — a user has indication of changes in this file and so can decide whether to touch this file or not.
A huge issue related to this is when building Docker containers. By "touching" an unchanged file, Docker will see that mtime has changed and will assume the file has changed, and will not reuse it's image cache, but will build a new image instead. This will lead to a much longer build time, upload time, deploy time, and all sorts of nastiness.
Let's assume it was a perfectly reasonable reason to make the default "touch on save" -- which I disagree, but let's assume it. What is the huge problem about making this "feature" optional? It would satisfy both whoever thinks it's a good idea, and whoever has a very good reason -- such as above -- not to touch unchanged files.
Requests like this make me wonder if we should have a set of configuration items that are officially supported (i.e. not going to disappear in a minor update) but are not exposed in the UI (only set in init.coffee) - kind of like chrome's advanced flags.
I also hate that atom touches all files on a save-all -- not at all what I expect. I'm coming from vim, where a :wa command only saves files with changes, and does not affect unchanged files.
I also have projects with watchers tracking file changes to run a build process, and touching every open file results in many unnecessary builds, slowing me down greatly.
@isaachess The save all aspect was resolved in #9249, and will likely be released in the next stable version of Atom. I haven't checked, but it miiiiight have been released in the current beta.
The save all aspect was resolved in #9249, and will likely be released in the next stable version of Atom. I haven't checked, but it miiiiight have been released in the current beta.
It is indeed present in the current beta (1.2.0-beta2).
For anyone wanting a way to opt into the previous behavior (i.e., save all buffers even when they haven't been modified), you can add a command to your init.coffee script and bind that command to your desired keyboard shortcut to restore the previous behavior. Example: jasonrudolph/dotfiles@0ecb3db
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
probablycorey commentedon Mar 4, 2014
We've heard this complaint a few times. I think maybe we were overly cautious about not saving a file. I can't think of any major downsides if we let Atom always save a file, even if it's contents are unchanged.
kevinsawicki commentedon May 5, 2014
This was added in atom/text-buffer#5
Zequez commentedon Jul 9, 2014
I know of a major issue:
window:save-all.I have
ctrl+sbinded towindow:save-all. And every time I pressctrl+severy file I have open gets touched by Atom, and triggers all kinds of nasty stuff, because I have Guard watching the filesystem. It makes Guard reload the Guardfile if I have the Guardfile open, it runs all the tests again for files that didn't change, and it triggers unnecessary IO operations!This should be optional, it completely breaks files watchers and hinders performance. Or at least it should be disabled for
window:save-all.thecotne commentedon Jul 9, 2014
it must be optional and disabled by default
probablycorey commentedon Jul 10, 2014
@thecotne, I would be great if you give some details on why you think it should be disabled by default. There are people that have the opposite view and that is why we adopted this behavior. Understanding the arguments for both sides would be helpful for us.
thecotne commentedon Jul 10, 2014
@probablycorey it must be disabled by default because all editors i have used before have save option available when file has changed
if i discovered this behavior by my self i would open issue about bug
this behavior looks like a bug
so it must be disabled by default
costa commentedon Nov 5, 2014
+1 on seeing this as a bug, please fix it up.
thomasjo commentedon Nov 5, 2014
@costa It's not a bug. This behavior is by design. See atom/text-buffer#5.
mark-hahn commentedon Nov 5, 2014
I use it to touch. I hated intelliJ's lack of touching. I would want to
trigger some script like compiling or pushing to a server.
Having said that, maybe it should be an option?
On Wed, Nov 5, 2014 at 6:22 AM, Thomas Johansen [email protected]
wrote:
thecotne commentedon Nov 6, 2014
why it's not optional?
i think it must be optional
costa commentedon Nov 9, 2014
I say I have had some experience with all kind of editors and I don't expect an editor to touch unchanged open files when I hit Save All. Whether an editor should save an unchanged file when hitting Save (this file only) — I have no opinion.
costa commentedon Nov 9, 2014
Come to think of this, I would be perfectly happy with 'Save All' meaning "Save all changed" and 'Save' meaning "Save this file regardless" — a user has indication of changes in this file and so can decide whether to touch this file or not.
bfreis commentedon Feb 3, 2015
A huge issue related to this is when building Docker containers. By "touching" an unchanged file, Docker will see that mtime has changed and will assume the file has changed, and will not reuse it's image cache, but will build a new image instead. This will lead to a much longer build time, upload time, deploy time, and all sorts of nastiness.
Let's assume it was a perfectly reasonable reason to make the default "touch on save" -- which I disagree, but let's assume it. What is the huge problem about making this "feature" optional? It would satisfy both whoever thinks it's a good idea, and whoever has a very good reason -- such as above -- not to touch unchanged files.
Thanks
thedaniel commentedon Feb 3, 2015
Requests like this make me wonder if we should have a set of configuration items that are officially supported (i.e. not going to disappear in a minor update) but are not exposed in the UI (only set in init.coffee) - kind of like chrome's advanced flags.
bfreis commentedon Feb 3, 2015
That would be totally awesome.
levity commentedon Jul 3, 2015
I also would like this behavior to stop for Save All. Touching when saving an individual file makes sense though.
I have the same issue that @Zequez and @bfreis mentioned, which is that saving unchanged files triggers unnecessary activity.
This also breaks the Tidy Tabs package, which uses the modification time of tabs to determine which old tabs to automatically close.
isaachess commentedon Aug 7, 2015
I also hate that atom touches all files on a save-all -- not at all what I expect. I'm coming from vim, where a
:wacommand only saves files with changes, and does not affect unchanged files.I also have projects with watchers tracking file changes to run a build process, and touching every open file results in many unnecessary builds, slowing me down greatly.
thomasjo commentedon Nov 4, 2015
@isaachess The save all aspect was resolved in #9249, and will likely be released in the next stable version of Atom. I haven't checked, but it miiiiight have been released in the current beta.
Restore Atom's original save-all behavior
jasonrudolph commentedon Nov 11, 2015
It is indeed present in the current beta (1.2.0-beta2).
For anyone wanting a way to opt into the previous behavior (i.e., save all buffers even when they haven't been modified), you can add a command to your
init.coffeescript and bind that command to your desired keyboard shortcut to restore the previous behavior. Example: jasonrudolph/dotfiles@0ecb3dblock commentedon Jan 19, 2019
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!