Comments (14)
Well, I think the old behavior needs to be preserved by default - to be consistent with the standard command prompt.
And the new one, where the process tree is killed, will be enabled e.g. by npe_console j+
.
from nppexec.
or it can be solved by using npp_run:
npp_run $(CMD) start $(NPP_DIRECTORY)\change.log
or simply
npp_run $(NPP_DIRECTORY)\change.log
from nppexec.
YES - you're right, just tested.
Thank you @badrelmers and @d0vgan for the help. I LOVE this plugin - evidence my 2850+ line npes_saved.txt
!
from nppexec.
Please try the latest version NppExec20220203_dll here:
https://sourceforge.net/projects/npp-plugins/files/NppExec/NppExec%20Plugin%20(dev)/
from nppexec.
NPE_CONSOLE j+/j-
works perfectly
this is great, thank you so much d0vgan
from nppexec.
Heck, it contradicts with this! -- #60
In particular, it contradicts with this approach:
https://stackoverflow.com/questions/24012773/c-winapi-how-to-kill-child-processes-when-the-calling-parent-process-is-for/24020820
To sum up, we most likely want this behavior in case of a console child process running from a root process; and we most likely do not want it in case of a GUI child process running from a root process.
How to handle both cases? I don't know...
from nppexec.
from nppexec.
Happy to test when available.
from nppexec.
This bug have nothing to do with ctrl-c behavior described here #60
it happens in the default dll of 20220128 dev build
and it is caused by the new feature of killing the childs
in fact notepad open then close quickly like that:
you run
$(CMD) start $(NPP_DIRECTORY)\change.log
then cmd
exit, then Nppexec will kill notepad thanks to the new feature (killing the childs)
so this is a feature not a bug I think.
it can be solved easily by adding /wait
flag so cmd
do no exit:
$(CMD) start /wait $(NPP_DIRECTORY)\change.log
from nppexec.
Indeed, the /wait to the start
command seems to fix it - in some cases.
I have a script:
::relaunch
NPP_CONSOLE disable
NPP_EXEC date
NPP_EXEC time
NPP_CONSOLE enable
SET LOCAL TIMESTAMP = $(DATE)$(TIME)
SET LOCAL TEMPFILE = "$(SYS.TEMP)\session_$(TIMESTAMP).nps"
NPP_EXEC save session $(TEMPFILE)
$(CMD) start $(POWERSHELL) "Start-Sleep 3; $(NPP_DIRECTORY)\notepad++.exe -openSession $(TEMPFILE)"
// $(CMD) start powershell -NoProfile -Command "Read-Host -Prompt 'Press Enter to launch Notepad++'; $(NPP_DIRECTORY)\notepad++.exe -openSession $(NPP_DIRECTORY)\session.xml"
NPP_EXEC exit
which breaks. I need to launch the PowerShell and let it continue running while the NppExec script continues to run and exists Notepad++ , which the PowerShell re-opens. This script works find in NppExec 0.7.1, but fails in the new version and adding the /wait
doesn't help as it waits for the powershell to complete and then continues - which exits Notepad++ defeating the purpose.
I like the idea above of :
"old behavior needs to be preserved by default - to be consistent with the standard command prompt.
And the new one, where the process tree is killed, will be enabled e.g. by npe_console j+."
Cheers.
from nppexec.
Well, I think the old behavior needs to be preserved by default - to be consistent with the standard command prompt.
And the new one, where the process tree is killed, will be enabled e.g. by npe_console j+
you are right, new comers will think that NppExec do not work, the feature of killing childs should be enabled when needed not by default to be consistent with the standard command prompt as you said.
from nppexec.
@vinsworldcom
your case can be solved by using npp_run $(POWERSHELL)...
instead of $(CMD) start $(POWERSHELL)...
npp_run
is not affected by the new feature (killing childs)
from nppexec.
@badrelmers , @d0vgan took some time yesterday to go through my large npes_saved.txt
and it seems there are many places where I can replace cmd.exe /d /c => $(CMD)
for NPP_RUN ...
and things work as expected. I use the $(CMD)
to run "Batch" commands like if exist ...
, for /f %i in ...
but was also using it to "launch" applications like $(CMD) explorer.exe ...
which it seems are better suited to NPP_RUN ...
.
Thanks for your patience and help - I use this plugin everyday I'm in Notepad++ to automate so many tasks yet I still seem to have only scratched the surface of understanding what's possible or the best way to implement things.
Cheers.
from nppexec.
yes d0vgan really made a good work, he made the beautiful Notepad++ to become something more beautiful. thanks to him and his time and nice work
from nppexec.
Related Issues (20)
- Techniques to restore cursor position within Notepad++ file HOT 2
- SCI_REPLACE has problem matching the beginning of line HOT 6
- Changing N++ themes results in error HOT 4
- Please add support for theme. I am using version 0.8.2 and the console is white. HOT 1
- Ipython does not have auto-indentation and colour for keywords. The same things work fine in normal command prompt. HOT 5
- encoding characters error HOT 2
- CAnyRichEdit::AddStr() is very slow and should be optimized HOT 1
- Search index for online version of NppExec Manual HOT 14
- How to clean HOT 1
- How to clean up/delete the list saved in F6 HOT 1
- [HTML docs] External links are not navigable HOT 4
- There is something wrong with the console output encoding. HOT 2
- How to get current dir name only (not full path) HOT 2
- License? HOT 4
- XBrackets release accidentally added to this repo? HOT 2
- Double clicking line in console output jumps to the first tab ocurrence if you have multiple tabs open with different files of the same name HOT 4
- im trying to compile a qc file and its saying : ERROR:bad or missing options HOT 1
- Issues getting NppExec console to work with Python's getpass module or third party pwinput module HOT 2
- Notepad++ dev build NPP_OPEN fails HOT 5
- NppExec fails to open file in shellcheck.exe HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nppexec.