SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => SlickEdit User Macros => Topic started by: Graeme on October 22, 2018, 05:23:08 AM

Title: xretrace, xxutils and a few other things
Post by: Graeme on October 22, 2018, 05:23:08 AM
I've combined xretrace, xxutils and a few other things into a single zip file.  Backup your current configuration folder then unzip to your config folder so that you have a sub-folder called xretrace that has the macro files and bitmaps needed.

Have a read of the info towards the end of the xload-macros.e source file.
If you want to try this out before changing your normal config folder then create a new empty temporary config folder - start slick with vs.exe +new -sc some-empty-folder   - then import all your settings and load all the files below.

The xload_macros command prompts if you want to force the macro source to be re-compiled.  Normally you should say "yes" to this.

>>>>>>  from xload-macros.e

You can clone the xretrace folder to anywhere you want and load it by loading xload-macros.e then run the macro xload_macros_default_path_silent   - (or xload_macros_dev which will prompt for the location of the xretrace folder if you want to select where it goes).
default path is UserMacros/xretrace in your config folder.

     If you use xload_macros_dev you will be prompted for which modules you want to load.
     dlinklist.e is needed by other modules  - no harm to load it.
     xretrace-whatever  - load all three or none
     xtemp-file-manager is needed by xxutils but it's sort of inactive until you enable it
     xnotepad  -  is needed by xxutils
     xblock-selection-editor - is optional

xretrace now includes a kind of vertical scrollbar.  It creates a bunch of text files - if you don't want these then stick with the old xretrace (link below) and skip loading the three xretrace modules listed above.  xretrace.e has some detail at the start about how to use it.
  https://community.slickedit.com/index.php/topic,4693.msg36784.html#msg36784 (https://community.slickedit.com/index.php/topic,4693.msg36784.html#msg36784)
 
The old version of xxutils.e is here
https://community.slickedit.com/index.php/topic,11186.msg57320.html#msg57320 (https://community.slickedit.com/index.php/topic,11186.msg57320.html#msg57320)

If you want to use the temporary file handler then it's best to create an environment variable called xtemp_files_path to specify where you want the temp files to go - more info in xload-macros.e.  The file xtemp-file-manager has some detail at the start about what it's doing.

Please let me know if there are any problems.

[EDIT Nov 11, 2018]
Uploaded some updated files to fix a couple of things.  There's a new option in the xretrace options dialog  -  "capture retrace data to disk".  It's off by default.  If you want xretrace-scrollbar to show anything useful it needs to be enabled.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on December 08, 2019, 04:26:12 PM
Hi Graeme:

Is this the latest version of your tools? I want to try it out but when I search the forum there is more than 1 post, so not sure which one to use.

Maybe you can make a github for it? This way there is one central place to get it and you can even have contributors.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on December 08, 2019, 05:51:48 PM
Also, is there a reason why the macros need to be in a subfolder of the config folder? I usually have my macros in a dedicated folder outside of the config.
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on December 08, 2019, 09:09:44 PM
Hi Rob
This thread is the latest version but I haven't had time to switch to V24 yet and I'm fairly sure that xretrace doesn't work correctly with V24 and it crashes slickedit on Linux.  I should get time to look at it in a couple of weeks.

I have macros in a sub-folder so that when I upgrade to a new config folder, the macros get copied and re-built with the new version.  It allows me to keep using an older version if I want  - the .ex file isn't portable between versions.

I agree that there should be a common git repo for macros - the wiki would be useful too.  jporkkahtc posted a link to his git repo for his macros a while ago but I would prefer that the repo was owned by SlickEdit Inc and publicised on this forum.

I also have to set up an easier way to load my macros using the hotfix mechanism - I started doing it after a suggestion from Dennis but ran into problems and lack of time.
 

Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on December 08, 2019, 09:20:28 PM
I tried to use xretrace with v24 on Linux before your post.

It is not crashing v24,  xretrace_cursor and xtrace_modified_line seem to work.

However when I do xretrace_modified_line_steps or xretrace_cursor_steps, the popup window comes up but then instantly disappears. I set the below:

Code: [Select]
#define  XRETRACE_DATA_PATH  "/tmp/xretrace"
//#define  XRETRACE_USE_SUBFOLDER YES

But I don't see any files created in there when I move the cursor around or start modifying lines.

xretrace seems like it can be really useful so I don't mind debugging it on v24 if you have any pointers for where I should look?

