<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Notepap++ asks if the file should be reloaded after manual reload]]></title><description><![CDATA[<p dir="auto">I have configured Ctrl+R for reloading the current file. In more recent versions I encountered the following behaviour:</p>
<ul>
<li>I have a logfile open which a running process is logging into</li>
<li>I want to refresh the file (since “Monitorng tail -f” doesn’t work as I expect it) by pressing Ctrl+R</li>
</ul>
<p dir="auto">what happens:</p>
<ul>
<li>the file is being immediateley reloaded after Ctrl+R</li>
<li>every now and then Notepad++ asks me if it should reload the file for me, because it was modified externally, this only happens, if I’m right, when the process logger appended to the file since the last reload and there really is new content in the file. At the moment i press Ctrl+R I see new lines being displayed and then there is the dialog" Do you want to reload it?"</li>
</ul>
<p dir="auto">What I’d expect is, that this dialog doesn’t show up after a manually triggered reload.</p>
<p dir="auto">Or did I miss something?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/18552/notepap-asks-if-the-file-should-be-reloaded-after-manual-reload</link><generator>RSS for Node</generator><lastBuildDate>Fri, 06 Nov 2026 19:14:45 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/18552.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 29 Nov 2019 08:02:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Notepap++ asks if the file should be reloaded after manual reload on Wed, 04 Dec 2019 09:25:17 GMT]]></title><description><![CDATA[<p dir="auto">Interesting, thanks for the investigastion. From my experience it feels like something with getting the focus back to the file. as if “Ctrl+R” is leading to have the focus on the current file lost, after the reload it is regained. When the focus is regained, the check for modification kicks in and if the file was modified in the mean time, it asks if the file should be reloaded. If the focus is lost, maybe it is possible to reload with Ctrl+R without having the focus lost?</p>
<p dir="auto">Reading your posting reminded me on the first posting in this thread and the sidenote: since “Monitoring tail -f” doesn’t work as I expect it.</p>
<p dir="auto">The “eye-button” also known as since “Monitoring tail -f” would solve this issue, if it worked as I’d expect it. I experience the same as here: <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4955" rel="nofollow ugc">https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4955</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/48904</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/48904</guid><dc:creator><![CDATA[Michi Kaa]]></dc:creator><pubDate>Wed, 04 Dec 2019 09:25:17 GMT</pubDate></item><item><title><![CDATA[Reply to Notepap++ asks if the file should be reloaded after manual reload on Mon, 02 Dec 2019 16:00:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michi-kaa" aria-label="Profile: Michi-Kaa">@<bdi>Michi-Kaa</bdi></a></p>
<blockquote>
<p dir="auto">could you reproce the behaviour?</p>
</blockquote>
<p dir="auto">Yes and no - it happens sometimes but more often it didn’t.<br />
Would say something like 1 out of 5 I got a reload dialog<br />
after manually reloading the file.</p>
<p dir="auto">I dug through the source to understand what is going on.<br />
What happens is that npp uses <a href="https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-readdirectorychangesw" rel="nofollow ugc">ReadDirectoryChangesW</a><br />
to get the notification when a file gets changed and in addition<br />
it uses a “manual” trigger <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/blob/3a1244177c0680e0c3f32bca9bcdca8a63fc2d18/PowerEditor/src/NppBigSwitch.cpp#L1535" rel="nofollow ugc">NPPM_INTERNAL_CHECKDOCSTATUS</a> once npp regains the focus<br />
and some mechanism, I haven’t found so far, when a different<br />
buffer gets activated.</p>
<p dir="auto">Using ReadDirectoryChangesW:<br />
It does this to prevent the app to constantly poll each file open<br />
but unfortunately MS implemented it in a way where it is possible<br />
to either loose such events or not to get informed at all.<br />
I cannot say if this makes sense or not what MS did, but that is how it is done.<br />
From my point of view it makes sense to use this api, with the<br />
limitation that you rely on the file to be written in a certain way to<br />
receive the notifications. <a href="https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/ns-wdm-_fast_io_dispatch" rel="nofollow ugc">FastIoWrite</a>, used by ping, doesn’t seem to<br />
trigger this events.</p>
<p dir="auto">I did some test with this python script</p>
<pre><code>import time

print('start')
with open(r'd:\ping.txt', 'w+') as f:
    for i in range(10):
        print(f'{i}')
        f.write('test\n')
        f.flush()
        time.sleep(2)
print('done')
</code></pre>
<p dir="auto">in order to see if I can get when a reload dialog happens and when not<br />
but the result was, that there was dialog opened at all when reloading the file.<br />
Which on the other side makes me believe, that the reload dialog<br />
seems to be triggered but something else.</p>
<p dir="auto">Personally I would vote for an additional feature which implements<br />
polling a file constantly. Once you’ve discovered that a certain file is<br />
not updated you would switch to to a polling monitoring.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/48840</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/48840</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Mon, 02 Dec 2019 16:00:58 GMT</pubDate></item><item><title><![CDATA[Reply to Notepap++ asks if the file should be reloaded after manual reload on Mon, 02 Dec 2019 13:47:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michi-kaa" aria-label="Profile: Michi-Kaa">@<bdi>Michi-Kaa</bdi></a> said in <a href="/post/48772">Notepap++ asks if the file should be reloaded after manual reload</a>:</p>
<blockquote>
<p dir="auto">At the moment i press Ctrl+R I see new lines being displayed and then there is the dialog"[…] Do you want to reload it?"</p>
</blockquote>
<p dir="auto">I would say that this is a bug only if we know for sure that after the manual reload that there have been no further external changes to the file…and then the prompt appears.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/48835</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/48835</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Mon, 02 Dec 2019 13:47:07 GMT</pubDate></item><item><title><![CDATA[Reply to Notepap++ asks if the file should be reloaded after manual reload on Mon, 02 Dec 2019 08:18:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: Ekopalypse">@<bdi>Ekopalypse</bdi></a> could you reproce the behaviour? If yes, what do you think? Desired or undesired behaviour? Also happens in v7.8.1 (64-bit)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/48832</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/48832</guid><dc:creator><![CDATA[Michi Kaa]]></dc:creator><pubDate>Mon, 02 Dec 2019 08:18:35 GMT</pubDate></item><item><title><![CDATA[Reply to Notepap++ asks if the file should be reloaded after manual reload on Fri, 29 Nov 2019 20:01:33 GMT]]></title><description><![CDATA[<p dir="auto">It is perfectly reproducible:</p>
<pre><code>C:\Users\me&gt;ping -n 1000 localhost &gt; ping.txt
</code></pre>
<p dir="auto">And now open ping.txt and press Ctrl+R every two seconds, make sure not to wait longer than it will take to ping 1000 times.</p>
<p dir="auto">Notepad++ v7.7.1 (32-bit)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/48791</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/48791</guid><dc:creator><![CDATA[Michi Kaa]]></dc:creator><pubDate>Fri, 29 Nov 2019 20:01:33 GMT</pubDate></item><item><title><![CDATA[Reply to Notepap++ asks if the file should be reloaded after manual reload on Fri, 29 Nov 2019 14:43:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michi-kaa" aria-label="Profile: Michi-Kaa">@<bdi>Michi-Kaa</bdi></a></p>
<blockquote>
<p dir="auto">I’d hope, that being asked, if the file should be reloaded after a manual reload has been triggered, is considered a bug, and will be fixed in a future version.</p>
</blockquote>
<p dir="auto">if you find a reliable way how to get this happen, then one might be able to see if this<br />
can be changed in source code but currently I think it was just a coincident that a<br />
manual reload and an update notification occurred at the same time.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/48781</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/48781</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Fri, 29 Nov 2019 14:43:25 GMT</pubDate></item><item><title><![CDATA[Reply to Notepap++ asks if the file should be reloaded after manual reload on Fri, 29 Nov 2019 14:39:34 GMT]]></title><description><![CDATA[<p dir="auto">Thank you for your suggestion. But for me, in other cases, I want to be informed, if another process manipulated an opened file. So enabling silent updating is no solution for me.<br />
I’d hope, that being asked, if the file should be reloaded after a manual reload has been triggered, is considered a bug, and will be fixed in a future version.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/48780</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/48780</guid><dc:creator><![CDATA[Michi Kaa]]></dc:creator><pubDate>Fri, 29 Nov 2019 14:39:34 GMT</pubDate></item><item><title><![CDATA[Reply to Notepap++ asks if the file should be reloaded after manual reload on Fri, 29 Nov 2019 12:44:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/michi-kaa" aria-label="Profile: Michi-Kaa">@<bdi>Michi-Kaa</bdi></a></p>
<p dir="auto">I assume this is a coincident.<br />
If it was programmed that a manual reload triggers a file reload dialog,<br />
then it would happen always.<br />
As it only happens now an then I think that a real update to<br />
that file has happened as well.<br />
Afaik there are two ways to configure the file monitor in this regards.</p>
<ol>
<li>getting the dialog that there was an update (default) or</li>
<li>enable silent updating, (no dialog)</li>
</ol>
<p dir="auto">Config can be changed in <strong>settings-&gt;preferences-&gt;MISC.</strong><br />
tick or untick <strong>Update silently</strong> in <strong>file status auto-detection</strong></p>
]]></description><link>https://community.notepad-plus-plus.org/post/48776</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/48776</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Fri, 29 Nov 2019 12:44:18 GMT</pubDate></item></channel></rss>