Issue #180 resolved

Evil state oddity in Ediff command frame

epich
created an issue

In my .emacs I change modes that come up in Emacs state to come up in motion state instead:

{{{ (setq evil-motion-state-modes (append evil-emacs-state-modes evil-motion-state-modes)) (setq evil-emacs-state-modes nil) (setq evil-motion-state-modes (cons 'ediff-meta-mode evil-motion-state-modes)) }}}

I have these two files:

foo.py: {{{

!/usr/bin/env python

import os

os.system('echo hi') os.system('echo here') }}}

foo.py.patch: {{{ --- foo.py 2012-07-23 15:02:03.000000000 -0400 +++ /home/boreilly/junk/foo.py 2012-07-23 15:02:49.610624000 -0400 @@ -3,5 +3,5 @@ import os

os.system('echo hi') -os.system('echo there') +os.system('echo here') }}}

I open emacs on foo.py.patch . Then {{{M-x ediff-patch-file}}} . Select foo.py.patch to apply to foo.py . The Ediff control frame pops up.

If the first thing I type is: {{{\|}}} (to change from horizontal split to vertical), then I enter Emacs state and stay in that state, without executing the | command.

If instead the first thing I type is: {{{l\|}}} then it works correctly: point moves right once, I briefly enter Emacs state to execute the | command, and I return to motion state.

Comments (6)

  1. Frank Fischer repo owner
    • changed status to open

    The reason is a delayed initialization of evil that seems to reset the information to which previous state evil should return after executing the Emacs command. This problem occurs only for the first command being executed in a buffer (afterwards the initialization is compete). We're currently discussing possible solutions (it may not be so easy to change this part of evil without affecting others), so please be patient ;)

  2. Log in to comment