I started a private github repo for my changes but I can easily make it public, if you are interested.
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on December 08, 2019, 10:16:50 PM
If the popup window is disappearing instantly then maybe the retrace_steps_event_loop2 function is exiting immediately.  You could find the "return" statements in that function and see if you can figure out why it is exiting early?  When the event loop is running you should be able to show and hide the popup window using "F5".

There are some "xretrace_dump" commands that output the current xretrace list  e.g.  xretrace_dump_retrace_cursor_list  -  can be used to check if the cursor position is being added to the list correctly  - and xretrace_dump_modified_lines_list.

Regarding the repo  -jporkkahtc made his public too.  I'll see if SlickEdit support have any comment about it.  Ideally there should be just one repo for all user macros I think.

Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on December 08, 2019, 10:20:41 PM
Graeme: With the addition of many dsay() statements, I found that the popup for xretrace-cursor-steps is disappearing right away because it thinks that "ESC" was hit. My dsay in the below case for 'ESC' is printing out so that is how I know.

Code: [Select]
      _str key = get_event('N');   // refresh screen and get a key
      _str keyt = event2name(key);
      switch (keyt) {
...
         case 'ESC' :
            // exit back where we started
            edit('+Q +BI ' :+ start_buf_id);
            message('');  // clear
            _mdi.p_child.p_line = startline;
            _mdi.p_child.p_col = startcol;
            center_line();
            dsay("Event loop ESC return");
            return;

Any ideas as to why it thinks ESC was hit?

At first I was issuing the 'xretrace-cursor-steps' by pressing esc and typing the command.

But then if I bind it to a key so I don't have to hit ESC, it still exits due to thinking ESC was hit.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on December 08, 2019, 10:22:32 PM
Regarding github, I've also had a public github repo for a macro that I took over from chrisant:

https://github.com/rbresalier/sync_project_with_scm
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on December 08, 2019, 10:22:43 PM
Sorry, missed your question about xretrace_data_path  - there's not much difference in the code regarding this so I would expect it to work.

Maybe you have data capture disabled - from a higher up post I wrote this
Quote
There's a new option in the xretrace options dialog  -  "capture retrace data to disk".  It's off by default.  If you want xretrace-scrollbar to show anything useful it needs to be enabled.

Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on December 08, 2019, 10:29:07 PM
So I modified the event loop code so that the first ESC is ignored, and only the 2nd ESC is looked at.

When I do this it works! The popup is there and I can navigate the cursor changes.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on December 08, 2019, 10:32:25 PM
For xretrace github repo, I think it would be nice to have it on its own and not be in a repo with everyone elses macros.

The reason that I think this is so that I can cd to my SE config dir and do a git clone xretrace and it will automatically be in the config/24.0.0/xretrace directory.

This is how I made my private repo.
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on December 08, 2019, 10:32:45 PM
ok, thanks.  I'll check with slickedit support about it, also Clark offered to help me get xretrace working on V24.

I wonder if it's something to do with the numeric keypad stuff I added because of this.
https://community.slickedit.com/index.php/topic,16592.msg63985.html#msg63985 (https://community.slickedit.com/index.php/topic,16592.msg63985.html#msg63985)
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on December 08, 2019, 10:34:38 PM
regarding the repo - ok, I'll give it some thought.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on December 08, 2019, 10:48:32 PM
It seems like a possible issue with SlickEdit to me and not related to that post. For some reason after running xretrace_cursor_steps macro, the first time one tries to get a key (using code below) it is always ESC. Is xretrace somehow "pressing"/inserting this key?

Code: [Select]
_str key = get_event('N');   // refresh screen and get a key
_str keyt = event2name(key)

UPDATE: I modified the code to remove the numeric keypad stuff as below, it still thinks ESC is pressed and I need to ignore the first ESC, so that is not the problem.

Code: [Select]
      // make numpad keys work properly
      //int orig_auto_map_pad_keys=_default_option(VSOPTION_AUTO_MAP_PAD_KEYS);
      //_default_option(VSOPTION_AUTO_MAP_PAD_KEYS,0);
      _str key = get_event('N');   // refresh screen and get a key
      _str keyt = event2name(key);
      //_default_option(VSOPTION_AUTO_MAP_PAD_KEYS,orig_auto_map_pad_keys);
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on December 08, 2019, 11:11:48 PM
After removing my debug prints it seems I now need to ignore the first 2 ESC keypresses and not just the first one.

Something seems strange.

UPDATE: I modified my local xretrace.e to ignore any ESC character within the first 500msec from when the event loop starts, this seems to work. But would be nice to understand why this is needed.
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on December 09, 2019, 12:16:30 PM
Thanks for trying it.  I'll send off a request to slick support at some point.  You're welcome to upload your modified files here if you feel like it.

Regarding the github repo.  jporkkahtc mentioned his github repo here - nearly two years ago.  Time flies.
https://community.slickedit.com/index.php/topic,15156.msg57556.html#msg57556 (https://community.slickedit.com/index.php/topic,15156.msg57556.html#msg57556)
https://github.com/jporkka/slickMacros.git

It looks like there is one folder for each different "macro/ utility"  -  would that work for you ??  Everything really needs to be tagged with the version of slickedit it works for so you can download the right version of every macro in one go.  Then there needs to be a loader utility that lets people choose which macros to "install" - or at least some easy way of installing.

BTW - I gave up coding on Linux because I couldn't get xretrace to run without crashing/killing slickedit.  We're using centos in vmware like you.

Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on December 09, 2019, 03:22:15 PM
It would be annoying to use anything other than its own repo due to the requirement for xretrace directory being directly under the config directory.

By having dedicated xretrace repo, I can git clone it right into my config directory and get xretrace subdirectory. Then if I have changes, I can edit them right there and the push back to git. Then when I was done in Linux and wanted to try it in windows, I easily cloned it under my windows config dir and got working very fast.

If I use a common repository, the xretrace files will not be under the config directory - cloning directly under there won't put them in the right directory. So I would clone somewhere else. Then I would have to copy the files over - which is error prone. Then if I make changes to the files, I have to make sure to copy them back to the git repo for pushing, this is also error prone.

This is why I prefer a dedicated repository for now.

If being a subdirectory of config dir was not a requirement, or if the combined repo could be cloned directly under the config directory and the xretrace macro files could be updated to take this into account, then it would be better. But I don't have the time to invest right now to change this, or to create a loader utility. Perhaps if someone took the time to do that then we could have a common repo, but I can't do it at the moment. So I would propose to make my private repo public and then when someone can invest in making it so that one can clone the combined repo directly under the config directory, or make xretrace usable outside the config directory, then can move it into a common repo.

xretrace works fine for me in Linux x64, CentOS under SlickEdit v24 with my changes. I had to make another minor change to get it to work, change all the #import "dlinklist.e" to #import 'DLinkList.e' as Linux file system is case sensitive.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on December 13, 2019, 02:16:22 PM
I've attached a xretrace.zip file with the modifications I've made (mentioned in earlier posts) to get xretrace working in my Linux x64 environment.
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on December 13, 2019, 10:20:00 PM
Thanks.  I'll have time to look at it in a week or so.  I'm keen to get it on github and I'll look at making it location independent too - it's difficult, if not impossible, to find the location of the source code at runtime from within the macro unless it's in a "known location".  There's a problem to find as well - step through modified lines sometimes goes to the end of a file when it shouldn't  - it started going wrong only a few months ago.
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on January 09, 2021, 04:40:16 AM
The latest xretrace & xxutils etc. is now available in github - see this thread
https://community.slickedit.com/index.php/topic,15156.msg69252.html#msg69252 (https://community.slickedit.com/index.php/topic,15156.msg69252.html#msg69252)

xxutilis includes these macros which have slight differences to the built-in macros.

xcursor_to_next_token
xcursor_to_prev_token
xselect_to_next_token
xselect_to_prev_token
xfind_next_whole_word_at_cursor
xfind_prev_whole_word_at_cursor
xquick_search
xquick_reverse_search
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on January 11, 2021, 02:13:14 PM
Thanks Graeme!

I think it would be useful if you added the instructions in the github. Maybe a text file or readme markup in the xretrace folder in the github?

I'm finding myself looking back through this thread for the instructions on what to do when I install the new xretrace.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on April 25, 2021, 03:17:36 AM
Hi Graeme:

Thanks again for the wonderful xretrace macro.

I loaded up your latest one but I was still having issues similar to what I reported before. This time after pressing any key in the menu SE was reporting that I pressed ESC even though I was not pressing ESC. So I made a pull request where I filter out ESC for 500msec after any key is pressed.

Here is the pull request:

https://github.com/jporkka/slickMacros/pull/2

Thanks,
Rob
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on April 25, 2021, 09:36:28 AM
Hi Rob
Thanks.  I'm not sure what the effect of your change is but I've merged and committed.  If you have the user rights, feel free to update xretrace in the master branch yourself.

It's a shame that user macros aren't a bit easier for people to find and download.  I haven't done a very good job of indicating which version of slickedit my macros work with though.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on April 25, 2021, 03:42:37 PM
Hi Grame:

Thanks for merging it. Since you 'own' this macro I wanted your review first so that is why I didn't attempt to push it to master myself, preferred your buy-in.

In your readme.txt you point to: https://community.slickedit.com/index.php/topic,16598.msg64005.html#msg64005

The instructions in that post first say: "Have a read of the info towards the end of the xload-macros.e source file."

But towards the end of xload-macros it states:

Quote
4) Load this module xload-macros.e then run the command xload_macros.

