<div>Ok, I've found new problems, here is the sequence to reproduce:</div><div><br></div><div>1. At the beginning of a empty line, I typed "i"</div><div>2. Type "aaa" and the line becomes "aaa"</div>
<div>3. "Esc"</div><div>4. "i"</div><div>5. "eee" and the line becomes "aaaeee"</div><div>6. "Esc"</div><div>7. Type "." and the line becomes "aaaeeeeee"</div>
<div>8. Type "C-." and the becomes "aaaeeeaaa" while it should be "aaaeeeeeeaaa"</div><div><br></div><div>Hope this helps.</div><div><br></div><div><br></div><div>York</div><div><br></div><div>
<br></div><div>On Fri, Aug 19, 2011 at 11:10 AM, York Zhao <<a href="mailto:gtdplatform@gmail.com">gtdplatform@gmail.com</a>> wrote:</div><div>Thanks Frank, I will report back new bugs if I found them.</div><div><br>
</div><div><br></div><div>York</div><div><br></div><div><br></div><div>On Fri, Aug 19, 2011 at 4:03 AM, Frank Fischer <<a href="mailto:frank.fischer@mathematik.tu-chemnitz.de">frank.fischer@mathematik.tu-chemnitz.de</a>> wrote:</div>
<div>On Thu, Aug 18, 2011 at 05:34:54PM -0400, York Zhao wrote:</div><div>> I can reproduce the problem now:</div><div>></div><div>> 1. Hit "i" to enter Insert state and type something</div><div>> 2. Esc to exit insert</div>
<div>> 3. Hit "." and it will work fine</div><div>> 3. Hit "C-x b" to switch to other buffer</div><div>> 4. Hit "." in the new buffer and "switch-buffer" command will be repeated</div>
<div>></div><div><br></div><div>Thanks for the report. I realised it on my own but wasn't able to reproduce it ;)</div><div><br></div><div>Anyway, it should be fixed in d9c1ed78.</div><div><br></div><div>Note that I have cleaned up some parts of the repeat system, so there</div>
<div>may be new bugs ...</div><div><br></div><div>Frank</div><div><br></div><div>></div><div>> York</div><div>></div><div>></div><div>> On Thu, Aug 18, 2011 at 5:14 PM, York Zhao <<a href="mailto:gtdplatform@gmail.com">gtdplatform@gmail.com</a>> wrote:</div>
<div>> Hi,</div><div>></div><div>> It had happened a few times today that dot command was not repeating the</div><div>> previous insertion, but rather some other command, e.g. it was repeating</div><div>> "switch-buffer" a minute ago, and currently is repeating the "C-h k ."</div>
<div>> command. Right now it is working properly again. I don't know how to</div><div>> reproduce this yet.</div><div>></div><div>> York</div><div>></div><div>></div><div>> On Tue, Aug 16, 2011 at 11:45 AM, York Zhao <<a href="mailto:gtdplatform@gmail.com">gtdplatform@gmail.com</a>> wrote:</div>
<div>> Hi Frank,</div><div>></div><div>> Thank you very much for this. I just did a few quick tests which appeared to</div><div>> be working perfectly fine. I'm using auto-complet a lot every day so I will</div>
<div>> report back problems if I will notice any but my feeling is that it is going</div><div>> to work. Thanks again for the wonderful works.</div><div>></div><div>></div><div>> York</div><div>></div><div>
></div><div>> On Tue, Aug 16, 2011 at 5:59 AM, Frank Fischer <</div><div>> <a href="mailto:frank.fischer@mathematik.tu-chemnitz.de">frank.fischer@mathematik.tu-chemnitz.de</a>> wrote:</div><div>> Am Montag, 15. August 2011 schrieb Frank Fischer:</div>
<div>> > Am Mon, 15 Aug 2011 14:54:44 -0400</div><div>> ></div><div>> > schrieb York Zhao <<a href="mailto:gtdplatform@gmail.com">gtdplatform@gmail.com</a>>:</div><div>> > > Hi,</div><div>
> > ></div><div>> > > I've been having this problem for a while and it is now my biggest</div><div>> > > complain to Evil because other than Evil itself, "auto-complete" is</div><div>
> > > the next thing I can't be living without.</div><div>> ></div><div>> > In fact, the change based repeation system (in contrast to the</div><div>> > key-stroke based one, I described both in another mail and it will</div>
<div>> > hopefully find its way in the docs) is designed exactly for these</div><div>> > cases and I'm quite confident that this is indeed not a big problem.</div><div>> > I just haven't activated it yet, but I'm going to have a look at it</div>
<div>> > in the next days.</div><div>></div><div>> In turned out to be a little bit more difficult than a thought.</div><div>> Activating the change-based repeation for auto-complete worked well</div><div>> except in one case: when the completion is done near the end of the</div>
<div>> buffer. The reason is that in this case auto-complete adds a few</div><div>> newlines to the end of the buffer in order to show its popup-menu</div><div>> (those newlines are removed when the popup closes). The problem is that</div>
<div>> these insertions/deletions are, well, buffer-changes and therefore</div><div>> confused the recording. Even worse, the popup menu is triggered by a</div><div>> timer and not by a command, therefore there is no command active when</div>
<div>> the first buffer changes appear and this confuses the system even more.</div><div>></div><div>> Luckily, Evil had already had the ability to execute arbitrary functions</div><div>> to realize a repeation, there just was no way to specify such a</div>
<div>> function for a command. I added this functionality in d15b75a5. The</div><div>> following code should equip auto-complete with working repeation. I'm</div><div>> going to cleanup the repeation code, especially the definition of</div>
<div>> user-defined repeation functions, a little bit, so don't assume this as</div><div>> a stable example but feel free to test and tell us about problems.</div><div>></div><div>></div><div>> (evil-set-command-properties 'ac-complete :repeat 'evil-ac-repeat)</div>
<div>> (evil-set-command-properties 'ac-expand :repeat 'evil-ac-repeat)</div><div>> (evil-set-command-properties 'ac-next :repeat 'ignore)</div><div>> (evil-set-command-properties 'ac-previous :repeat 'ignore)</div>
<div>></div><div>> (defvar evil-ac-prefix-len nil</div><div>> �"The length of the prefix of the current item to be completed.")</div><div>></div><div>> (defun evil-ac-repeat (flag)</div><div>> �"Record the changes for auto-completion."</div>
<div>> �(if (eq flag 'pre)</div><div>> � � �(setq evil-ac-prefix-len (length ac-prefix))</div><div>> � �;; Add change to remove the prefix</div><div>> � �(evil-repeat-record-change</div><div>> � � (list (- evil-ac-prefix-len) "" evil-ac-prefix-len))</div>
<div>> � �;; Add change to insert the full completed text</div><div>> � �(evil-repeat-record-change</div><div>> � � (list (- evil-ac-prefix-len)</div><div>> � � � � � (buffer-substring-no-properties (- evil-repeat-pos</div>
<div>> � � � � � � � � � � � � � � � � � � � � � � �evil-ac-prefix-len)</div><div>> � � � � � � � � � � � � � � � � � � � � � (point))</div><div>> � � � � � 0))</div><div>> � �;; Finish repeation</div><div>> � �(evil-repeat-record-change)))</div>
<div>></div><div>></div><div>> Hope it works,</div><div>> Frank</div><div>></div><div>> _______________________________________________</div><div>> implementations-list mailing list</div><div>> <a href="mailto:implementations-list@lists.ourproject.org">implementations-list@lists.ourproject.org</a></div>
<div>> <a href="https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list">https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list</a></div><div><br></div><div>> _______________________________________________</div>
<div>> implementations-list mailing list</div><div>> <a href="mailto:implementations-list@lists.ourproject.org">implementations-list@lists.ourproject.org</a></div><div>> <a href="https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list">https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list</a></div>
<div><br></div><div><br></div><div>--</div><div>Frank Fischer</div><div>Chemnitz University of Technology, Department of Mathematics</div><div>eMail: <a href="mailto:frank.fischer@mathematik.tu-chemnitz.de">frank.fischer@mathematik.tu-chemnitz.de</a></div>
<div>Tel.: +49 (371) 531-36913</div><div><br></div><div>_______________________________________________</div><div>implementations-list mailing list</div><div><a href="mailto:implementations-list@lists.ourproject.org">implementations-list@lists.ourproject.org</a></div>
<div><a href="https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list">https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list</a></div><div><br></div>