PreviousNextTracker indexSee it online !

(72/231) 2757833 - recorder not completely accurate

Per email discussion on devel list (started 11 Apr 2009, Subj: beanshell question), the macro recorder does not completely capture user actions. The example is, while recording, click File->New. When manually doing this, jEdit (1) creates a new buffer and (2) places it as the active buffer in the current view. The macro recorder misses action (2), so subsequent actions "recorded" by the user don't align.

What happens if I record closing the active buffer after creating it? When manually doing this, the net result is an open and then closed new buffer. After recording, the new buffer is still open, and another buffer gets closed.

The email discussion also proffered suggestions for an implementation fix.

Submitted hunteke - 2009-04-13 - 05:53:00z Assigned nobody
Priority 5 Category macros
Status Open Group minor bug
Resolution None Visibility No


2009-04-13 - 20:33:59z
Fixed in SVN rev. 14924.
PLEASE NOTE: After updating to this version, you must update not only the jedit.jar file, but also the startup.bsh script under the 'startup' subdirectory of the jEdit installation. This is required because the startup script defined functions that are used by the jEdit actions now, in order to keep the predefined variables up-to-date.
2009-04-15 - 20:40:34z
Sorry. It is not fixed. It turns out the usage of the functions in startup.bsh does not work as expected. So this bug is still open.
Also, I saw that replacing the calls to these functions with actual statements updating the variables does not always work.
All solutions I've tried were quite complex. Hence, I'm resigning from it.
2009-04-16 - 21:01:09z
See here a discussion of this issue:
2009-04-18 - 05:06:02z
Recording of actions that only change the current buffer is easy to fix by updating the global "buffer" variable at the end of the action. For actions that change the edit pane, such as split-related actions, even updating all the predefined variables doesn't work, probably because some of the work of these actions is delayed, and the next action continues to execute before the current action has fully completed.

Hence, macro recording cannot be fully fixed by just fixing the predefined variables after each action that modifies them. Nevetheless, for those actions that change the current buffer, this can be fixed. It may be worthwhile to add a fix only for those, since these are probably a lot more common for recording then changing of edit panes.
2009-12-06 - 08:12:46z
Setting the resolution to None since the previous fix was reverted at r14942.