But there is no 'xload_macros' anymore. So I think this text needs updating.

I ended up going back to your post in the forum and did the "loading xload-macros.e then run the macro xload_macros_default_path_silent"

So the text at the end of xload_macros.e needs an update. I think there is even more outdated stuff there that needs update such as:

Quote
  #define XRETRACE_PATH _ConfigPath() :+ 'xretrace' :+ FILESEP
  #define XRETRACE_MODULE_NAME XRETRACE_PATH :+ 'xretrace.e'
  #define  XRETRACE_DATA_PATH  'c:/temp'
  #define  XRETRACE_USE_SUBFOLDER YES

  It is recommended that XRETRACE_PATH be left as is - anything else is untested.

Thanks again for this great macro!

Rob
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on April 25, 2021, 04:02:09 PM
Hi Graeme:

I have some more confusion maybe you can help.

Initially I did the following:

1. Cloned the github repo in a directory outside the config directory
2. Copied the 'xretrace' directory from the git clone to my <configdir>/25.0.1/xretrace
3. Loaded the file "<configdir>/25.0.1/xretrace/xload-macros.e' into the editor
4. Ran 'load'
5. Ran 'xload_macros_default_path_silent'
6. Ran 'xretrace_cursor_steps' and enabled the macro

Then I noticed the problem with the 'ESC' key so I modified the <configdir>/25.0.1/xretrace/xretrace.e file with my modifications and did 'load'.

