glynnforrest / salt-mode

Emacs major mode for Salt States
GNU General Public License v3.0
22 stars 5 forks source link

salt-mode depends on salt #18

Closed JeffAbrahamson closed 6 years ago

JeffAbrahamson commented 6 years ago

Visiting a new (empty) .sls file invokes salt-mode, which, in the absence of a salt-minion, dies at line 233 or 244, "Error querying Salt minion". It seems reasonable that a developer should wish to edit an .sls file on a host that is not itself a salt minion.

The constant salt-mode--query-template also causes a failure if salt is not configured on the dev machine, since the import of salt.config fails.

Perhaps this is merely a documentation bug: failing to explain what is necessary on a development machine to use salt-mode.el.

glynnforrest commented 6 years ago

Thanks for the report @JeffAbrahamson.

This is definitely a bug, the mode should work without a salt-minion. The documentation features should be an added bonus if salt is installed.

I'll see about fixing this shortly.

glynnforrest commented 6 years ago

@JeffAbrahamson I've just pushed a commit that should fix this. Once melpa builds the new package, it'd be great if you could update and confirm this solves your problem.