evil conflicts in c-mode
Jim Green
student.northwestern at gmail.com
Wed Dec 7 03:42:07 CET 2011
On 6 December 2011 08:44, Frank Fischer
<frank.fischer at mathematik.tu-chemnitz.de> wrote:
> On Tue, Dec 06, 2011 at 12:40:23AM +0000, Jim Green wrote:
>>
>> Hi,
>> I think I didn't state the issue clear in the post.
>>
>> basicall for non c++/c files, RET behaves as expected, it does
>> 'evil-ret'.
>>
>> but in c++/c files, even in evil normal mode, RET would do
>> "new-line-indent", I guess the reason is cc-mode doesn't differentiate
>> the evil normal mode or insert mode.
>
> No, when evil is activated RET in normal-state should *not* do
> `new-line-indent', even in c++/c files. At least it does not in my box
> and I use c++/c every day. (I suppose you mean `newline-and-indent'
> because I do not know any function `new-line-indent')
>
> Please test what happens if you execute 'make emacs' (or even 'make
> clean emacs') in evil's source directory. This should start a clean
> Emacs instance with only evil loaded. Then open some c/c++ file and
> look if the problem remains. If yes, there must be a problem with evil
> and it would be good if you can provide a minimal example (starting
> with 'make emacs') to reproduce the error. Otherwise it's probably a
> configuration issue of your emacs.
I got the following error(I think expected) when make clean emacs, but
enter works
perfectly as tested above for a test c++ file. I found that in my
cc-mode.rc.el I copied from somewhere else ret is redefined...
sorry about wasting your time and Thanks for such a great debugging trick!
Jim.
my emacs version is GNU Emacs 24.0.92.1
Selector: t
Passed: 127
Failed: 2 (2 unexpected)
Total: 129/129
Started at: 2011-12-06 21:35:41-0500
Finished.
Finished at: 2011-12-06 21:35:43-0500
........................................F.....................................................................F..................
F evil-test-extract-count
Test `evil-extract-count'
Info: Exact with count
(error "No command bound to \346")
F evil-test-rot13-repeat
Test repeating of `evil-rot13'
(ert-test-failed
((should
(string=
(buffer-substring
(max ... ...)
(point))
before))
:form
(string= " buffer" ";; Guvf")
:value nil))
>
>> Is there a way to make sure whatever major mode emacs is in, in evils
>> normal mode, 'RET' would not cause emacs go into insert mode?
>
> RET should never make emacs go to insert mode. At least in no
> situation I'm aware of. Again, please provide a minimal example how to
> reproduce this error, if possible, otherwise we can't help you.
More information about the implementations-list
mailing list