But now I notice I have 2 directories with xretrace:

<configdir>/25.0.1/xretrace
<configdir>/25.0.1/UserMacros/xretrace

The one in 'UserMacros' doesn't have my updated xretrace.e.

I tried running 'xload_macros_default_path_silent' thinking that it somehow copied these files to 'UserMacros', but after doing that 'UserMacros' still has the old xretrace.e. However it seems that SE is using my modified xretrace.e from the other config directory outside UserMacros.

Now I would like to have only 1 xretrace directory, and I would like it to migrate when I update SE to a new version.

So which one should stick around? The 'UserMacros' one or the other one under my config?

Now that I don't plan to modify the macro anymore, what is the best way that I should have it installed in just one directory under my config instead of in 2 directories?

I also could not find instructions to 'uninstall' it.

Thanks,
Rob
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on April 25, 2021, 04:11:41 PM
I ended up doing Macro->List User Loaded Modules.

It showed all my xtrace .ex files in the UserMacros except for the xload in my <config>/25.0.1/xretrace dir.

I then used this menu to unload all xretrace's .ex files.

I then deleted both:

<config>/25.0.1/xretrace
<config>/25.0.1/UserMacros/xretrace

Then I copied from the git clone:

cp -rp <gitclone>/xretrace <config>/25.0.1/UserMacros/xretrace

The I loaded the xload-macros.e from the UserMacros dir and ran:

xload_macros_default_path_silent

Then I saw from 'Macro->List User Loaded Modules' that all xretrace .ex files were from the 'UserMacros' directory. And all the .e in UserMacros are the latest ones.

Seems like this is the best way to continue forward and have xretrace kept when I upgrade SE to next version?
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on April 25, 2021, 11:18:49 PM
Hi Rob

Thanks for all your comments.  I have a sore wrist at the moment and I'm trying to minimise my typing but I will try to get this sorted out in the next few days.  I'm not sure what the status of the slick plugin mechanism is at the moment but at some stage I will switch it to use that too.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on January 22, 2024, 02:37:01 PM
Hi Graeme:

