Author Topic: Reloading of PuTTY log files  (Read 5757 times)

StephenW

  • Senior Community Member
  • Posts: 186
  • Hero Points: 21
Reloading of PuTTY log files
« on: January 13, 2011, 09:34:25 pm »
Slickedit 15.0.1.3  Brief emulation  Windows 7 64-bit

I use the PuTTY terminal program a lot, and I frequently have log files generated by PuTTY open in Slickedit.  When PuTTY logs more to the log files, Slickedit seems to loose track of the fact that the files are changing and only offers to reload them the first time PuTTY changes them.  After that I have to manually close and reopen them to see any new data.  Has anyone else seen this?  Any ideas on how to get Slickedit to see all changes to the log files?

PuTTY:
  http://www.chiark.greenend.org.uk/~sgtatham/putty/

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Reloading of PuTTY log files
« Reply #1 on: January 18, 2011, 02:55:40 pm »
By default, SlickEdit should check whether the files need to be reloaded any time you switch applications back to SlickEdit or when you switch to an open file that has changed. It doesn't check for changes in the background. There are options to control the reload behavior at Tools > Options > File Options > Load. Scroll to the bottom of the page to see the Auto Reload section.

The default for "Compare file contents before auto reload" is False. So, we only check the file attributes. Could it be that the attributes on this file aren't changing as further content is logged? If so, try setting this to True.

StephenW

  • Senior Community Member
  • Posts: 186
  • Hero Points: 21
Re: Reloading of PuTTY log files
« Reply #2 on: January 19, 2011, 12:20:33 am »
You are right, PuTTY is not changing the timestamp when it writes further data.  But setting "Compare file contents before auto reload" does not help - it looks as though Slickedit does not check the file contents if the timestamp has not changed.

I could get the souce code for PuTTY and fix it, but instead I have just written myself a macro to reload the PuTTY log files and bound it to a handy key, and that is working well.

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Reloading of PuTTY log files
« Reply #3 on: January 20, 2011, 04:48:18 pm »
Glad you found a solution. I think the "Compare file contents before auto reload" may be to rule out cases where the timestamp has changed but the contents haven't. I'll check on that.

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Reloading of PuTTY log files
« Reply #4 on: January 20, 2011, 07:16:57 pm »
I found it that it behaves as I described. The "Compare file contents..." setting is to rule out cases where the timestamp changed but the file has not changed. I guess we could put in an option to always compare the file against the buffer, but that could certainly be slow.

Are you happy enough with the current solution?

StephenW

  • Senior Community Member
  • Posts: 186
  • Hero Points: 21
Re: Reloading of PuTTY log files
« Reply #5 on: January 20, 2011, 07:52:37 pm »
Yes, I am happy.  My custom macro works better than the auto-reload - I do not have to click on Yes to reload the files, and I have the macro doing a couple of other helpful things now.  The big problem I have with using macros for this sort of thing now is finding a spare keybinding.  But I have just discovered that the Crl+Alt-Fxx keys in Brief emulation do not seem to be assigned at all and have started on using them up.  One thing I would find very useful could be the ability to get a list of unused keybindings.  But I can get by using the list-source command to see what is already assigned.

hs2

  • Senior Community Member
  • Posts: 2727
  • Hero Points: 281
Re: Reloading of PuTTY log files
« Reply #6 on: January 20, 2011, 08:28:11 pm »
@StephenW: 'list-keydefs' could be your friend to get an overview of your key bindings.
The lack of spare key bindings IS a problem - along with remembering all of them ;)
But a lead-in key combination and postfix keys could open new possibilities.
E.g. 'CTRL-x' (release keys) + a (just press 'a') can be bound to a command as well.
HS2

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Reloading of PuTTY log files
« Reply #7 on: January 20, 2011, 08:48:25 pm »
You can also write macros that are commands and then use the SlickEdit command line to invoke them. Yes, this is far more keystrokes than binding to a key, but it depends on how often you use the macro. I have a hard time memorizing key sequences I don't use several times a day, so I prefer to use commands for less frequently used tasks.

Regardless, we're glad that's working for you!

Graeme

  • Senior Community Member
  • Posts: 1987
  • Hero Points: 228
Re: Reloading of PuTTY log files
« Reply #8 on: January 21, 2011, 06:20:18 am »
I have trouble remembering keybindings too and I used to have trouble organizing them so I wrote some macros to help me.

http://community.slickedit.com/index.php?topic=5461.0

Now I have xkey_bindings_show bound to C-A-S-ENTER and it gives me my keybindings grouped by the base key so I can easily see where spare keys are.  It doesn't handle key sequences that are more than one key  - coz I have only a small number of them.

Graeme