Auto/silent updating worked yesterday, but not today
-
I’m not sure what I am doing wrong. Yesterday I had auto/silent updating working, but it does not work today, and I am getting the popup window again. Updated from v 8.6.8 to v 8.6.9, but it still does not work. I have in my settings: file status auto-detection enabled, update silently and scroll to the last line after update checked, and enable notepad++ auto updater checked. Can someone tell me what is wrong?
I attached pictures of:
the version
the settings
the log code in Notepad++ vs the chat window in Minecraft at the same time. -
The “Enable Notepad++ auto-updater” option has nothing to do with “File Status Auto-Detection” (it was probably confusing of the author to use the same terminology for both options). “File Status Auto-Detection” has to do with watching whether or not an open file has changed since Notepad++ opened it; “Enable Notepad++ auto-updater” decides whether or not Notepad++ checks its website every couple of weeks to look for a new version.
For “File Status Auto-Detection”:
- “Enable” means it will just watch the status for the file in the active tab – so if you have
a.txt
,b.txt
, andc.txt
open andb.txt
is the active tab, it will only notice changes inb.txt
.- if
a.txt
orc.txt
changes, then when you switch to that tab, it will update, obeying the “update silently” and “scroll” checkbox settings as well
- if
- “Enable for all open files” means that all the files (
a.txt
,b.txt
, andc.txt
in my example) would check for changes from other applications - “Disable” means it won’t check at all.
But when I try with v8.6.9, if I have “update silently” selected, it doesn’t matter whether it’s “Enable” or “Enable for all open files” – it does the update silently, without asking me. So I cannot replicate a problem of the dialog popping up even when it’s set to “update silently”.
As far as whether or not it detects at all: Notepad++ is looking at the “last modified” timestamp for the file. When the external application that is writing to that logfile modifies the file, it should update the timestamp; when Notepad++ sees that the time is after that timestamp, it will then re-read the file or notify you (depending on those settings). If the external app writes at 12:15:01, Notepad++ might not see it until 12:16:00, so it might take a minute. If the logfile is on a network drive (like
\\machine\directory\filename.log
orx:\directory\filename.log
), the network server might have a slightly different time than the computer that Notepad++ is running on; if the server thinks it’s 12:17:01 when it saves the file, it will use that as the timestamp; if your computer thinks it’s 12:16:00 at the same time, it might be another couple minutes before Notepad++ sees that it’s 12:18 and realizes that the file has been externally changed). (Those time examples are from my memory of what happens; there might be slight differences in which clock being where causes the 1-2minute delay, but the basic idea is the same: sometimes, it can take a few mintues before Notepad++ notices the changes).All of that previous paragraph assumes that the external process has actually flushed the logfile to disk. If the external app is using “buffered write”, it may be many minutes after it writes a short message before it actually updates the file on the disk (it may have to write 100 or 1000 bytes or some similar buffer before it saves the copy of the logfile on the disk – for example, “Hello World\n” is only 12-13 bytes, so if the buffer were 128 bytes, it might take more than 10 “Hello World\n” messages before the buffer is flushed to the disk… so if it’s only doing one “Hello World\n” per minute, it could be more than 10 minutes before it shows up in Notepad++ – and that’s completely due to the external application, and nothing Notepad++ can do could hurry that along.
If you look in Windows Explorer, and can see that the logfile has a newer timestamp, but Notepad++ still hasn’t updated, then you might try File > Reload from Disk to “kick” Notepad++ once, and then watch it carefully to see if it sees the next change within a minute or two of it being written to disk and your being able to see that the file changed in the Explorer window.
- “Enable” means it will just watch the status for the file in the active tab – so if you have
-
@PeterJones I had high hopes, but there is still an issue, assuming I understood you correctly.
I tried uninstalling this version and reinstalling it, without saving the custom settings, but that did not fix it. When I went to the preferences tab, enable notepad++ auto-updater was already checked, so I unchecked it. File Status Auto-Detection was not enabled, so I enabled it, and clicked update silently and scroll to the last line after update. That didn’t work.
-
@tamimd67 said in Auto/silent updating worked yesterday, but not today:
If the external command is making changes, and you are just looking at the changes in Notepad++, then “update silently” works.
However, If you edit/change the file in Notepad++, then it’s always going to ask you, because Notepad++ needs to know whether you want to lose all your Notepad++ changes and switch to the version that the other application wrote to disk, or if you want to keep your Notepad++ changes and lose whatever new data the external application wrote to disk. You should not be trying to use Notepad++ make changes to the logfile at the same time that the external application is trying to make changes to the logfile, because there is no way for Notepad++ to reconcile those two.
-
@PeterJones Thank you for clarifying the differences. I was not aware. In this case, I am just watching to logs. I solved the issue by going to View, Monitoring (tail-f).