antonj / scss-mode

Emacs mode for SCSS files (http://sass-lang.com)
200 stars 39 forks source link

Is it possible to disable compilation? #17

Closed miloshadzic closed 11 years ago

miloshadzic commented 11 years ago

And how would I do it?

Thanks.

freegnu commented 11 years ago

Stick something like this in your .emacs. The semi-coloned lines are comments.

(defun my-scss-mode-hook ()
  "Hooks for SASS mode."
  (setq-default scss-compile-at-save nil)
  ;; (setq-default scss-output-directory "/dev/shm")
  ;; (flymake-mode-on)
)
(add-hook 'scss-mode-hook 'my-scss-mode-hook)

The /dev/shm is a trick to keep compiling but not to the source directory. It's the former location of the default ram disk on linux distros. It is still useful as it is a symlink into the new default ram disk.

But you can get the syntax check benefits in real time with dynamic syntax error highlighting with Meta-X flymake-mode or by uncommenting the (flymake-mode-on) part of the hook.

miloshadzic commented 11 years ago

Thanks, that did it! The /dev/shm thing won't work for me as I'm on OS X but this is good enough.

I suggest you put this info in the README as I'm probably not the only one who needed help with this.

antonj commented 11 years ago

@miloshadzic The README says that you can "(Disable by changing scss-compile-at-save to nil)". Thanks @freegnu for the explanation.

drewwells commented 10 years ago

I'm still seeing compilation errors with this turned off. Is there a way to totally disable flymake from attempting to compile my code?