Evil doesn't work after revert-buffer.

Titus von der Malsburg avatarTitus von der Malsburg created an issue

To reproduce: open a new file named /tmp/test (no extension), write something, save, then M-x revert-buffer. After that Evil doesn't work anymore and I get standard Emacs behavior it seems. Interesting detail: when I do the same with a file named /tmp/test.txt the problem does not occur. In both cases, however, I see this message when reverting:

Toggling evil-local-mode off; better pass an explicit argument.

Everything was tested after getting the latest version of Evil, a make clean && make and with make emacs.

Comments (5)

  1. Frank Fischer
    • changed status to open

    This is probably another issue with fundamental-mode buffers. Those buffers cause problems because in fundamental-mode certain hooks are not run. I've just tested it in Emacs 23 and Emacs 24 and the problem only occurs in 23. Do you use Emacs 23? (just to be sure)

  2. Vegard Øye

    The "better pass an explicit argument" message occurs because fundamental-mode is called without any arguments (since it is the default mode, there is no way to "disable" it in a fundamental buffer). When evil-local-mode is substituted for fundamental-mode, however, the lack of arguments has the effect of toggling Evil in the current buffer. In this case it disables it, since it was previously enabled.

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.