add scratch configuration and emacs problem patch