<?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[NPPM_INTERNAL_* commands]]></title><description><![CDATA[<p dir="auto">My plugin is renaming a new tab by sending a message to NPP…<br />
<a href="https://github.com/notepad-plus-plus/notepad-plus-plus/blob/c16f7bbc1e59e86b4d7650f63a10b8fe47fdaac0/PowerEditor/src/resource.h#L466" rel="nofollow ugc">#define NPPM_INTERNAL_SETFILENAME (NPPMSG + 63)</a></p>
<p dir="auto">It seems to work OK, but I was wondering why it’s INTERNAL, and not part of:<br />
<a href="https://npp-user-manual.org/docs/plugin-communication" rel="nofollow ugc">Plugin Communication: Messages and Notifications</a></p>
<p dir="auto">What risk is there when using NPPM_INTERNAL_* messages?</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/18375/nppm_internal_-commands</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 02:25:40 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/18375.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 16 Oct 2019 11:18:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to NPPM_INTERNAL_* commands on Thu, 17 Oct 2019 12:56:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pnedev" aria-label="Profile: pnedev">@<bdi>pnedev</bdi></a> said in <a href="/post/47871">NPPM_INTERNAL_* commands</a>:</p>
<blockquote>
<p dir="auto">For example those messages might be doing only part of the job you think they are doing.</p>
</blockquote>
<p dir="auto">That’s probably the best reason right there. :-)</p>
<p dir="auto">Thanks for the explanation.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47876</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47876</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 17 Oct 2019 12:56:48 GMT</pubDate></item><item><title><![CDATA[Reply to NPPM_INTERNAL_* commands on Thu, 17 Oct 2019 07:34:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> said in <a href="/post/47861">NPPM_INTERNAL_* commands</a>:</p>
<blockquote>
<p dir="auto">Do you have insight into that?</p>
</blockquote>
<p dir="auto">There might be different reasons it depends on the implementation.<br />
For example those messages might be doing only part of the job you think they are doing.<br />
Those are used to notify the message queue of some event. For instance the file might be renamed from outside or from user action within the editor and in both cases the GUI file tab should be updated with the new name - you might use internal message to notify the GUI about that. The same is true if you do some processing in another thread and it needs to notify the main GUI thread about the job it’s doing.<br />
Sometimes internally some action might need to be delayed - internal message might help with that because you can post it.</p>
<p dir="auto">BR</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47871</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47871</guid><dc:creator><![CDATA[pnedev]]></dc:creator><pubDate>Thu, 17 Oct 2019 07:34:49 GMT</pubDate></item><item><title><![CDATA[Reply to NPPM_INTERNAL_* commands on Wed, 16 Oct 2019 15:36:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pnedev" aria-label="Profile: pnedev">@<bdi>pnedev</bdi></a> said in <a href="/post/47860">NPPM_INTERNAL_* commands</a>:</p>
<blockquote>
<p dir="auto">They are named <code>_INTERNAL_</code> because they should not be used externally.<br />
In other words they are not part of the Notepad++ plugin API …</p>
</blockquote>
<p dir="auto">Not being part of the API is a valid argument for not using something, because there is no promise of it working a certain way, or continuing to work in the same way in the future.</p>
<p dir="auto">But there has to be an underlying reason why those specific messages were marked as internal, and not made part of the API.  Do you have insight into that?</p>
<p dir="auto">For “rename”, there are two alternatives available to the plugin developer:</p>
<ol>
<li>use <code>NPPM_MENUCOMMAND</code> with <code>lParam</code> = <code>41017</code> to run the <strong>File &gt; Rename…</strong> menu entry, but that will pop up a dialog box.</li>
<li>use the <code>NPPM_SAVECURRENTFILEAS</code> with <code>lParam</code> pointing to a string containing the full path to the new name, and then deleting the old file</li>
</ol>
<p dir="auto">What is inherently more dangerous about allowing a plugin to rename an open file, using the same message that Notepad++ uses internally to do the rename after popping up the dialog, compared to allowing a plugin to call that dialog for the rename, or doing a save-as and then delete the original?  (Or similarly for other internals with workarounds.)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47861</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47861</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 16 Oct 2019 15:36:56 GMT</pubDate></item><item><title><![CDATA[Reply to NPPM_INTERNAL_* commands on Wed, 16 Oct 2019 15:12:33 GMT]]></title><description><![CDATA[<p dir="auto">Hi guys,</p>
<p dir="auto">They are named <code>_INTERNAL_</code> because they should not be used externally.<br />
In other words they are not part of the Notepad++ plugin API (and thus they are not defined in the plugin include file).<br />
Some may work but it is not guaranteed and you should know what you are doing. Best is to not use them at all.</p>
<p dir="auto">BR</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47860</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47860</guid><dc:creator><![CDATA[pnedev]]></dc:creator><pubDate>Wed, 16 Oct 2019 15:12:33 GMT</pubDate></item><item><title><![CDATA[Reply to NPPM_INTERNAL_* commands on Wed, 16 Oct 2019 14:32:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/moon6969" aria-label="Profile: moon6969">@<bdi>moon6969</bdi></a> said in <a href="/post/47846">NPPM_INTERNAL_* commands</a>:</p>
<blockquote>
<p dir="auto">why it’s … not part of: <a href="https://npp-user-manual.org/docs/plugin-communication" rel="nofollow ugc">Plugin Communication: Messages and Notifications</a></p>
</blockquote>
<p dir="auto">That part’s easy: When that page was created in the new docset, I just started with the messages and notifications that were already documented in the old set.  Since I don’t know the internals well, and don’t know the descriptions / usages of the other messages, I just started there.  It was better to have <em>some</em> documentation of them, rather than none.  But other messages should be documented eventually, including warning as to risks.</p>
<blockquote>
<p dir="auto">What risk is there when using <code>NPPM_INTERNAL_*</code> messages?</p>
</blockquote>
<p dir="auto">I don’t know of the reasons for that “internal” naming scheme, or what risks (if any) are involved.  <a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: Ekopalypse">@<bdi>Ekopalypse</bdi></a> or someone else might know better why those are marked <code>_INTERNAL_</code>.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: Ekopalypse">@<bdi>Ekopalypse</bdi></a> has <a href="https://github.com/notepad-plus-plus/npp-usermanual/issues/42" rel="nofollow ugc">already suggested and is working on</a> documenting some of the non-<code>_INTERNAL_</code> message documentation that was lacking.  He may be willing to try to document the <code>NPPM_INTERNAL_*</code> as well; I’ve asked over there (and he frequents here as well, so he’ll doubly see it).  If he doesn’t have the time or expertise to document those, then someone else (you, maybe?) could volunteer to do it.  Anyone can fork the <a href="https://github.com/notepad-plus-plus/npp-usermanual/" rel="nofollow ugc">usermanual repo</a> and submit a <a href="https://github.com/notepad-plus-plus/npp-usermanual/pulls" rel="nofollow ugc">pull-request</a> – it just needs to be reviewed by the team before it will be incorporated.</p>
<p dir="auto">(I would volunteer to do it, but since I’ve never used most of the messages – and probably none that weren’t documented in the old docs – I’d have to dig through source code, see how they’re used, and try to come up with an explanation myself.  That would take quite a while, especially since I have multiple Notepad++ related projects taking up a very limited free time for such things.)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/47855</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/47855</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 16 Oct 2019 14:32:59 GMT</pubDate></item></channel></rss>