elixir-editors / language-elixir

Elixir language support for the Atom editor.
Other
181 stars 40 forks source link

Elixir scripts automatically executed on save #82

Closed Dalhai closed 7 years ago

Dalhai commented 7 years ago

When an Elixir script is saved, it is automatically executed. This is especially annoying when you are writing scripts to move/delete files. Putting the code in a module def or an fn is one way to avoid this, but remembering that every time you write a script is a tad bit cumbersome.

I disabled every package, restarted and enabled every single package on its own with restarts in between. The behavior is coming from this package. Is there any way to fix it? There does not seem to be an option in the settings and working with resource intensive scripts is a nuisance at the moment.

Testing it is simple. In test.exs:

File.rm! "test.exs"

The file removes itself from the file system on save.

keathley commented 7 years ago

Hey @Dalhai, I'm pretty surprised that this package is causing that issue since all this package does is syntax identification and highlighting. It might be that disabling this package is causing a different package to behave differently. Can you cat your config file and paste the output here? Should be something like: cat ~/.atom/config.cson. That should help figure out whats going on. Also, what version of atom are you using?

I've tried recreating your issue using the steps you've provided and I don't see the same behaviour.

Dalhai commented 7 years ago

Hey @keathley.

Thanks for the fast answer.

I've been tinkering with it a bit and ended up doing a clean reinstall of atom. I only installed your plugin and none others. The issue did not resurface, so it must have been some weird interaction with the rest of my plugins.

Also, for some reason ~/.atom/config.cson does not exist (and didn't before the clean reinstall). The hidden atom folder did exist, just no config.

keathley commented 7 years ago

Glad you got it sorted :+1: