Author Topic: How to get SE stop asking to reload a file that is written to by other process?  (Read 4661 times)

rowbearto

  • Senior Community Member
  • Posts: 2162
  • Hero Points: 132
I have a logfile open in SE. This logfile is getting constantly written to by another process while I am analyzing it in SE.

I would like to have SE stop asking me to reload the file, I am looking at some older information in this file, and don't need it constantly reloaded.

Every time I get the "Reload Modified Files" dialog for this file, I click on "Cancel", but then later on, I get the "Reload Modified Files" dialog again. I would like to know how to prevent the "Reload Modified files" dialog from popping up in this case where another process is constantly writing to a logfile?

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2730
  • Hero Points: 144
You could go to Tools>Options and choose File Options>Load, and shut off Auto Reload.  I'm afraid it's sort of a sledgehammer solution, but there's not a way to shut it off for a single file or filespec.

rowbearto

  • Senior Community Member
  • Posts: 2162
  • Hero Points: 132
hmm, that is too sledgehammerish for me. I still want to reload other files that change outside of SE, just not this one.

No way to turn this off for a single file?

I think there should be a way to do this through the "Reload Modified Files" dialog, please consider this as a feature request.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2730
  • Hero Points: 144
I'll add it as a feature request.

rowbearto

  • Senior Community Member
  • Posts: 2162
  • Hero Points: 132
Thanks!

mjdl

  • Senior Community Member
  • Posts: 149
  • Hero Points: 17
  • SE 25.0.1.0 x64, Windows 10 x64 20H2
You could go to Tools>Options and choose File Options>Load, and shut off Auto Reload.  I'm afraid it's sort of a sledgehammer solution, but there's not a way to shut it off for a single file or filespec.

Auto-reload is on by default, but it's not a feature that I've much experience with, so I'm probably misunderstanding the original poster's situation and the auto-reload function:

If the auto-reload feature is on and a) a file open in SE is continually modified externally but b) NOT modified internally by the user in SE, then the auto-load option "Suppress prompt unless modified" is surely one to use in this situation, so the externally modified file gets reloaded without prompting (and hopefully SE keeps the user's current line and cursor position in the reloaded file too). Or am I wrong about this? (No real way to test it right now.)

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2730
  • Hero Points: 144
You could go to Tools>Options and choose File Options>Load, and shut off Auto Reload.  I'm afraid it's sort of a sledgehammer solution, but there's not a way to shut it off for a single file or filespec.

Auto-reload is on by default, but it's not a feature that I've much experience with, so I'm probably misunderstanding the original poster's situation and the auto-reload function:

If the auto-reload feature is on and a) a file open in SE is continually modified externally but b) NOT modified internally by the user in SE, then the auto-load option "Suppress prompt unless modified" is surely one to use in this situation, so the externally modified file gets reloaded without prompting (and hopefully SE keeps the user's current line and cursor position in the reloaded file too). Or am I wrong about this? (No real way to test it right now.)

The way I read OP's second post was that he did not want to reload this particular file even though it had changed.

Edit: I didn't completely understand what you wrote.  Sorry about that.
« Last Edit: February 22, 2018, 05:02:34 pm by Dan »

rowbearto

  • Senior Community Member
  • Posts: 2162
  • Hero Points: 132
I didn't think about "Suppress prompt until modified", but that may be a good workaround to keep the prompt from coming up. Just wonder if SE will freeze, or performance will degrade if SE is constantly reloading the file? This is why I was thinking not reloading it would maybe be better. But if negligible performance degradation and I stay at same line, could be useful. I will try "Suppress prompt until modified" next time I am in this situation and see if that is useful. Thanks mjdl!

jporkkahtc

  • Senior Community Member
  • Posts: 2506
  • Hero Points: 206
  • Text
That's kind of funny, because I usually have the opposite problem with continually written log files -- slick fails to notice that it has changed and you can only get it reloaded by closing and opening the file again.
(I'd like "tail -f" behavior).

It depends (On Windows anyways) how the file is being written.
Usually, if the writer is holding the file open the whole time while writing slowly, slick doesn't notice.
If the file is opened, written, closed, repeat - then slick notices.

Probably the size of the file matters as well, since slick handles big files differently.

rowbearto

  • Senior Community Member
  • Posts: 2162
  • Hero Points: 132
OK, looked into "Suppress prompt until modified" - but this appears to apply to all files. I was thinking that it would have been a per-file thing and I had just missed it somehow as a button in the "Reload modified files" dialog, but alas there is no "Supress prompt until modified" button in "Reload modified files", and suppressing the prompt can only be done for all files - not just my logfile - so it is another sledgehammer that I'm not much interested in. For all other files besides a few logfiles, I am very interested to know if another process modified them.

mwb1100

  • Senior Community Member
  • Posts: 149
  • Hero Points: 13
This may be a bone headed suggestion, but what I'd do as a workaround until SE got the new feature implemented is copy the logfile I was analyzing to another file, and open that copy. Not ideal, but it would probably be a good enough workaround for me.  Or I'd use another editor for the logfile.

My personal example is that I have to deal with serial consoles to embedded devices all the time.  When I'm looking in the scrollback buffer and the device sends some new data, putty (the terminal emulator I use) happily scrolls away from whatever I'm looking at.  To solve that problem I copy the putty contents to the clipboard and paste it into an editor buffer.

rowbearto

  • Senior Community Member
  • Posts: 2162
  • Hero Points: 132
mwb1100: Yeah, this is pretty much what I do when too many "Reload Modified Files" pop up - I go to File->Save as and save it somewhere else, then it goes away. Not ideal, would be nice if SlickTeam could find another way.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2730
  • Hero Points: 144
I'm looking into this.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2730
  • Hero Points: 144
I added a "Never Reload Selected" button for the next hotfix.  It is per session.  If you restart the editor, you will be prompted until you select Never Reload again.  If you close the file and re-open it, same thing.  I don't want to shut it off too permanently, it will cause a problem for somebody.

jporkkahtc

  • Senior Community Member
  • Posts: 2506
  • Hero Points: 206
  • Text
How does slick remember other per-file things, like encoding, language, etc?

How should a user reset those?