The xretrace plugin seems to not work well with SlickEdit 2023/v28. It worked for me for a short time after plugin install, but then later on after I brought up the popup menu and did <left> and <right> it wasn't taking me to the right places. So I switched back to v27, SE2022 as I don't have time right now to look into it and fix it.

Rob
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on January 22, 2024, 08:08:31 PM
ok, if I can get a license I will have a look.  I neglected to download my license when the notice came out in November.
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on January 22, 2024, 10:21:08 PM
it seems the check for a modified line is returning true all the time
(_mdi.p_child._lineflags() & MODIFY_LF)

When I get home tomorrow I'll have a look for the reason.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on January 22, 2024, 10:25:08 PM
Thanks Graeme!
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on January 25, 2024, 12:37:30 AM
Hi Rob

I'm still investigating this.  If it's easy to do could you tell me what setting you have (in the version that goes wrong) for "reset modified lines on save"  - tools -> options -> file options  -> save.

I've always had this enabled so I might not have noticed if there are any problems with it off.

Also in xretrace option settings (command xretrace-options) what do you have for "don't touch line modify flags".  I always have this off so that xretrace can reset the flag so I might not have noticed any problems with it enabled.


Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on January 25, 2024, 03:11:35 PM
My "Reset Modified Lines" in tools -> options -> file options  -> save is set to "ON"

"don't touch line modify flags" is checked.

Attached screenshots of both.

I'll turn off "don't touch line modify flags" and see what happens today. Do I need to do anything else besides uncheck that?
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on January 25, 2024, 03:48:26 PM
First time I tried "xretrace_cursor_steps" it said xretrace wasn't started, so I said it should start.

After a few minutes it was still taking me to the wrong markers even though I unchecked "don't touch modify flags". 

Then I clicked the "reset xtrace"

A few minutes later when I try "xretrace_cursor_steps" the menu flashes on the screen and then disappears.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on January 25, 2024, 04:44:41 PM
"xretrace_cursor_steps" doesn't disappear anymore but when I go <left> and <right> it takes me to the wrong places.

I think it is taking me to the right files but it is going to the wrong lines.
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on January 25, 2024, 07:07:37 PM
ok, I'll try with more files open.

Are you using V28.0.1 ?
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on January 25, 2024, 07:09:17 PM
I'm using 28.0.0.6 with hotfixes, didn't know 28.0.1 existed until reading your message will update to that.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on January 25, 2024, 07:12:33 PM
I'm using QT5 version on Linux x64
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on January 25, 2024, 07:27:19 PM
Installed 28.0.1 QT5 linux x64 and re-installed the plugin.

Now whenever I do 'xtrace-cursor-steps' it says "xtrace is not running. Start xretrace now?". I click Yes.

But then when I subsequently do 'xtrace-cursor-steps' it says it isn't running and asks me again to start it.
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on January 25, 2024, 07:31:27 PM
ok, uncheck "retrace delayed start" in the options if not already.

I'm using windows, i'll see if I can repro there then maybe try Linux.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on January 25, 2024, 07:45:40 PM
"retrace delayed start" has been unchecked the entire time and each time I do 'xtrace-cursor-steps' it says "xtrace is not running. Start xretrace now?". I click Yes.
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on January 25, 2024, 07:52:54 PM
ok, I would suggest make a trivial change to xretrace.e then reload it, then restart slickedit.
So far I can't repro any problems on Windows.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on January 25, 2024, 08:10:37 PM
Just tried trivally changing xretrace.e, reloading it, restarting SE, then each time I do 'xretrace-cursor-steps' says it isn't running and asks if I want to start it.
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on January 25, 2024, 08:20:18 PM
If you feel like it, add the "say" line below to see which variable is going wrong.
Also try a brand new empty config folder sometime.
Maybe check that you have same source as in github
https://github.com/jporkka/slickMacros/tree/master

