Menu

#3246 recorder not completely accurate

minor bug
open
nobody
macros (56)
5
2009-12-06
2009-04-13
No

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.

Discussion

  • Kevin Hunter Kesling

    • assigned_to: jgellene --> shlomy
     
  • Anonymous

    Anonymous - 2009-04-13

    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.

     
  • Anonymous

    Anonymous - 2009-04-13
    • status: open --> closed-fixed
     
  • Anonymous

    Anonymous - 2009-04-15

    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.

     
  • Anonymous

    Anonymous - 2009-04-15
    • status: closed-fixed --> open-fixed
     
  • Anonymous

    Anonymous - 2009-04-15
    • assigned_to: shlomy --> nobody
     
  • Anonymous

    Anonymous - 2009-04-16

    See here a discussion of this issue: http://marc.info/?t=123965520000003&r=1&w=2

     
  • Anonymous

    Anonymous - 2009-04-18

    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.

     
  • Kazutoshi Satoda

    • status: open-fixed --> open
     
  • Kazutoshi Satoda

    Setting the resolution to None since the previous fix was reverted at r14942.
    http://jedit.svn.sourceforge.net/jedit/?view=rev&rev=14942

     

Log in to post a comment.