Toggling evil-local-mode off when updating buffers with magit
Nikolai Weibull
now at bitwi.se
Fri Nov 18 12:29:53 CET 2011
On Fri, Nov 18, 2011 at 11:20, Frank Fischer
<frank.fischer at mathematik.tu-chemnitz.de> wrote:
> On Fri, Nov 18, 2011 at 09:47:35AM +0100, Nikolai Weibull wrote:
>> Running ‹make terminal› works and after saying no to running the tests
>> (running the tests gives the same result) I run the following:
>>
>> C-x C-f evil-ex.el C-m M-: (revert-buffer t t nil) C-m
>>
>> resulting in
>>
>> Toggling evil-local-mode off; better pass an explicit argument.
>> t
>
> But does it disable evil? Here evil is immediately enabled again (as
> it should be).
Doh. Sorry, that was absolutely stupid of me. I just saw the
toggling message and figured that it was off.
OK, here’s a way that works:
cd evil-git-dir
emacs -nw -Q -L . -l evil.el --eval "(evil-mode 1)"
C-x C-f a i a <Esc> C-x C-s M-: (revert-buffer t t nil) C-m
The buffer a should be in Fundamental mode. You can also use M-x
revert-buffer to get the same result.
For some reason Evil-Local is restored if you do this for, for
example, evil-ex.el, but not for a.
I tried the same by creating a buffer called a.rb, which starts in
Ruby mode. This gave the same behavior as for evil-ex.el. I’ve had
this problem with Ruby files, so it shouldn’t depend on that.
More information about the implementations-list
mailing list