static bool check_xretrace_is_running()
{
   if (xretrace_not_running || !retrace_timer_callback2_has_started) {
      say("chkrun  " :+ xretrace_not_running :+ "  " :+  retrace_timer_callback2_has_started );
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on January 25, 2024, 09:54:36 PM
I downloaded the plugin from github in November, so I think I have the right one.

I added the say statement, loaded xretrace.e, restarted SE.

Then I ran xretrace-cursor-steps 3 times.

What I see in the "say" window for these 3 attempts are:

chkrun 1 1
chkrun 0 0
chkrun 0 0
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on January 25, 2024, 10:18:04 PM
It seems the timer isn't running.  I doubt if _use_timers is going wrong  - that's slick.
Can you see if there is anything in the log file in the config logs folder.


static void retrace_timer_callback2()
{
   if (!_use_timers || xretrace_timer_handle < 0)
      return;
   if (retrace_no_re_entry > 0) {
      xretrace_re_entry_happened = true;
      dsay("xretrace re-entry 1", "xretrace");
      return;
   }
   ++retrace_no_re_entry;
   retrace_timer_callback2_has_started = true;
   if (retrace_no_re_entry == 1) {
      maintain_cursor_retrace_history();
   }
   else if ( !xretrace_re_entry_happened ) {
      xretrace_re_entry_happened = true;
      dsay("xretrace re-entry 2", "xretrace");
   }
   --retrace_no_re_entry;
}
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on January 25, 2024, 10:26:31 PM
also chkrun 1 1
is strange, it means xretrace hasn't started but the timer has started.
I think that is theoretically impossible.  Also if you have xretrace auto start enabled, why does it think xretrace hasn't started the first time.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on January 25, 2024, 10:51:12 PM
I added a bunch of dsay to see what was going on. Looked like callback2 wasn't getting called as often as it should. Then I added more dsay() and the issue went away and seems to work now - xretrace_cursor_steps doesn't ask to start xretrace and it does seem to navigate to the right spots. Some kind of race condition and I can't get it back.

I had both of these happen before, xretrace_cursor_steps() continually asking to reload, then when it finally does work the <left>, <right> go to the right places, but then eventually the <left>, <right> go to the wrong places. It is working now, even after I removed some of my dsay that made it work. Not sure how I can get it to repro again.
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on January 25, 2024, 10:59:30 PM
when you say it happened before, do you mean a year or two ago or just since you tried V28?

If you keep getting problems I'll try it on Linux myself  - I have to use vmware and I'm not sure what state it's in.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on January 25, 2024, 11:01:06 PM
By before I meant since I started using v28.

I had lots of user loaded modules in my <config>/28.0.1/UserMacros/xretrace so I unloaded all of them.

I then deleted directory <config>/28.0.1/UserMacros/xretrace and deleted my vslick.sta file. Then I loaded the plugin. Now I don't see any xretrace macros in Macro->List loaded modules. But xretrace-cursor-steps seems to be working and taking me to the right places. Will update if it starts failing.
Title: Re: xretrace, xxutils and a few other things
Post by: Graeme on January 25, 2024, 11:10:11 PM
ok, further below is from the xretrace help file doc but see this message too.
https://community.slickedit.com/index.php/topic,18320.msg73885.html#msg73885
so maybe check the tag file and remove any non plugin xretrace files.

I will have to try and tidy up the xretrace postings in this forum as it's too hard for anyone to figure out what's going on with multiple out of order threads about xretrace.



Quote
Installation for plugin version -SlickEdit V26 or later
If you have a non plugin version of xretrace/ xxutils installed then you should firstly do the following.
Run the command xretrace_disable
1.
xretrace V2.21 documentation
Tuesday, 21 September 2021
3:22 pm
xretrace docs Page 1
Run the command xretrace_disable
1.
Close any xretrace-scrollbar windows you have -probably none.
2.
Unload all of the associated macro ex files using the List User-Loaded Modules option in the Slick Macro menu. These are as followsxnotepad.ex, xkeydefs.ex, xtemp-file-manager.ex, xblock-selection-editor.ex, xretrace.ex, xretrace_scrollbar.ex, xretrace_popup.ex, xxutils.ex, DLinkList.ex, xload-macros.ex
3.
To install the plugin, use the plugin_install command and browse to the xretrace plugin zip file. If you need to reinstall the plugin, you do not need to unload anything first -just use the plugin_install command again.
Title: Re: xretrace, xxutils and a few other things
Post by: rowbearto on January 25, 2024, 11:12:41 PM
In v27 I thought I was using the plugin, so I only reloaded the plugin for v28. Don't know why those macros were listed in user loaded modules, maybe it goes back to v26 or earlier? Anyway seems cleaned up now, hopefully it doesn't start failing.