Subject: RE: bug#7046: More info

From: Gord Wait <[email-masked]>
Date: Fri, 17 Sep 2010 11:45:36 -0700

Hopefully this update will make it, Glenn Morris emailed me to note that the 7046 bug got closed (by accident)..

Here is the explanation. Below it are some sample lines. Build a file with a couple hundred of those lines to test against..

--------------------------------------------

The goal of the edit work is to cut the last "word" of each line and place it as the first "word" of each line.
(Later I sort-lines, this way the lines are sorted by the value of the original last word of the line)..

I create a keyboard macro that knows the line syntax, and does one line of work:

(fset 'moveword
   [?\C-s ?- ?t ?o ?\C-f ?\C-  ?\C-e ?\C-w ?\C-a ?\C-y ?  ?\C-a ?\C-n])

Macro edit view of the same thing:
Macro:

C-s                     ;; isearch-forward
-to                     ;; self-insert-command * 3
C-f                     ;; forward-char
C-SPC                   ;; set-mark-command
C-e                     ;; move-end-of-line
C-w                     ;; kill-region
C-a                     ;; move-beginning-of-line
C-y                     ;; yank
SPC                     ;; self-insert-command
C-a                     ;; move-beginning-of-line
C-n                     ;; next-line

Place the cursor at the start of any line and run the macro once

(Esc-x moveword)

It finds the ascii "-to" word, moves ahead to the last word, cuts and pastes it at the start, then drops down one line.

Try it repeatedly for a few lines manually to show the macro works as desired..

Now try to auto repeat the macro 100 times:

(Ctrl-u 100 Esc-x moveword)

Macro repeats, but at some point starts skipping a line.

I also manually executed the macro succesfully on lines that failed the 100 repeat, to show that it wasn't some artifact of those failed lines..

-----------------------------------------------
Sample lines to be manipulated by the macro.. Make a file with a few hundred of these in it. Duplicating these ones will be fine to show the bug. In the real file each line is unique.
-----------------------------------------------
set_location_assignment PIN_AP23 -to ddr3bot_dq[36]
set_location_assignment PIN_AM23 -to ddr3bot_dq[35]
set_location_assignment PIN_AT23 -to ddr3bot_dq[34]
set_location_assignment PIN_AN23 -to ddr3bot_dq[33]
set_location_assignment PIN_AU23 -to ddr3bot_dq[32]
set_location_assignment PIN_AK17 -to ddr3bot_dq[31]
set_location_assignment PIN_AG17 -to ddr3bot_dq[30]
set_location_assignment PIN_AH17 -to ddr3bot_dq[29]
set_location_assignment PIN_AG16 -to ddr3bot_dq[28]
set_location_assignment PIN_AL17 -to ddr3bot_dq[27]
set_location_assignment PIN_AH16 -to ddr3bot_dq[26]
set_location_assignment PIN_AM17 -to ddr3bot_dq[25]
set_location_assignment PIN_AJ16 -to ddr3bot_dq[24]
set_location_assignment PIN_AU15 -to ddr3bot_dq[23]
set_location_assignment PIN_AR17 -to ddr3bot_dq[22]
set_location_assignment PIN_AT15 -to ddr3bot_dq[21]
set_location_assignment PIN_AP17 -to ddr3bot_dq[20]
set_location_assignment PIN_AV16 -to ddr3bot_dq[19]
set_location_assignment PIN_AN16 -to ddr3bot_dq[18]
set_location_assignment PIN_AW16 -to ddr3bot_dq[17]
set_location_assignment PIN_AT16 -to ddr3bot_dq[16]
set_location_assignment PIN_AW12 -to ddr3bot_dq[15]
set_location_assignment PIN_AV11 -to ddr3bot_dq[14]
set_location_assignment PIN_AU14 -to ddr3bot_dq[13]
set_location_assignment PIN_AW11 -to ddr3bot_dq[12]
set_location_assignment PIN_AV14 -to ddr3bot_dq[11]
set_location_assignment PIN_AU12 -to ddr3bot_dq[10]
set_location_assignment PIN_AW14 -to ddr3bot_dq[9]
set_location_assignment PIN_AT12 -to ddr3bot_dq[8]
set_location_assignment PIN_AP13 -to ddr3bot_dq[7]
set_location_assignment PIN_AP14 -to ddr3bot_dq[6]
set_location_assignment PIN_AN13 -to ddr3bot_dq[5]
set_location_assignment PIN_AR14 -to ddr3bot_dq[4]
set_location_assignment PIN_AL14 -to ddr3bot_dq[3]
set_location_assignment PIN_AN14 -to ddr3bot_dq[2]
set_location_assignment PIN_AM13 -to ddr3bot_dq[1]
set_location_assignment PIN_AM14 -to ddr3bot_dq[0]
set_location_assignment PIN_AL23 -to ddr3bot_dqs_n[7]
set_location_assignment PIN_AU26 -to ddr3bot_dqs_n[6]

-----Original Message-----
From: Stefan Monnier [mailto:[email-masked]]
Sent: Friday, September 17, 2010 8:35 AM
To: Gord Wait
Cc: [email-masked]'
Subject: Re: bug#7046: More info

> I also tried using "forward-line" and got similar results.  It seems
> to be dependent on how many repeats I select. If I auto repeat say 10
> lines worth, It seems to be ok. If I auto repeat the macro 1000 times,
> then it starts to skip every line at some point..

Both cases sound like bugs, but without a concrete test case it's
difficult to track it down.  Can you provide a precise test case
(e.g. a sample file and the key strokes you hit to define and run the
macro, ideally starting from "emacs -Q")?

        Stefan

This e-mail may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable laws. Unauthorized use, reproduction or dissemination of the e-mail is strictly prohibited. If you have received this e-mail in error, please contact the sender immediately. [11EABB509DF]