Why does this not work the first time it's called?
Guido Van Hoecke
guivho at gmail.com
Sun Jan 27 22:39:33 CET 2013
Hi Frank,
Thanks for your reply.
On 27 January 2013 19:46, Frank Fischer <frank-fischer at shadow-soft.de> wrote:
> On 2013-01-27, Guido Van Hoecke <guivho at gmail.com> wrote:
>> I have a file that I want to visit, go to the second character of the
>> fourth word, and enter replace mode:
>>
>> (defun guivho-test(name-of-file)
>> "Visit file, goto fourth word, second char and enter replace mode"
>> (interactive "fName of file: ")
>> (find-file name-of-file)
>> (beginning-of-line)
>> (evil-forward-WORD-begin 3)
>> (evil-forward-char)
>> (evil-replace-state))
>>
>> Test-file contents:
>>
>> line1 word1 word2 word3
>> line2 word1 word2 word3
>> line3 word1 word2 word3
>> line4 word1 word2 word3
>>
>> I do not understand why the last the evil-forward-char and the
>> evil-replace-state do not work when the file is not yet loaded, but do
>> work if the guivho-test is executed from the buffer that already has the
>> file. The first run leaves the cursor on the begin of the fourth word,
>> ans it remains in normal mode; executing it again does advance the extra
>> character and switches to replace mode.
>
> I can't reproduce that, in all my tests everything works
> as expected. Which evil version and Emacs version do you use? What
GNU Emacs 24.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
of 2012-08-27 on bob.porkrind.org
org-version 7.9.1
> happens if you test with "make emacs" from evil's source?
Never done that yet,
I'll report the outcome when done.
Kind regards,
Guido
--
Oh this age! How tasteless and ill-bred it is.
-- Gaius Valerius Catullus
http://vanhoecke.org ... and go2 places!
More information about the implementations-list
mailing list